Sample size calculator
A test that is too small cannot detect the effect you care about, and one that is too large wastes time and money. This calculator solves the standard power equation for the number of observations needed to detect a mean difference or estimate a proportion to a given margin.
| Setting | Sample size |
|---|---|
| Δ 4.00 | 50 |
| Δ 3.00 | 88 |
| Δ 2.00 | 197 |
| Δ 1.33 | 442 |
| Δ 1.00 | 785 |
Halving the difference you want to detect roughly quadruples the sample.
n = (zα + zβ)² σ² / Δ² · Two-sided test with the stated power.
n = z² p(1−p) / e² · Worst case at p = 0.5.
margin = z σ/√n · The interval you will actually report.
A clear path from inputs to results.
A test that is too small cannot detect the effect you care about, and one that is too large wastes time and money. This calculator solves the standard power equation for the number of observations needed to detect a mean difference or estimate a proportion to a given margin.
How to use
- Choose a mean or proportion study.
- Set the confidence level and power.
- Enter the standard deviation and the difference to detect.
- Read the required sample size.
The formula
Reference: Standard power analysis for a two-sided test; normal approximation.
Worked example
σ 10, Δ 2, 95% confidence, 80% power
- Standard deviation 10.
- Difference to detect 2.
- Confidence 95%, power 80%.
- 1
zα = 1.96, zβ = 0.8416.
- 2
n = (1.96 + 0.8416)² × 100 / 4 = 196.2.
- 3
Round up: 197 observations.
- 4
Effect size Δ/σ = 0.2, a small effect.
197 observations for a 0.2 effect size.
Interpreting the result
Sample size is a square law in precision: halving the difference you want to detect roughly quadruples the sample. That is why small effects need collaborations and large effects can be found with a pilot.
Assumptions & limitations
- Two-sided test, normal approximation.
- Known or assumed standard deviation.
- Independent observations.
- No allowance for dropouts; add 10–20%.
Frequently asked questions
Why does power matter?
A study with low power can miss a real effect and waste the effort.
Should I add dropouts?
Yes. Inflate the sample by 10–20% for attrition.
What is a small effect size?
About 0.2 in σ units; 0.5 is medium and 0.8 large.
Methodology last reviewed 2026-10-21. Results are informational and not financial or engineering advice — see our disclaimer.