Skip to main content

    Method document

    Sample size for a non-inferiority trial: means

    How many participants are needed in each group to show that a new treatment is not worse than a reference by more than a chosen margin, on a continuous outcome where higher is better. Covers dropout.

    Engine version 1.0.0 · Reviewed 2 October 2026

    https://statwisely.com/methods/noninferiority-means/

    When to use it

    • A new treatment that is cheaper, safer or simpler, where showing it is not meaningfully worse is enough.

    Not for

    • Showing the new treatment is better: use the two-sample t-test. Showing the two are interchangeable in both directions: use equivalence.

    Notation

    nn
    Participants per group
    δ\delta
    Margin
    dd
    Expected difference, new minus reference; higher is better
    σ\sigma
    Common standard deviation
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    qq
    Expected dropout

    Formulas

    Participants per group

    n=⌈2σ2 (z1−α+z1−β)2(δ+d)2⌉n = \left\lceil \frac{2\sigma^{2}\,(z_{1-\alpha} + z_{1-\beta})^{2}}{(\delta + d)^{2}} \right\rceil

    The one-sided test that the difference lies above −δ. The distance to beat is the margin plus any true advantage [1, 2].

    Dropout

    nrecruit=⌈n1−q⌉n_{\text{recruit}} = \left\lceil \frac{n}{1 - q} \right\rceil

    Applied last, to the participants actually recruited.

    Parameters

    Non-inferiority marginδ\delta

    Values: Above 0, in the outcome’s units

    The largest loss of effect that would still be acceptable, justified clinically and from the reference treatment’s known benefit, and set in advance.

    Standard deviationσ\sigma

    Values: Above 0

    From previous trials of the reference treatment.

    Expected true differenceddOptional

    Values: Above −δ

    Usually 0: the treatments are expected to be equally good. Assuming the new treatment is better shrinks the sample, and should only be done with evidence.

    Significance levelα\alpha

    Values: One-sided; usually 0.025

    One-sided, since only inferiority is being ruled out; 0.025 matches a two-sided 0.05 test, as regulators usually expect.

    Power1−β1-\beta

    Values: Between 0 and 1; usually 0.80 or 0.90

    The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.

    Expected dropoutqqOptional

    Values: 0% up to, but not including, 100%

    The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.

    Assumptions

    • The two groups are independent and equal in size, and the reference treatment works in this trial as it did in the trials that established it (constancy).
    • The per-protocol and intention-to-treat analyses should agree; poor adherence makes groups look alike and can favour a false claim of non-inferiority.
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    A margin of half an SD

    Margin 5, SD 10, no true difference, one-sided α = 0.025, 80% power: 2 × 100 × 7.849 / 25 = 62.8, so 63 per group.

    Group 1: 63 · Group 2: 63 · Total: 126

    Protocol statement

    To show non-inferiority within a margin of 5 with 80% power at a one-sided significance level of 0.025, using a test of the difference against the margin, and assuming a standard deviation of 10 and a true difference of 0, the required sample size is 63 per group (126 in total). Calculated with StatWisely (statwisely.com) using: n_per_group = 2σ²[z_(1-α)+z_(1-β)]²/(Δ+d)²; d=μ_test-μ_reference. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    A small true advantage

    If the new treatment is truly 2 better: (5 + 2)² in the denominator, so 33 per group.

    Group 1: 33 · Group 2: 33 · Total: 66

    Open this example in the calculator

    Allowing for dropout

    Expecting 10% dropout: 70 per group.

    Group 1: 63 · Group 2: 63 · Total: 126 · To recruit: 70 and 70

    Protocol statement

    To show non-inferiority within a margin of 5 with 80% power at a one-sided significance level of 0.025, using a test of the difference against the margin, and assuming a standard deviation of 10 and a true difference of 0, the required sample size is 63 per group (126 in total). Allowing for 10% dropout, 70 per group (140 in total) should be recruited. Calculated with StatWisely (statwisely.com) using: n_per_group = 2σ²[z_(1-α)+z_(1-β)]²/(Δ+d)²; d=μ_test-μ_reference. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    Validation

    • Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
    • An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.

    How to cite

    StatWisely. Sample size for a non-inferiority trial: means. Method document, engine version 1.0.0, reviewed 2026-10-02. https://statwisely.com/methods/noninferiority-means/

    Cite the original references for the formulas your design uses as well.

    References

    1. 1.Blackwelder WC. “Proving the null hypothesis” in clinical trials. Controlled Clinical Trials. 1982;3(4):345–353.
    2. 2.Chow SC, Shao J, Wang H. Sample Size Calculations in Clinical Research. 2nd ed. Boca Raton: Chapman & Hall/CRC; 2008.