Sample Size Calculator

Non-inferiority trial

Determines the sample size required to demonstrate that a new treatment is not unacceptably worse than the reference treatment by more than a prespecified non-inferiority margin.

Key takeaways

  • What is calculated: Find the smallest n per arm at which the one-sided test rules out a loss greater than δ with the target power.
  • Quantities you must supply: True difference; Non-inferiority margin; Standard deviation; One-sided significance level; Power; Allocation ratio.
  • Type of calculation: Power-based: it answers how much data is needed to detect a stated effect. Power 0.80 at α = 0.05 is the usual target; confirmatory studies use 0.90.

Method used for Non-inferiority trial

  • Non-inferiority trial — one-sided margin test Sizes a one-sided comparison against a margin: enough participants to rule out a loss of efficacy larger than a pre-specified amount, rather than to demonstrate a gain. It fits a treatment expected to match rather than beat the control while offering something else — lower cost, fewer adverse effects, a shorter course, easier delivery in the field. Everything rests on the margin, which is a clinical judgement argued from the established effect of the control rather than a statistical choice, and on trial conduct: dropout and non-adherence push this design towards its own conclusion, the reverse of what happens in a superiority trial.

When to use

Use when the primary objective is to determine whether a new treatment is not unacceptably worse than an established treatment by more than a prespecified margin.

Sample size

Usually 0, i.e. the treatments are truly equivalent.

In outcome units. Justify it against the historical effect of the active control.

Non-inferiority is one-sided by construction; 0.025 is the regulatory convention.

Probability of detecting the specified effect.

Set to 1 for equal group sizes.

Final n is inflated by 1/(1 − dropout).

Reset to defaults

Awaiting inputs

Set the parameters and calculate.

Methodology — Non-inferiority trial — one-sided margin test

Formula used Non-inferiority trial — one-sided margin test

n=(z1α+z1β)2σ2(1+1/k)(δ+Δ)2
Sample size for the treatment arm; the control arm is k times this

where —

Δ
True difference expected; a small adverse value is conservative. Within the margin
δ
Largest disadvantage still acceptable. > 0
σ
Standard deviation of the outcome, assumed equal in both arms. > 0
α
One-sided significance level. Conventionally 0.025
1 − β
Probability of rejecting the null hypothesis when the specified alternative is true. 0.50 – 0.9999; conventionally 0.80 or 0.90
k
Allocation ratio n₂/n₁. 0.05 – 20; 1 gives equal groups
Expected proportion of enrolled units lost before analysis. 0 – 0.95

How this method works

The hypothesis is shifted by the margin: the study must exclude a loss larger than δ. The required n per arm is (z_{1−α} + z_{1−β})² times the variance sum, divided by the square of (δ + Δ), where Δ is the true difference assumed — usually zero. The test is inherently one-sided, conventionally at α = 0.025.

The hypotheses are shifted rather than centred on zero, and tested one-sided. Because the effective effect size is δ + Δ, assuming exact equality maximises power and is the optimistic assumption; building in a small adverse Δ protects against it.

The margin should preserve a defined fraction — commonly 50% — of the control's demonstrated effect over placebo. Analyse per-protocol as well as by intention to treat, since poor adherence biases towards non-inferiority.

Null hypothesis. H0: mu_T − mu_C ≤ −δ (the test treatment is inferior by at least the margin).

Alternative hypothesis. H1: mu_T − mu_C > −δ (the loss, if any, is smaller than the margin). One-sided by construction.

Calculation procedure

  1. Justify the margin δ: the largest loss of efficacy that would still be acceptable, argued from the historical effect of the control.
  2. State the true difference Δ you actually expect, usually 0, and the standard deviation σ.
  3. The test is one-sided by construction, so use z1α with α=0.025 by regulatory convention.
  4. Evaluate n=(z1α+z1β)2σ2(1+1/k)(δ+Δ)2 per arm.
  5. Round each arm up, then inflate for dropout — and plan conservatively, because poor follow-up biases this design towards concluding non-inferiority.

Exact or approximate

Normal approximation with a one-sided quantile. Adequate at trial-scale sample sizes.

The formula shown always matches what was computed: when a one-sided test is selected the rendered quantile changes from z1−α/2 to z1−α, and where several methods exist, the formula follows the method selected in the calculator.

Advantages & limitations

Advantages

  • Allows a comparability claim to be made rigorously rather than inferred from a null result.
  • Requires fewer subjects than a superiority trial when the margin is wider than the effect a superiority trial would target.
  • Directly interpretable against a confidence interval: non-inferiority holds if the whole interval lies above −δ.

Limitations

  • The conclusion depends entirely on the margin, which is a judgement rather than a statistic.
  • Sloppy conduct — dropout, non-adherence, measurement error — pushes the result towards non-inferiority, the opposite of the conservative direction in superiority trials.
  • Requires a validated active control with a reproducible historical effect.
  • Cannot establish superiority; a separate, pre-specified switching procedure is needed for that.

Assumptions

  • Randomised, parallel-group allocation with independent subjects.
  • The margin δ is clinically justified and preserves a defined fraction of the active-control effect.
  • Constancy: the active control performs in this trial as it did in the trials that established its effect.
  • High adherence and complete follow-up — poor conduct biases a non-inferiority trial towards a false positive conclusion.
  • The assumed true difference Δ is realistic; assuming exact equality when the new treatment is slightly worse understates n.

Applicable adjustments

Supports unequal allocation and dropout inflation. Because dropout biases towards the alternative, plan conservatively rather than relying on inflation alone.

Conclusion

Report δ with its clinical justification, the assumed true difference, the one-sided alpha and the analysis populations. A margin chosen without reference to the historical control effect invalidates the design.

References

  1. Blackwelder WC. "Proving the null hypothesis" in clinical trials. Control Clin Trials. 1982;3(4):345–353. Link
  2. Piaggio G, Elbourne DR, Pocock SJ, Evans SJW, Altman DG. Reporting of noninferiority and equivalence randomized trials: extension of the CONSORT 2010 statement. JAMA. 2012;308(24):2594–2604. Link
  3. European Medicines Agency. Guideline on the Choice of the Non-Inferiority Margin. EMEA/CPMP/EWP/2158/99; 2005. Link