Skip to content
Omnikalc

Non-inferiority sample size calculator: how many participants to show a new treatment is not worse?

Enter the success rates, the non-inferiority margin, the significance level, power and dropout to get the number of participants per group and in total.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Results

Participants per group

201

Total participants
402
Participants per group allowing for dropout
224
Total allowing for dropout
448
Sum of the z values (α and power)
2.802

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.

The sample size calculator covers the simple case of estimating a proportion, and the statistical power calculator shows power for given numbers.

Frequently asked questions

What is a non-inferiority trial?

It is a trial designed to show that a new treatment is not worse than the standard one by more than a set margin. It is used when the new treatment has other advantages, such as fewer side effects, a lower cost or easier use, so that being just as good is enough.

How do I choose the margin?

The margin is a judgment about the largest loss in effect that patients would accept in return for the benefits of the new treatment. It should be smaller than the effect of the standard treatment over a placebo, and it is usually agreed with regulators before the trial.

Why is the sample size often larger than for a superiority trial?

Margins are usually small, and the sample size grows with the inverse of the square of the distance to the margin. Detecting that a new treatment is not worse by more than 10 points takes more people than finding that it is better by 20 points.

Why is the significance level one-sided?

Non-inferiority asks only whether the new treatment is not too much worse, so the test looks in one direction. A one-sided level of 0.025 corresponds to the 95 percent confidence interval used for the decision, so that the lower limit of the difference must stay above minus the margin.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.