Statistical power is the probability that a study detects an effect that really exists. A study with too few participants may miss a genuine treatment benefit, waste resources and expose people to research without a useful answer. Power analysis works backwards: you decide how big an effect matters, how much false-positive risk (α) you accept and how much power you want, and it tells you how many participants you need.
Four ingredients drive the answer. The effect size (the difference in incidence or means you want to detect) has the biggest influence: halving it roughly quadruples the sample. Variability matters for continuous outcomes, so a noisier measurement needs more people. Lower α and higher power both increase n. Finally, unequal group sizes (an enrollment ratio other than 1) are less efficient than a balanced design.
The formulas here use the normal approximation that most clinical-trial calculators use. They give the sample size to analyse; in practice add extra participants to allow for dropouts and missing data. The chart shows how power rises with the total sample size.
How to use the Power Analysis Calculator
- Study design
- Primary endpoint
- Enter group 2 as
- Incidence in group 1 (or known population)
- Incidence in group 2 (or study group)
- Mean of group 1 (or known population mean)
- Mean of group 2 (or study group mean)
- Change of group 2 relative to group 1
- Standard deviation (group 1 or population)
- Standard deviation of group 2 (blank = same)
- Enrollment ratio (group 2 ÷ group 1)
- Significance level (α)
- Test sides
- Power (1 − β)
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Choose the design and the type of outcome, then enter the expected incidences or means for each group (or a relative change), the enrollment ratio, α and the desired power. The calculator applies the normal-approximation formula, rounds each group up to a whole number and reports the power actually achieved.
Worked example
A trial expects 20% of control patients and 12% of treated patients to have a complication. With α = 0.05 (two-sided), 80% power and equal groups: p̄ = 0.16, z₁₋α/₂ = 1.960 and z₁₋β = 0.842.
n₁ = [1.960 × √(0.16 × 0.84 × 2) + 0.842 × √(0.2 × 0.8 + 0.12 × 0.88)]² ÷ 0.08² = 328.5, so 329 patients per group and 658 in total.
For a continuous outcome such as blood pressure 120 vs 128 mmHg with SD 15, n₁ = (15² + 15²)(1.960 + 0.842)² ÷ 8² = 55.2, so 56 per group.
What changes the sample size
| Change | Effect on n |
|---|---|
| Halve the detectable difference | About × 4 |
| Power 80% → 90% | About × 1.34 |
| α 0.05 → 0.01 (two-sided) | About × 1.49 |
| Enrollment 1 : 1 → 2 : 1 | Total about × 1.13 |
| Double the SD (means) | × 4 |
Formula
Two groups, proportions: n₁ = [z₁₋α/₂ √(p̄q̄(1 + 1/k)) + z₁₋β √(p₁q₁ + p₂q₂/k)]² ÷ Δ², p̄ = (p₁ + k·p₂) ÷ (1 + k), n₂ = k·n₁ · Two groups, means: n₁ = (σ₁² + σ₂²/k)(z₁₋α/₂ + z₁₋β)² ÷ Δ² · One group: N = p₀q₀[z₁₋α/₂ + z₁₋β √(p₁q₁/(p₀q₀))]² ÷ Δ² or N = [σ(z₁₋α/₂ + z₁₋β) ÷ Δ]²
Worked example
Inputs: Study design: Two independent groups (e.g. treatment vs control); Primary endpoint: Dichotomous – yes/no incidence; Enter group 2 as: Its own value; Incidence in group 1 (or known population): 20 %; Incidence in group 2 (or study group): 12 %; Enrollment ratio (group 2 ÷ group 1): 1; Significance level (α): 0.05; Test sides: Two-sided; Power (1 − β): 80 %.
Results: Total sample size = 658; Group 1 sample size = 329; Group 2 sample size = 329; Power achieved with these sizes = 80.06 %; Standardised effect size = 0.2198; Effect size measure = Cohen's h.
Key terms
- Power (1 − β)
- Probability of rejecting H₀ when the assumed effect is real.
- Type II error (β)
- Failing to detect a real effect.
- Effect size
- The smallest difference worth detecting; standardised as Cohen's d for means or Cohen's h for proportions.
- Enrollment ratio (k)
- Size of group 2 divided by size of group 1.
Frequently asked questions
What power should a study have?
80% is the usual minimum and 90% is common in clinical trials. Power of 80% means a 20% chance (β) of missing a real effect of the assumed size.
How many participants do I need to detect a medium effect?
For Cohen's d = 0.5, two-sided α = 0.05 and 80% power, about 63 per group (126 in total) by the normal approximation; t-based software gives 64.
What sample size detects a drop in incidence from 20% to 12%?
About 329 per group (658 in total) at α = 0.05 two-sided and 80% power. A larger drop, 30% to 15%, needs only 121 per group.
Why does a smaller effect need so many more people?
Sample size scales with 1 ÷ Δ². Halving the difference you want to detect roughly quadruples n.
What is the enrollment ratio?
The number in group 2 for every person in group 1. A 2 : 1 design (k = 2) needs more people in total than 1 : 1 for the same power, but can make recruitment easier.
Should I use a one-sided test to reduce the sample size?
Only if an effect in the opposite direction would be irrelevant and this is stated in advance. Regulators generally expect two-sided tests.
How do I allow for dropouts?
Divide the calculated size by (1 − expected dropout rate). With 10% dropout, 658 becomes 732.
Sources
Guides on this topic
- How to Calculate Sample Size for a Survey (Formula + Examples): 385 responses give ±5% at 95% confidence for almost any large population. Here is the formula behind that number and how to adjust it for your survey.