For the two-sample test, n is the number per group (total 2n). Power uses the exact noncentral t-distribution.
Power is computed with the exact noncentral t-distribution, not the normal approximation. That is why the exact sample size for d = 0.2 at 80% power is 394 per group, not the 393 in Cohen’s printed tables.
The statistical power calculator solves for power, sample size, effect size or alpha for t-tests, with exact noncentral-t maths instead of the normal approximation most tools use. Enter any three values and solve for the fourth, then read the power curve to see how power grows with n.
What is statistical power?
Statistical power is the probability that a test rejects the null hypothesis when the alternative is true โ in plain terms, the chance of detecting a real effect. If a test has power 0.80, it will find a real effect of the stated size four times out of five; one time in five it will miss it. That miss rate is the Type II error rate, β = 1 − power. Power is set by four things: the effect size (Cohen’s d), the sample size (n), the significance level (α) and whether the test is one- or two-sided. The companion article on Type I and Type II errors explains α and β in full.
A study with low power is a gamble: even a real effect is likely to come back non-significant, and a non-significant result then says almost nothing. That is why power is planned before data are collected, not checked afterwards. The calculator on this page solves for any one of power, sample size, effect size or α, so you can plan the study or check a design you already have.
How to use the statistical power calculator
Choose the test first: a two-sample t-test (two independent groups, n per group) or a one-sample t-test (one sample against a known value). Then choose what to solve for:
- Power โ enter d, n and α to find the power.
- Sample size (n) โ enter d, α and the target power to find the n you need.
- Effect size (d) โ enter n, α and the target power to find the smallest effect you can reliably detect.
- Alpha (α) โ enter d, n and the target power to find the significance level that would give that power.
Pick one- or two-sided tails (two-sided is the default), then read the headline answer, the degrees of freedom, the noncentrality parameter δ, the critical t* and the Type II error rate. The power curve shows how power grows with n for your d and α, with the 80% line and your current n marked. The worked steps show every number in the calculation.
Try it now: d = 0.5, n = 64 per group, α = 0.05 two-sided gives power 0.8015. Solve for n with the same d and α at 80% power and the calculator returns n = 64 per group.
The exact noncentral-t calculation
Power for a t-test comes from the noncentral t-distribution. Under the alternative hypothesis the t statistic does not follow the ordinary (central) t-distribution: it is shifted by the noncentrality parameter δ, which measures how far the true effect pushes the statistic away from zero.
- Two-sample test: df = 2n − 2 and δ = d√(n/2).
- One-sample test: df = n − 1 and δ = d√n.
For a two-sided test at level α, let t* be the critical value (the 1 − α/2 quantile of the central t-distribution with the same df). Power is then P(|T| > t*) where T follows the noncentral t-distribution with that df and δ. For a one-sided test, power is P(T > t*) with t* the 1 − α quantile. This calculator evaluates that probability with the exact noncentral t-distribution โ it does not use the normal approximation. The normal approximation (used by most rival tools, and by Cohen’s printed tables) gives slightly different sample sizes; the exact answer is the one to trust, and the worked example below shows the difference is real.
Worked examples
Example 1 โ Cohen’s classic medium effect (two-sample)
d = 0.5, n = 64 per group, α = 0.05 two-sided. Degrees of freedom df = 2 × 64 − 2 = 126, noncentrality δ = 0.5 × √32 = 2.8284, critical t* = 1.9790. Power = 1 − F(1.9790) + F(−1.9790) = 0.8015, and β = 0.1985. This is the textbook case: a medium effect needs 64 people per group for 80% power.
Example 2 โ a large effect (two-sample)
d = 0.8, n = 26 per group, α = 0.05 two-sided. df = 50, δ = 0.8 × √13 = 2.8844, t* = 2.0086. Power = 0.8075. A large effect is cheap to detect: 26 per group is enough for 80% power.
Example 3 โ solving for n
At α = 0.05 two-sided and 80% target power, the sample sizes are:
| Effect size (d) | n per group | Power at that n |
|---|---|---|
| 0.2 (small) | 394 | 0.8006 |
| 0.5 (medium) | 64 | 0.8015 |
| 0.8 (large) | 26 | 0.8075 |
Note the small effect: 394 per group, not 393. At n = 393 the exact power is 0.7996 โ just under 0.80 โ so one more participant per group is needed. The next section explains why the printed tables say 393.
Example 4 โ one-sample test
d = 0.5, n = 34, α = 0.05 two-sided. df = 33, δ = 0.5 × √34 = 2.9155, t* = 2.0345. Power = 0.8078. A one-sample test needs fewer people than a two-sample test for the same effect, because it compares one mean with a known value rather than two noisy means with each other.
Why 394 and not 393?
Cohen’s printed tables give 393 per group for d = 0.2 at 80% power, but the exact noncentral-t answer is 394. The tables were computed with the normal approximation: they replace the t-distribution with a normal curve and round. The approximation is good, but at the boundary it rounds the wrong way. The exact calculation at n = 393 gives power 0.7996 โ four ten-thousandths short of 0.80. A study that needs 80% power cannot stop at 393; it needs 394 per group, where the exact power reaches 0.8006. The difference is one participant per group, but it is the difference between meeting the target and missing it. This page shows the exact answer (394) and says so plainly, rather than repeating the table.
How much power should you aim for?
The usual target is 0.80 โ Cohen’s convention, and the default on this calculator. It means a 20% chance of missing a real effect, which most fields accept as the price of a feasible sample size. Aim higher (0.90 or 0.95) when a miss is costly: a clinical trial, a safety study, or a result that will drive a big decision. Do not aim for 0.99 unless you must โ power rises steeply with n at first and then flattens, so the last few points of power are the most expensive. Read the power curve: it shows exactly where the curve flattens for your effect size, so you can see what each extra participant buys.
Cohen’s benchmarks for d are a starting point, not a law: 0.2 is small, 0.5 is medium, 0.8 is large. Use them when you have no better guess, and use a pilot study or the literature when you do. The effect size guide explains d in full, and the Cohen’s d calculator computes it from your data.
Power is not the same as sample size for a margin of error
Two different questions share the word "sample size". The sample size calculator answers a precision question: how many people do I need so that my estimate is within a stated margin of error? This page answers a detection question: how many people do I need so that my test has a stated chance of rejecting the null when the effect is real? The first is about the width of a confidence interval; the second is about the power of a hypothesis test. They use different maths and give different answers โ do not use one where the other is needed. If you are estimating a mean or a proportion, use the margin-of-error calculator; if you are testing a hypothesis with a t-test, use this one.
Check: the calculator against the test matrix
Every row below was run through the calculator (two-sample, α = 0.05, two-sided). The power values are the exact noncentral-t values.
| Effect size (d) | n per group | Power |
|---|---|---|
| 0.2 | 100 | 0.2906 |
| 0.3 | 50 | 0.3178 |
| 0.5 | 30 | 0.4779 |
| 0.5 | 100 | 0.9404 |
| 1.0 | 20 | 0.8690 |
| 0.2 | 393 | 0.7996 |
The last row is the proof of the 393/394 point: at n = 393 with d = 0.2 the power is 0.7996, just under 0.80, so the exact required n is 394.
Frequently asked questions
What is statistical power?
Statistical power is the probability that a hypothesis test rejects the null hypothesis when the alternative is true โ the chance of detecting a real effect. It equals 1 − β, where β is the Type II error rate. Power of 0.80 means a real effect of the stated size will be found four times out of five. It depends on the effect size, the sample size, the significance level and whether the test is one- or two-sided.
How many participants do I need for 80% power?
It depends on the effect size. For a two-sample t-test at α = 0.05 (two-sided), a small effect (d = 0.2) needs 394 per group, a medium effect (d = 0.5) needs 64 per group, and a large effect (d = 0.8) needs 26 per group. Use the calculator’s "Sample size (n)" mode with your own d and α for an exact answer โ and remember the answer is the exact noncentral-t value, which can differ by one from printed tables.
Why is the exact answer 394 and Cohen’s table says 393?
Cohen’s tables were computed with the normal approximation, which replaces the t-distribution with a normal curve. At d = 0.2 the approximation rounds the required n down to 393, but the exact noncentral-t power at n = 393 is 0.7996 โ just short of 0.80. One more participant per group (n = 394) brings the exact power to 0.8006. The exact answer is 394; the table is an approximation.
What is a good power to aim for?
0.80 is the standard target in most fields โ Cohen’s convention, and the default here. It balances the risk of missing a real effect (20%) against the cost of recruiting. Aim for 0.90 or higher when a miss is expensive, such as a clinical trial or a decision that turns on the result. There is no benefit in chasing 0.99 unless the stakes demand it: the power curve flattens, so the last few points cost many participants.
Source: Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Power on this page is computed with the exact noncentral t-distribution, not the normal approximation.
See all 67 free statistics tools on Empirical Rule Calculators.
Next steps
๐
โ Live
Type I and Type II Errors
The two ways a test can go wrong โ and how ฮฑ and ฮฒ set the power.
Article
Read Article โ
๐งฎ
โ Live
Sample Size Calculator
How many people you need for a stated margin of error โ the precision question.
Calculator
Try Calculator โ
๐งฎ
โ Live
Cohen’s d Calculator
Work out the effect size from your data before you plan the power.
Calculator
Try Calculator โ
More Tools to Explore
Keep going with the tools that pair with power analysis — error rates, effect size, the t-test itself and the sample size.
Type I and Type II Errors
The two ways a test can go wrong — and how α and β set the power.
Sample Size Calculator
How many people you need for a stated margin of error.
Cohen's d Calculator
Work out the effect size from your data — the d that drives power.
Two-Sample t-Test Calculator
Run the two-sample t-test whose power this page plans.
What Is Effect Size?
Cohen’s d explained — small, medium and large, with examples.
Explore All Tools→
Browse all 67 free statistics tools—every calculator on this site in one place.