How it’s calculated
Power is the probability that a study will give a statistically significant result when a real difference of a given size exists. Before collecting data, a power analysis finds how many subjects each group needs so that a difference you care about is likely to be detected. The calculator assumes two groups of equal size and uses the normal (z) approximation.
z₁₋α/2 is the critical value of the test (1.96 for α = 5% two-sided) and z₁₋β the normal quantile of the target power (0.8416 for 80%). The power for a given n reverses the same formulas.
Example (two means): to detect a difference of 5 points when the standard deviation is 10 (d = 0.5) with a two-sided α of 5% and 80% power: n = 2 × 10² × (1.95996 + 0.84162)² ÷ 5² = 8 × 7.8489 = 62.79, so you need 63 per group (126 in total). These are the default values. With proportions of 10% and 15%, p̄ = 0.125 and n = (1.95996 × 0.46771 + 0.84162 × 0.46637)² ÷ 0.05² = 685.6, so 686 per group.
Frequently asked questions
What power should I aim for?
Eighty percent is the common minimum and 90% is often used for important studies. Higher power needs larger samples.
Where do I get the standard deviation or proportions from?
From a pilot study, earlier research or routine data. The answer is only as good as these guesses, so try a few plausible values and plan for the larger n.
Why is my t-test sample size slightly larger?
These formulas use the normal distribution. A t-test, which estimates the SD from the data, needs a little more, usually one or two extra per group unless the sample is very small.
Should I calculate power after the study?
Power computed from the observed effect adds nothing beyond the p-value. Power analysis is for planning; after a study, report the effect size with its confidence interval.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- MTH410 Mathematical Statistics, Two-sample Inference: Means (power and sample size table) — College of Staten Island, CUNY
- MTH410 Mathematical Statistics, Two-sample Inference: Proportions (power and sample size table) — College of Staten Island, CUNY
- NIST/SEMATECH e-Handbook, 7.2.2.2 Sample sizes required — NIST
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator