A non-inferiority trial aims to show that a new treatment is not worse than a standard one by more than a set margin. The non-inferiority sample size calculator takes the two success rates, the margin, the one-sided significance level, the power and the expected dropout, and gives the participants per group, the total, and the numbers allowing for dropout.
How the calculation works
- Choose the non-inferiority margin δ, the largest loss in success rate that you would still accept as “not worse”, based on clinical judgment and past trials.
- Enter the success rate of the standard treatment p₁ and the rate you expect for the new treatment p₂.
- With a one-sided significance level α and power 1 − β, the number per group is n = (z(1−α) + z(power))² × (p₁(1 − p₁) + p₂(1 − p₂)) ÷ (p₂ − p₁ + δ)².
- Increase it for dropout: divide by 1 − dropout rate. Round up to whole participants.
Example
The standard treatment succeeds in 85 % of patients and the new one is expected to do the same. The margin is 10 points, with a one-sided α of 0.025 and power of 80 %. The z values add up to 1.960 + 0.842 = 2.802. Then n = 7.849 × 0.255 ÷ 0.01 = 200.1, so 201 per group and 402 in total. With 10 % dropout, the numbers become 224 per group and 448 in total.
Why it matters
The sample size is one of the first things a protocol must justify. This calculation lets researchers and students see how the margin, the rates and the power change the size of a trial before they run full software.
Good to know
The formula uses the normal approximation for two proportions with unpooled variance, which works when the rates are not close to 0 or 1 and groups are not small. Real protocols may use other methods, and a statistician should confirm the final plan. The margin is not something the calculator can decide.
Related tools
The sample size calculator covers the simple case of estimating a proportion, and the statistical power calculator shows power for given numbers.