Statistical Power Calculator
Power and beta for a two-group test from effect size, sample size, alpha, and tails.
What it does
Statistical power is the probability that a test will reject the null hypothesis when the assumed effect is real. It is a planning number: before collecting data, you ask how often the study would find an effect of a given size.
This calculator uses the normal approximation for a two-group comparison. You supply a standardized effect size, the sample size per group, alpha, and whether the test is one- or two-tailed. It returns power and beta, the chance of a Type II error.
The defaults use d = 0.50, 32 people per group, alpha = 0.05, and a two-tailed test. The noncentrality term is 2.828, the critical z is 1.96, and the resulting power is 80.7%, just above the common 80% target.
Power is not a property of the data you already collected. It depends on an assumed effect and a planned sample. A study with 80% power still misses a real effect 20% of the time, so a non-significant result is not proof that the effect is zero.
How to use
- Enter the smallest effect size you care about detecting, in standard deviation units.
- Enter the planned number of people or observations per group.
- Choose the significance level, usually 0.05.
- Choose a two-tailed test unless a one-sided alternative was planned in advance.
- Press Calculate to see power and beta.
- Increase the sample size if the result falls below the target you need.
Formula
- d
- Standardized effect size, the mean difference divided by the common standard deviation.
- n
- Sample size per group.
- z_critical
- Critical normal value for alpha and the chosen number of tails.
- Phi
- Standard normal cumulative distribution.
The approximation assumes two independent groups of equal size, a known common standard deviation, and a normal test statistic. It runs a little high for small samples; exact power uses the noncentral t distribution. The sample size does not include dropout, so plan for extra enrollment.
Worked example
Example: d = 0.50, 32 per group, two-tailed alpha 0.05
Defaults: effect size 0.50, 32 per group, alpha 0.05, two-tailed.
- Noncentrality term: 0.50 x sqrt(32) = 2.828.
- Critical z for a two-tailed 0.05 test: 1.960.
- z for power: 2.828 - 1.960 = 0.868.
- Power: Phi(0.868) = 0.807, or 80.7 %.
- Beta: 1 - 0.807 = 0.193, or 19.3 %.
- The result is at the common 80 % target, so the verdict is Adequate power.
Reference table
| Alpha | Two-tailed | One-tailed |
|---|---|---|
| 0.10 | 1.645 | 1.282 |
| 0.05 | 1.960 | 1.645 |
| 0.01 | 2.576 | 2.326 |
Limits
- Uses a normal approximation rather than the exact noncentral t distribution.
- Assumes two independent groups of equal size and a common standard deviation.
- Requires an assumed effect size, which is often the hardest number to justify.
- Does not account for dropout, clustering, or multiple comparisons.
Common mistakes
- Plugging in the effect observed in a small pilot as if it were the true effect.
- Confusing alpha, the Type I error rate, with beta, the Type II error rate.
- Ignoring dropout when setting the enrollment target.
- Switching to a one-tailed test after seeing the data.
- Using this formula for a paired, clustered, or multi-group design without adjustment.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the power for d = 0.50, 64 per group, alpha 0.05, two-tailed?
97.9 %, with beta 2.1 %. Doubling the sample from the default moves the result above the 90 % line.
What changes with a one-tailed test at the same d, n, and alpha?
Power rises to 88.2 % and beta falls to 11.8 %, because the critical z drops from 1.960 to 1.645.
What happens at alpha 0.01 with 32 per group?
Power falls to 60.0 % and beta rises to 40.0 %, below the common 80 % target.
Questions
What does 80% power mean?
If the assumed effect is real, an 80% powered study would detect it in about 80 of 100 repeated studies of the same size.
Why is power usually set at 80%?
It is a common compromise between sample size and the risk of missing an effect. Some fields use 90% for high-stakes trials.
Is power the same as the p value?
No. Power is a planning probability. A p value is computed from the observed data under the null hypothesis.
What is beta?
The chance of failing to reject the null when the assumed effect is real. Power plus beta equals 1.
Can I use this for a paired test?
Not directly. A paired design needs the standard deviation of the within-person differences and a different power formula.
Why does the tool ask for d instead of a raw difference?
A standardized effect puts the difference on a scale that does not depend on the units, so the result can be compared across studies.
Sources
- NIST handbook, sample sizes required
- Pugh and Molinaro, the nuts and bolts of hypothesis testing
- StatPearls, Type I and Type II errors and statistical power