What this calculator does
Statistical power is the chance of detecting an effect that genuinely exists. With an effect size of 0.5 and 40 per group, power is only 60.9%, meaning a real effect would be missed nearly two times in five.
The relationship with effect size is quadratic, and that is where the cost lies. Detecting d = 0.8 at 80% power needs 25 per group; d = 0.5 needs 63; d = 0.2 needs 393. Halving the effect you want to detect roughly quadruples the sample, which is why studies of small effects are so expensive and why underpowered studies are so common.
The formula
Power is the probability that the test statistic exceeds the critical value when the alternative hypothesis is true, computed here for a two-sample z-test. The required sample size inverts that relationship for a target power. The figures assume equal group sizes and a two-sided test, and a t-based calculation would give slightly larger requirements for small samples.
| Term | Meaning |
|---|---|
| Power | The probability of detecting a real effect. 80% is the usual target. |
| Type II error | Failing to detect a real effect. Its probability is 1 minus power. |
| Effect size | Cohen d, the difference in pooled standard deviations that you want to be able to detect. |
| Underpowered | A study with too small a sample to reliably detect the effect it is looking for. |
The inputs explained
| Field | What to enter |
|---|---|
| Effect size (Cohen's d) | Expected effect size as Cohen d. This usually comes from previous work or from the smallest difference that would matter in practice. |
| Significance level α (two-sided) (%) | Significance level, two-sided. 5% is conventional. |
| Sample size per group (for achieved power) | Sample size per group, for the achieved power figure. |
| Target power (for required n) (%) | Target power, for the required sample size. 80% is the usual convention. |
When to use it
Planning a study
Determining the sample size before collecting data is the main use, and it is expected by ethics committees and funders.
Interpreting a null result
A non-significant finding from an underpowered study says very little, and the power figure quantifies how little.
Judging feasibility
If the required sample is beyond reach, that is worth knowing before starting rather than after.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
What sample size does each effect size need?
A range of effect sizes with achieved power and required sample.
| Effect size (Cohen’s d) | Achieved power at n = 40 per group | Sample size needed per group for 80.0% power | Critical z (two-sided α) |
|---|---|---|---|
| d = 0.2 | 14.3% | 393 | 1.960 |
| d = 0.5 | 60.9% | 63 | 1.960 |
| d = 0.8 | 94.7% | 25 | 1.960 |
Questions
Why is 80% power the standard?
It is a convention rather than a derivation, representing a rough balance between the cost of a larger sample and the risk of missing a real effect. It accepts a 20% chance of a false negative, which is four times the 5% false positive rate usually tolerated.
What effect size should I assume?
Ideally the smallest difference that would matter in practice, rather than the one you hope to find. Using an optimistic effect size from a small pilot study is a common route to an underpowered trial, since pilot estimates are noisy and biased upward.
Can I calculate power after the study?
You can, but observed power computed from your own result adds nothing: it is a direct function of the p-value you already have. What is worth reporting is the power the study had to detect an effect size specified in advance, or better, a confidence interval.
Does this account for using a t-test?
No, it uses the normal approximation for a two-sample z-test. For small samples a t-based calculation gives slightly larger required sizes, typically a few subjects per group. For sample sizes above about 30 the difference is negligible.
For the effect size input, see the Cohen’s d calculator. For survey sample sizing, see the sample size calculator.