Power Analysis Calculator
Work out how many participants a study needs to detect an effect, or how much statistical power a planned sample gives. Choose a test, enter an effect size such as Cohen’s d, and see the required sample size per group, the power curve and a methods statement. Calculations run in your browser; nothing you enter is sent or stored.
Required sample size · Independent t-test
per group
64 per group (128 in total) for 80% power to detect d = 0.5 at α = 0.05, two-sided.
- Achieved power
- 80.15%
- Total sample
- 128
- Critical value
- 1.979 (df 126)
- Type II error (β)
- 19.9%
Sample size at other power levels
| Target power | Per group (n₁) | Total | Achieved power |
|---|---|---|---|
| 70% | 51 | 102 | 70.6% |
| 80% | 64 | 128 | 80.1% |
| 85% | 73 | 146 | 85.1% |
| 90% | 86 | 172 | 90.3% |
| 95% | 105 | 210 | 95.0% |
How this was calculated
- 1Effect size: d = 0.5
- 2Critical value at α = 0.05 (two-sided): tcrit = 1.9790 with df = 126
- 3Noncentrality: δ = d·√(n₁n₂/(n₁+n₂)) = 2.8284
- 4Power from the noncentral t distribution: 80.15% at 64 per group (128 in total), the smallest size reaching 80%
Methods statement
An a priori power analysis for a two-sided independent-samples t-test (Cohen’s d = 0.5, equal group sizes), with α = 0.05 and 80% power, indicated a required sample size of 64 per group (128 in total) (achieved power 80.1%; noncentral t distribution).
What is statistical power?
Statistical power is the probability that a study detects an effect of a given size when that effect is real: the chance of a statistically significant result if the alternative hypothesis is true. It equals 1 − β, where β is the type II error rate, the chance of missing a real effect.
A power analysis connects four quantities. Set three and the calculator finds the fourth:
- Significance level
- α, the accepted false-positive rate, usually 0.05. A stricter α, for example after a Bonferroni correction, needs more participants.
- Power
- 1 − β, usually 80% or 90%.
- Effect size
- How large the difference or association is, in standardized units such as Cohen’s d. Halving the effect roughly quadruples the sample size.
- Sample size
- The number of participants analysed, per group or in total depending on the design.
An a priori power analysis uses α, power and the effect size to find the sample size before data collection. Funders, ethics committees and journals ask for one in grant applications, protocols and trial registrations.
Choosing an effect size
The effect size drives the result more than any other input. Base it on the smallest effect that would change practice, such as a minimal clinically important difference, or on a cautious estimate from earlier studies or a meta-analysis. Cohen’s benchmarks (Cohen, 1992) are a fallback when nothing better exists:
| Test | Effect size | Small | Medium | Large | Definition |
|---|---|---|---|---|---|
| Two independent means | d | 0.2 | 0.5 | 0.8 | Difference in means ÷ pooled SD |
| Paired means | dz | 0.2 | 0.5 | 0.8 | Mean difference ÷ SD of the differences |
| Two proportions | h | 0.2 | 0.5 | 0.8 | 2·arcsin√p₁ − 2·arcsin√p₂ |
| One-way ANOVA | f | 0.10 | 0.25 | 0.40 | SD of group means ÷ within-group SD; √(η²/(1 − η²)) |
| Correlation | r | 0.10 | 0.30 | 0.50 | Pearson correlation coefficient |
| Chi-square | w | 0.10 | 0.30 | 0.50 | √(Σ (p₁ − p₀)² / p₀) over the cells |
To calculate Cohen’s d from raw numbers, divide the difference between the group means by the pooled standard deviation: means of 52 and 47 with an SD of 10 give d = 0.5. For a paired design, dz uses the standard deviation of the within-person differences, which is usually smaller than the SD of either measurement, so dz is often larger than d. The calculator has a helper for each.
Effects reported in small or single studies are often inflated by publication bias. If your estimate comes from a pilot study, plan for a smaller effect, or justify the sample size in several ways as Lakens (2022) recommends.
Worked power analysis examples
Each row is calculated with the same code as the calculator, at α = 0.05 and two-sided where the test has a direction. The standard example, an independent-samples t-test with d = 0.5 and 80% power, needs 64 participants per group (128 in total), with an achieved power of 80.1%.
| Scenario | Test and effect size | Power | Per group | Total |
|---|---|---|---|---|
| Two groups, small effect | Independent t-test, d = 0.2 | 80% | 394 | 788 |
| Two groups, medium effect | Independent t-test, d = 0.5 | 80% | 64 | 128 |
| Two groups, large effect | Independent t-test, d = 0.8 | 80% | 26 | 52 |
| Two groups, medium effect, 90% power | Independent t-test, d = 0.5 | 90% | 86 | 172 |
| Paired before-and-after design | Paired t-test, dz = 0.5 | 80% | — | 34 |
| Response rate 50% vs 65% | Two proportions, 50% vs 65% (h = 0.30) | 80% | 170 | 340 |
| Three-group one-way ANOVA | One-way ANOVA, f = 0.25, k = 3 | 80% | 53 | 159 |
| Pearson correlation | Correlation, r = 0.3 | 80% | — | 85 |
| Chi-square, 2 × 2 table | Chi-square, w = 0.3, df = 1 | 80% | — | 88 |
Paired designs need far fewer participants than two independent groups for the same standardized effect, because each person serves as their own control. ANOVA totals assume equal group sizes.
How the calculator computes power
Where an exact distribution exists, the calculator uses it rather than a normal approximation, as G*Power does (Faul et al., 2007):
- t-tests use the noncentral t distribution with noncentrality δ = d·√(n₁n₂/(n₁ + n₂)) for two groups or δ = dz·√n for paired data, and df = n₁ + n₂ − 2 or n − 1. Its cumulative distribution follows Lenth’s algorithm AS 243 (Lenth, 1989).
- One-way ANOVA uses the noncentral F distribution with λ = f²·N, df₁ = k − 1 and df₂ = N − k.
- Chi-square tests use the noncentral chi-square distribution with λ = w²·N.
- Pearson correlation uses the critical r from the t distribution and Fisher’s z transformation with a small-sample correction, as in the R pwr package.
- Two proportions use the normal approximation for the pooled two-sample z-test without continuity correction.
For the paired and independent t-tests, power is:
1 − β = 1 − Tdf,δ(t1−α/2) + Tdf,δ(−t1−α/2)
where Tdf,δ is the noncentral t cumulative distribution. The calculator searches for the smallest whole sample size whose power reaches the target, so the achieved power is always at or just above it. In our tests the distribution functions agree with SciPy to within about 10⁻¹².
Why not to calculate post hoc power
Observed or post hoc power, calculated from the effect found in your own data, is a one-to-one function of the p-value: a non-significant result always has low observed power, so it cannot show whether the study was too small (Hoenig and Heisey, 2001). After a study, report the effect estimate with its confidence interval. To show what the study could have detected, run a sensitivity analysis: use the calculator’s Power mode with your actual sample size and try a range of plausible effect sizes.
Reporting a power analysis
A complete statement names the test, the effect size and where it came from, α, sidedness, the target power, the resulting sample size and any allowance for dropout. The calculator’s methods statement covers everything except the source of the effect size, which you should add:
An a priori power analysis for a two-sided independent-samples t-test (Cohen’s d = 0.5, equal group sizes), with α = 0.05 and 80% power, indicated a required sample size of 64 per group (128 in total) (achieved power 80.1%; noncentral t distribution).
Reporting guidelines such as CONSORT ask trials to explain how the sample size was determined. See our guides to writing the methods section and the SAMPL statistical reporting guidelines.
Assumptions and limitations
- t-tests assume normally distributed outcomes and, for two groups, equal variances. For skewed data or a planned Mann–Whitney test, add about 15% as a common rule of thumb, or simulate.
- ANOVA covers the omnibus F test of a one-way, fixed-effects design with equal group sizes. Repeated measures, factorial designs, ANCOVA and planned contrasts need other calculations.
- Two proportions rely on a normal approximation that weakens when few events are expected; the calculator warns when fewer than 5 are expected in a group.
- Clustered designs such as cluster-randomized trials need the sample size multiplied by a design effect, 1 + (m − 1)·ICC.
- Input ranges. α from 0.0001 to 0.5, power 50% to 99.9%, effect sizes 0.01 to 5 (r up to 0.99), allocation ratio 0.1 to 10, up to 50 ANOVA groups and 100 degrees of freedom.
Frequently asked questions
- What is a power analysis?
- A power analysis links four quantities: the significance level (α), statistical power (1 − β), the effect size and the sample size. Fix any three and the fourth follows. Done before data collection, an a priori power analysis gives the sample size needed for a chosen power, usually 80% or 90%, to detect an effect of a stated size.
- How do I calculate the sample size for a t-test?
- For an independent-samples t-test you need Cohen’s d, α, the desired power and whether the test is one- or two-sided. With d = 0.5, α = 0.05, two-sided and 80% power, the calculator gives 64 participants per group, 128 in total. A small effect (d = 0.2) needs 394 per group and a large effect (d = 0.8) needs 26 per group.
- Why is 80% power the usual target?
- Cohen (1988) proposed 80% power as a convention when α is 0.05, which treats a missed effect (β = 0.20) as four times less serious than a false positive. It is a convention, not a rule: many clinical trials and confirmatory studies plan for 90% power. At d = 0.5, moving from 80% to 90% power raises the requirement from 64 to 86 participants per group.
- What effect size should I use in a power analysis?
- Use the smallest effect that would matter in practice, such as a minimal clinically important difference, or a cautious estimate from earlier studies or a meta-analysis. Published effects tend to be inflated, so a pilot or a single prior study can overstate the effect. Cohen’s small, medium and large benchmarks are a last resort when nothing better is available.
- Does this calculator give the same results as G*Power?
- For t-tests, one-way ANOVA and chi-square tests it uses the same exact noncentral t, F and chi-square distributions as G*Power and reproduces its standard results: 64 per group for d = 0.5, a total of 159 for f = 0.25 with three groups, and 88 for w = 0.3 with 1 degree of freedom. For a correlation it uses the Fisher z method of the R pwr package, which gives 85 for r = 0.3 where G*Power’s exact model gives 84. Two proportions use the normal approximation, so results can differ from an exact test. Journal Metrics is not affiliated with G*Power.
- What is the difference between a priori and post hoc power analysis?
- An a priori power analysis is done before the study to choose the sample size. A post hoc or “observed power” analysis plugs the effect found in the data back into the formula. Observed power is a direct function of the p-value, so it adds no information about a non-significant result. Report a confidence interval instead, or a sensitivity analysis of the effect the study could detect.
- Is the sample size per group or in total?
- For two independent groups and for ANOVA the calculator shows the number per group and the total. For a paired t-test the number is pairs, or participants measured twice. For a correlation or a chi-square test it is the total number of participants.
- How do I adjust the sample size for dropout?
- Divide the analysed sample size by one minus the expected dropout rate and round up. With 64 per group and 10% dropout, enrol 64 ÷ 0.9 = 71.1, so 72 per group or 144 in total. Enter the dropout rate in the calculator to do this automatically. More enrolment does not fix bias if people who drop out differ from those who stay.
- Should I use a one-sided or two-sided test?
- Use a two-sided test unless a result in the opposite direction would truly be treated the same as no effect and the choice was made before seeing the data. A one-sided test needs fewer participants (51 rather than 64 per group for d = 0.5) but most journals and reviewers expect two-sided tests.
- How do I convert eta squared to Cohen’s f?
- Cohen’s f = √(η² / (1 − η²)). An eta squared of 0.06 gives f ≈ 0.25, Cohen’s medium effect for ANOVA. Partial eta squared from software output for a one-way design can be converted the same way; for designs with several factors, check which variance the reported value uses before converting.
- How is this different from a sample size calculator for surveys?
- A survey sample size calculator sets the precision of one estimate, such as a proportion to within ±5 percentage points. A power analysis sets the sample size needed to detect a difference or association with a stated probability. Use the Journal Metrics sample size calculator for survey precision and this calculator for hypothesis tests.
- Are my inputs stored or sent anywhere?
- No. The calculator runs in your browser and does not ask for research data, files or an account. Your inputs are not put into the page address and are not saved.
Sources
- Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988. Effect size definitions, benchmarks and the correlation method.
- Cohen J. A power primer. Psychol Bull. 1992;112(1):155–159.
- Faul F, Erdfelder E, Lang AG, Buchner A. G*Power 3: a flexible statistical power analysis program for the social, behavioral, and biomedical sciences. Behav Res Methods. 2007;39(2):175–191. Cited for the method comparison; G*Power is developed at Heinrich Heine University Düsseldorf.
- Lenth RV. Algorithm AS 243: cumulative distribution function of the non-central t distribution. J R Stat Soc Ser C Appl Stat. 1989;38(1):185–189.
- Champely S. pwr: Basic Functions for Power Analysis. R package, CRAN.
- Fleiss JL, Levin B, Paik MC. Statistical Methods for Rates and Proportions. 3rd ed. Hoboken, NJ: John Wiley & Sons; 2003. Sample size for comparing two proportions.
- Hoenig JM, Heisey DM. The abuse of power: the pervasive fallacy of power calculations for data analysis. Am Stat. 2001;55(1):19–24.
- Lakens D. Sample size justification. Collabra Psychol. 2022;8(1):33267.
Content updated October 26, 2026. Examples are illustrative and use no real study data.