Sample Size Calculator — Two-Group Mean Test (Power & α)
Inputs
(e.g., 0.80)
(two-tailed)
(same units as means)
(pooled SD)
Results
Minimum Sample Size
Per group: —
|
Total (both groups): —
Two-tailed test; equal variances and equal group sizes assumed.
Details
Cohen’s d: —
Z1−α/2: — | Zpower: —
Formula: \( n = \dfrac{2\,(Z_{1-\alpha/2}+Z_{1-\beta})^2}{d^2} \) where \( d = \Delta/\sigma \).
How This Sample Size Calculator Works
This tool estimates the required sample size per group for a two-sample mean test (independent groups, equal variances, equal group sizes) using a normal approximation to power analysis.
Formula
For minimum sample size per group:
$$ n = \\frac{2\\,(Z_{1-\\alpha/2} + Z_{1-\\beta})^2\\,\\sigma^2}{\\Delta^2} \\quad \\text{where} \\quad d=\\frac{\\Delta}{\\sigma} $$
Equivalently: $$ n = \\frac{2\\,(Z_{1-\\alpha/2} + Z_{1-\\beta})^2}{d^2} $$
Inputs
- Power (1−β): Probability of detecting a true effect (commonly 0.80 or 0.90).
- α (Significance): False-positive rate (commonly 0.05 two-tailed).
- Δ (Difference in means): Minimum effect worth detecting.
- σ (Standard deviation): Estimated from prior data or a pilot study.
Notes & Limitations
- Assumes equal variances and equal group sizes; paired/unequal-variance designs are out of scope.
- Uses standard normal quantiles (accurate for common settings).
- Rounding up is applied to ensure whole participants per group.
Frequently Asked Questions
Can I use Cohen’s d directly?
Yes. If you know d, set Δ = d × σ or set σ = 1 and enter Δ = d.
Two-tailed vs one-tailed?
This calculator uses a two-tailed test (Z1−α/2). For a one-tailed test, replace Z1−α/2 with Z1−α.
Are inputs and results stored?
No. All computations run locally in your browser.