Non Inferiority Sample Size Calculator
Set margins, power, allocation, and endpoint direction today. Review adjusted totals with dropout and clustering. Export results for protocol notes and study files today.
Set margins, power, allocation, and endpoint direction today. Review adjusted totals with dropout and clustering. Export results for protocol notes and study files today.
| Scenario | Outcome | Margin | Power | Allocation | Dropout | Interpretation |
|---|---|---|---|---|---|---|
| Detector calibration trial | Continuous | 5 units | 80% | 1:1 | 10% | Checks whether a new method is not meaningfully worse. |
| Binary pass rate comparison | Binary | 8 percentage points | 90% | 1.5:1 | 12% | Estimates counts when a pass result is preferred. |
| Clustered lab validation | Continuous | 3 units | 85% | 1:1 | 5% | Inflates counts for clustered measurements. |
This calculator uses a normal approximation for non inferiority testing. The design compares an expected effect against a chosen margin. The key distance is the effect gap.
Continuous endpoint:
n_control = σ² × (1 + 1/k) × (Zα + Zβ)² ÷ (M + D)²
Binary endpoint:
n_control = [pT(1-pT)/k + pC(1-pC)] × (Zα + Zβ)² ÷ (M + D)²
Here, k is the test-to-control allocation ratio.
M is the non inferiority margin.
D is the expected favorable difference.
The final result is inflated by design effect, clustering, and dropout.
Cluster design effect is calculated as
1 + (average cluster size - 1) × ICC.
The final group sizes are rounded upward.
A non inferiority study asks a focused question. It checks whether a new method is not worse than a reference by more than a chosen margin. In physics related testing, this can support new sensors, detectors, calibration workflows, or measurement methods. The goal is not always to prove superiority. The goal may be to show acceptable performance with better cost, speed, safety, or simplicity.
The margin is the most important scientific input. It defines the largest acceptable loss. A margin should not be chosen only because it gives a small sample size. It should reflect practical tolerance, historical evidence, and domain standards. A loose margin can make a weak method look acceptable. A strict margin can require many observations.
Power controls the chance of detecting non inferiority when the assumption is true. Higher power usually increases the required sample size. Alpha controls the false positive risk. Non inferiority designs often use a one sided alpha. Many protocols also describe the result with a two sided confidence interval. Both ideas are closely related.
Continuous endpoints use a standard deviation. Larger variation needs more observations. Binary endpoints use expected event rates. Rates near fifty percent often have high variance. The calculator handles both endpoint types with separate variance terms.
Real studies rarely finish with perfect data. Dropout reduces usable observations. Clustered designs add correlation between measurements. Design effect increases sample size to protect the planned power. These adjustments help make the final target more realistic.
This calculator gives an analytical planning estimate. It should be reviewed with a statistician before final protocol approval. Complex survival, repeated measure, crossover, or Bayesian designs may need specialized methods.
It is the required number of observations needed to show that a new method is not worse than a reference by more than a chosen margin.
The margin is the largest acceptable loss in performance. It should be based on scientific judgment, historical evidence, and practical tolerance.
Most non inferiority designs use a one sided alpha because the main question is directional. Protocol rules may still report a two sided confidence interval.
Allocation ratio is test group size divided by control group size. A value of one means both groups are planned equally.
Dropout reduces usable data. The calculator inflates the planned enrollment so the final analyzed sample remains closer to the needed count.
ICC means intracluster correlation. It measures similarity within clusters. Higher ICC increases the design effect and raises the required sample size.
Yes. Choose binary risk difference, then enter control and test event rates. The margin should be entered as percentage points.
No. It is a planning calculator. Final study design should be reviewed by a qualified statistician or methodologist before approval.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.