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.
Worked example: Two means: delta 5, sigma 10, 80% (n~63)
Inputs
| Solve for | sample_size |
| Endpoint type | means |
| Hypothesis | superiority |
| Test sides (superiority only) | 2 |
| Significance level alpha (type I error) | 0.05 |
| Target power 1 - beta | 0.8 |
| Assumed mean - arm 1 (treatment) | 105 |
| Assumed mean - arm 2 (control) | 100 |
| SD sigma1 (arm 1) | 10 |
| Allocation ratio k = n2 / n1 | 1 |
Result
Superiority (two-sample means, two-sided): n1 = 63, n2 = 63, total 126 for 80% power at alpha = 0.05.
| Mode | Sample size for a target power |
| Design | Superiority (two-sample means, two-sided) |
| n1 per arm (treatment) | 63 (exact 62.79) |
| n2 per arm (k * n1) | 63 (k = 1) |
| Total n | 126 |
| Target power | 80.0% |
| Achieved power at integer n | 80.13% |
| z_alpha used | 1.96 (two-sided z_{1-a/2}) |
| z_beta used | 0.8416 |
| Effect (denominator) | delta = mean1 - mean2 = 5 |
| Combined variance var1+var2/k | 200 |
| Quantile self-check | INV_CDF_AGREE_13 - inverse-normal quantile residual max|Phi(z)-p| = 0.00e+0; n is exact closed form over verified z-quantiles |
Computed by Clinical Trial Sample Size & Power Calculator v1.0.0, the same plugin code the GDBS app runs, when this page was built. To run it on your own figures, open it in GDBS Pro.
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.
Get an email when these rules change
Tables, thresholds and deadlines in Pharma & Biotech change every year. Leave your email and we will tell you when the ones behind tools like this one move, at most once a month.
We email you once to confirm. After that, unsubscribe from any issue in one click. Your address goes to VaultSync only (privacy).
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.