Skip to content

Statistical Power & Sample Size Calculator

Work out how many participants a study needs — or how much power a planned sample gives — for an independent or paired t-test or a comparison of two proportions. Exact noncentral-t calculations that match G*Power, with a power curve. Free, no sign-up.

Test
Solve for

Base d on earlier studies or the smallest difference that would matter. Cohen's 0.2 / 0.5 / 0.8 are a last resort.

Results

64

Per group

128

Total sample size

0.8015

Power achieved

1.9790

Critical t on 126 df

2.8284

Noncentrality δ

With 64 participants per group, a two-tailed independent-samples t-test at α = 0.05 has 80.1% power to detect an effect of d = 0.5.

Power curve

Power

Sample size per group

How to Use the Statistical Power & Sample Size Calculator

  1. 1. Choose the test. Two independent means (an independent-samples t-test with equal groups), paired or one-sample means (a paired t-test), or two independent proportions.
  2. 2. Decide what to solve for. Sample size, given the power you want — the usual question when planning — or power, given the sample you can get.
  3. 3. Enter the effect size and settings. Cohen's d for the t-tests, or the two proportions you expect for the proportions test; then α (usually .05), one or two tails, and the target power (usually .80) or the sample size.
  4. 4. Read the answer. The sample size per group, rounded up, with the power it actually achieves; the critical value and noncentrality behind it; and a power curve showing how power grows with n.

How Power Is Calculated

Power is the probability that a test rejects the null hypothesis when a specific alternative is true: 1 − β, where β is the rate of type II errors (false negatives). It depends on four quantities — the effect size, the sample size, α, and the number of tails. Fix any three and the fourth follows.

For the t-tests the calculator uses the exact noncentral t distribution, the method behind G*Power and R's power.t.test. When the true standardised difference is d, the t statistic follows a noncentral t distribution T′ with noncentrality δ, and power is the chance that T′ lands beyond the critical value.

Power formulas by design
DesigndfNoncentralityPower, two-tailed
Independent groups, n per group2n − 2δ = d √(n/2)P(T′ > c) + P(T′ < −c)
Paired or one-sample, n pairsn − 1δ = d √nP(T′ > c) + P(T′ < −c)
Two proportions, n per group—h √(n/2), with h = 2 arcsin √p₁ − 2 arcsin √p₂Φ(h √(n/2) − z) + Φ(−h √(n/2) − z)

c is the critical t for α (α/2 in each tail when two-tailed) and z the matching normal critical value. One-tailed power keeps only the first term.

Sample size is found by searching for the smallest whole n whose power reaches the target, so the power reported is what that n actually delivers — usually a little above the target.

Worked Example: How Many Participants Per Group?

You plan to compare two independent groups and expect a medium effect, d = 0.5. With α = .05 two-tailed and a target power of .80, the calculator returns 64 per group, 128 in total, with an achieved power of 0.8015 — the figure G*Power gives. The critical t on 126 df is 1.9790 and the noncentrality is δ = 0.5 × √32 = 2.8284.

Change one input at a time to see the trade-offs. A large effect, d = 0.8, needs only 26 per group; a small one, d = 0.2, needs 394. Raising the target power to .90 takes the medium-effect study to 86 per group. A paired design is far more efficient: d = 0.5 needs 34 pairs. Run the other way, a study with 30 per group has a power of only 0.4779 for d = 0.5 — worse than a coin toss.

For proportions, detecting a fall from 50% to 35% (h = 0.3047) with 80% power at α = .05 two-tailed needs 170 per group.

Choosing an effect size

  • Prefer evidence. Use the effect from a meta-analysis or several earlier studies, or the smallest effect that would matter in practice — the smallest effect size of interest.
  • Distrust pilot studies. A pilot's d comes from a handful of people, so it is noisy, and a pilot that looked promising enough to follow up usually overstates the effect. Sizing the main study from it tends to leave it underpowered.
  • Use Cohen's conventions last. Cohen (1988) called d = 0.2, 0.5 and 0.8 small, medium and large, with the same cut-offs for h, but offered them only for when nothing better is known. What counts as large differs from field to field.
  • Plan for dropout. The n here is the number of complete cases you need. If you expect 15% attrition, recruit n ÷ 0.85.

Frequently Asked Questions

What sample size do I need for a t-test?
It depends on the effect you want to detect, α, the tails and the power you want. For an independent-samples t-test at α = .05 two-tailed with 80% power, you need 26 per group for d = 0.8, 64 per group for d = 0.5, and 394 per group for d = 0.2. Enter your own values for the exact figure.
What is statistical power?
Power is the probability that a study detects an effect that really exists — that its test comes out significant when the alternative hypothesis is true. It equals 1 − β, where β is the probability of a type II error. A power of .80 means a true effect of the assumed size would be missed one time in five.
Why is 80% power the standard?
It is a convention from Cohen (1988), who judged a 4:1 ratio of type II to type I error risk — β = .20 against α = .05 — reasonable for most research. Many funders and journals now ask for 90%, especially for confirmatory or clinical studies, so treat 80% as a minimum rather than a target.
Does this calculator give the same answers as G*Power?
For the t-tests, yes: both use the exact noncentral t distribution, so d = 0.5 at α = .05 two-tailed and 80% power gives 64 per group in both, and d = 0.8 gives 26. The two-proportion calculation follows R's pwr package (Cohen's h with a normal approximation); G*Power's exact proportion tests can differ by a few participants.
What is the noncentrality parameter?
It measures how far, in standard-error units, the true effect pushes the test statistic away from zero. For two independent groups δ = d √(n/2); for paired data δ = d √n. Power rises with δ, which is why it rises with both the effect size and the square root of the sample size.
Should I run a power analysis after the study?
Not to explain a non-significant result. "Observed power" computed from the effect you found is a direct function of the p-value and adds no new information. Report the effect size with its confidence interval instead, and use power analysis to plan the next study.

Related Tools

More in Statistics Calculators

See all Statistics Calculators