Power Analysis Calculator

Sample size per group to compare two means or two proportions at your α and power, or the power you get from a given n. Normal approximation.

In the same units as your measurements.
From a pilot study or earlier research.
%
%

Results

Sample size per group (rounded up)
63
Total sample size (both groups)
126
Unrounded n per group
62.791
Power with the rounded-up n
80.13 %
Standardized effect size (Cohen’s d = difference ÷ SD)
0.50
z₁₋α/2 (critical value)
1.96
z₁₋β (for the target power)
0.8416
Formula used
n = 2σ²(z₁₋α/2 + z₁₋β)² / δ²
Note
This uses the normal (z) approximation. A t-test needs slightly more, typically 1 or 2 extra per group for small samples. Plan for dropouts too.

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.

two means (common SD σ, difference δ): n per group = 2σ² (z₁₋α/2 + z₁₋β)² / δ² two proportions p₁ and p₂, p̄ = (p₁ + p₂)/2: n per group = ( z₁₋α/2 √(2p̄(1 − p̄)) + z₁₋β √(p₁(1 − p₁) + p₂(1 − p₂)) )² / (p₁ − p₂)² one-sided test: replace z₁₋α/2 with z₁₋α n is always rounded up to the next whole number

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

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