Pro Tier Module
Clinical Trial Sample Size & Power Calculator
Two-arm trial sample size and power - superiority, non-inferiority, and equivalence, exact and client-side.
See it run - a worked example, 100% in this browser tab
The problem
Designing a two-arm parallel-group trial means picking the right normal-approximation formula for superiority, non-inferiority, or equivalence and feeding it the correct alpha tail, variance assumption, and margin - small errors quietly mis-size a study.
The local-first solution
This plugin evaluates the cited closed-form sample-size and power equations with a high-accuracy inverse-normal quantile entirely in your browser, echoing every z-quantile, variance, and effect it used so no input silently mis-sizes the trial.
What it does
Two-sample means: superiority, non-inferiority by a margin, and equivalence (TOST)
Two-sample proportions: superiority (pooled or unpooled) and non-inferiority
Power as the inverse problem for a given per-arm n under the same model
Allocation-ratio scaling (k = n2/n1) with integer ceiling of the required n
High-accuracy inverse-normal quantile (Acklam plus Halley steps, ~1e-9)
Echoes every z-quantile, variance, effect, and margin actually used
Honest scope
Exact here are the normal-approximation closed forms, the inverse-normal quantile, the allocation scaling, and the integer ceiling; sigma, p1, p2 are planning assumptions and the non-inferiority margin is a protocol choice you confirm. Exact tests, t-distribution corrections, continuity correction, survival, repeated-measures, dropout inflation, multiplicity, and adaptive designs are flagged, not computed. Not medical or regulatory advice.
Authorities cited
- Chow S-C, Shao J, Wang H, Lokhnygina Y (2017). Sample Size Calculations in Clinical Research, 3rd ed. (Chapman & Hall/CRC) - Ch. 3 (two-sample means: superiority eq. 3.2, non-inferiority/superiority-by-margin 3.3, equivalence 3.4) and Ch. 4 (two-sample proportions).
- Julious SA (2010). Sample Sizes for Clinical Trials (Chapman & Hall/CRC) - normal-approximation formulae for means and proportions, allocation ratio, and the non-inferiority effective effect.
- Fleiss JL, Levin B, Paik MC (2003). Statistical Methods for Rates and Proportions, 3rd ed. - two-proportion sample size, pooled vs unpooled variance.
- ICH E9 (1998). Statistical Principles for Clinical Trials - significance level, power, one- vs two-sided testing, and the role of the non-inferiority margin (Sec. 3.5).
- Schuirmann DJ (1987). A comparison of the two one-sided tests procedure (TOST) and the power approach for assessing the equivalence of average bioavailability. J Pharmacokinet Biopharm 15:657-680 - the equivalence (TOST) sample-size basis.
- Acklam PJ (2003). An algorithm for computing the inverse normal cumulative distribution function (rational-approximation initial value used here).
- Cody WJ (1969). Rational Chebyshev approximation for the error function. Math. Comp. 23:631-637 - the erfc used for the high-accuracy normal CDF and Halley refinement.
Size the trial
Set your effect, variance, and design and get the per-arm n or power in the browser - nothing is uploaded. Send results to a Sandbox workspace, a Worklog case, or a Gate client portal.