Saved

Press the star next to a tool's name to save it.

All my tools

Power Analysis Calculator

Use this power analysis calculator to find the sample size, power or smallest detectable effect size for comparing means, for one or two groups and one- or two-sided tests.

Restored your last values ·

Enter an effect size d, the significance level and the power to get the sample size for each group. Or enter the sample size and d to get the power, or the sample size to get the smallest effect size that you can detect. The calculation uses the normal approximation.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose what to work out, fill in the boxes, then press Calculate.

See full result

A power analysis calculator tells you how many people or observations you need to detect an effect of a given size, how much power a planned sample has, or how small an effect your sample could find. Enter the effect size, the significance level and the power, and it gives the sample size for a comparison of means.

How to use the power analysis calculator

  1. Choose sample size needed, power or smallest detectable effect, and the design: two groups or one group, two-sided or one-sided.
  2. Enter the effect size d, and leave α and power blank to use 0.05 and 0.80, or enter your own.
  3. Press Calculate.

What power is

The Wikipedia article on statistical power defines power as the probability that a test correctly rejects the null hypothesis when the alternative is true, written 1 − β, where β is the probability of a type II error.[1] It describes α as the probability of rejecting the null hypothesis when it is true, usually set at 0.05, and says that many researchers and funding bodies treat 0.80 as a standard for adequacy, though there are no formal standards.[1] More data tends to give more power, and so does a larger effect.[1]

The effect size

The article on effect size defines Cohen's d as the difference between two means divided by a standard deviation, d = (x̄1 − x̄2) ÷ s.[3] It lists Cohen's benchmarks of 0.20 for small, 0.50 for medium and 0.80 for large, and quotes Cohen's warning that these labels are relative to the field of study.[3] Choose d from earlier studies or from the smallest difference that matters in practice, not from the labels alone.

The sample size formula

For two groups and a two-sided test, the number per group is 2 × (z for α ÷ 2 + z for power) squared ÷ d squared. With α = 0.05 and power 0.80 the z values are 1.960 and 0.842. For d = 0.5 this gives 2 × 7.849 ÷ 0.25 = 62.8, so 63 per group. This formula is our own working with the normal approximation; the pages we read give a one-sample version and a rule of thumb, not this form. For a single group, drop the factor of 2.

Checking against the page

The sample size page gives a table of numbers per group for a two-sample test at α = 0.05: at power 0.80, 393 for d = 0.2, 64 for d = 0.5 and 26 for d = 0.8; at power 0.90, 526, 85 and 34.[2] The calculator gives 393, 63 and 25 at power 0.80. The small differences for the larger effects are the cost of the normal approximation, and the page does not say how its table was computed. The page for power gives a rough rule of thumb for a two-sample t-test of n ≈ 16 s² ÷ d² per group, at 80 percent power and α = 0.05, replacing 16 by 8 for one sample.[1] With d as the effect in standard deviations the rule gives 64 for d = 0.5, and the calculator shows it as a check.

One-sample and paired tests

The power page works an example for a one-sided paired test with a mean difference of 1, a standard deviation of 2, α = 0.05 and power 0.8. The normal approximation gives n above 4 × (1.64 + 0.84) squared, about 24.6, and a simulation at n = 25 gave a power of about 0.78, a gap that the page attributes to the normal approximation.[1] In the calculator, enter d = 0.5, choose one group and a one-sided test, and it gives 25. The sample size page also gives n ≥ (zα + zβ) squared × σ² ÷ μ² for a one-sided one-sample test of a mean.[2]

Power and the smallest detectable effect

Choose power to find the power of a sample size you already have, and smallest detectable effect to find the d that your sample can detect at the power you chose. With 63 per group, the calculator shows a power of about 80 percent for d = 0.5, and a smallest detectable d of about 0.50. These come from rearranging the same formula.

Cautions

The power page says that many statisticians have argued that post-hoc power calculations are misleading and essentially meaningless, and that a full power analysis should always be performed instead of relying on the rule of thumb.[1] It also says that numbers of participants are preferably rounded up.[2] Allow for dropouts by adding a margin to the number that the calculator shows.

A worked example

You plan to compare two teaching methods and expect a difference of 4 points on a test where the standard deviation is 8. The effect size is d = 4 ÷ 8 = 0.5. At α = 0.05 and power 0.80 the calculator gives 63 per group, or 126 students in all. If you could only recruit 40 per group, the power would be about 61 percent, and the smallest effect that you could detect with 80 percent power would be d = 0.63. These figures are our own calculations, and they show how a limited sample forces a trade between power and the size of the effect.

Reporting a power analysis

State the test, the effect size and where it came from, the significance level, the power, the sample size and the software or method, here the normal approximation. Report the analysis before collecting data. If the observed effect later differs, do not recompute the power from it; report the confidence interval of the effect instead.

Common mistakes

  • Taking d from the labels. A medium effect in one field may be large in another.
  • Confusing per-group and total. The two-group result is per group.
  • Forgetting dropouts. Plan for some loss of data.

What next

Use this often? Add Power Analys to your Home screen.

Frequently asked questions

What is a power analysis calculator?

A tool that links the sample size, effect size, significance level and power of a test, so that you can find any one of them from the others.

What is statistical power?

The probability that a test correctly rejects the null hypothesis when the alternative is true, 1 − β. A common target is 0.80.

How do I find the sample size for a given effect size?

For two groups: n per group = 2 × (z for α ÷ 2 + z for power)² ÷ d². At α = 0.05 and power 0.80, d = 0.5 needs about 63 per group.

What are small, medium and large effect sizes?

Cohen's benchmarks for d are 0.2, 0.5 and 0.8, but the labels depend on the field.

Is the result exact?

No. It uses the normal approximation, which slightly understates the sample size needed for a t-test.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools