Power Analysis Calculator — Sample Size, Power & Effect Size

Power Analysis Calculator

Work out how many participants a study needs, how much power a planned sample gives you, or the smallest effect you can reliably detect. Works for means and proportions, in one or two groups.

Power = 1 − β, the chance of detecting a real effect

—

What do you want to find?

Study design

Outcome

How to Use This Calculator

  1. Choose what to solve for: the sample size you need, the power of a design you already have, or the smallest effect your sample can detect.
  2. Pick the design (two groups, or one group against a known value) and the outcome (yes/no proportions, or measured means).
  3. Enter the expected values, such as the two incidences, or the two means and standard deviations. Use the smallest difference that would matter in practice, not the one you hope to see.
  4. Set the significance level, the one- or two-sided test, and the target power (80% is the usual minimum). Press Calculate.
  5. Check the power curve and the table. If the required sample is out of reach, a larger effect, a higher α, or lower power will shrink it, and each has a cost.

What Is Power Analysis?

A power analysis calculator determines the sample size needed to detect a specified effect in a statistical hypothesis test. It uses statistical power, significance level, effect size, and test parameters. Researchers commonly use 80% or 90% statistical power and a 5% significance level to calculate sample sizes and reduce the risk of Type II errors.

Power analysis links four quantities: the sample size, the effect size, the significance level α, and the power. Fix any three and the fourth follows, so the calculator can also solve for power or for the smallest detectable effect.

Statistical power is the probability that a test rejects the null hypothesis when a real effect exists. It equals 1 − β, where β is the chance of a Type II error, a missed effect. A study with too little power often ends inconclusive; a study with far too much can flag effects too small to matter.

α

Chance of a false positive. Usually 0.05.

β

Chance of a false negative. Usually 0.20 or lower.

1 − β

Power. Usually 80% to 90% or more.

Definition reference: Wikipedia — Power of a test.

Power Analysis Formulas

Power

Power = 1 − β

β is the probability of a Type II error.

Effect size (means)

d = (μ₁ − μ₂) ÷ s

Cohen's d. s is the pooled standard deviation, or the sample SD for one group.

Effect size (proportions)

h = 2·asin√p₁ − 2·asin√p₂

Cohen's h, for comparing two proportions.

Sample size, one mean (z-test)

n = ((zα + zβ) · σ ÷ δ)²

δ is the difference to detect. Use zα/2 for a two-sided test. For two groups of equal size, n per group = 2 × this value with δ the difference in means.

Sample size, two proportions

n per group = [zα√(2p̄q̄) + zβ√(p₁q₁ + p₂q₂)]² ÷ (p₁ − p₂)²

p̄ is the average of p₁ and p₂, and q = 1 − p. Equal groups.

For t-tests, this calculator does not stop at the normal approximation. It computes the exact power from the noncentral t distribution and finds the smallest whole sample size that reaches your target, so the result is slightly larger than the z formula for small studies.

Derivation: Penn State STAT 415 — Power Functions and Sample Size for Tests of Means.

Worked Example 1: Sample Size for Two Proportions

A gene variant is expected in 30% of a disease group and 15% of controls. How many people per group are needed at α = 0.05 (two-sided) and 80% power?

  • Critical values: zα/2 = 1.9600 and zβ = 0.8416. The average proportion is p̄ = 0.225.
  • Formula: n = [1.96 × √(2 × 0.225 × 0.775) + 0.8416 × √(0.21 + 0.1275)]² ÷ 0.15² = 120.5.
  • Round up to 121 per group, or 242 in total.

Worked Example 2: Sample Size for Two Means

A blood-pressure drug is expected to lower systolic pressure by 5 mmHg. The standard deviation is 12 mmHg in both groups. Use α = 0.05 (two-sided) and 80% power.

  • Effect size: d = 5 ÷ 12 = 0.4167.
  • Normal approximation: n = 2 × ((1.96 + 0.8416) × 12 ÷ 5)² = 90.4, so 91 per group.
  • t-test: because σ is estimated from the data, the exact search needs 92 per group (184 in total).

Worked Example 3: Power of a Fixed Design

With 50 people per group and a medium effect (d = 0.5), a two-sided t-test at α = 0.05 has power of about 69.7%. That is below the usual 80%, so a larger sample (64 per group) would be needed.

What Changes the Required Sample Size

Four levers decide how many participants you need. Moving any one of them moves the others.

FactorIf it increasesEffect on powerEffect on required n
Effect sizeBigger difference to detectRisesFalls sharply
Variability (SD)More spread in the dataFallsRises
Significance level (α)Looser test (0.01 to 0.05)RisesFalls
Target powerHigher demand (80% to 90%)By definition, higherRises
Sample sizeMore participantsRises—
One-sided testTest one direction onlyRises (in that direction)Falls about 20%

Halving the effect you want to detect roughly quadruples the sample, because n depends on the square of the difference.

Sample Size per Group by Effect Size

Two-sample t-test, two-sided, α = 0.05, equal groups. Cohen's rough labels are 0.2 for small, 0.5 for medium, and 0.8 for large.

Cohen's dLabel80% power90% power
0.2Small394527
0.5Medium6486
0.8Large2634

Cohen himself warned that the labels depend on the field. Use an effect size grounded in earlier studies or in the smallest difference that would matter in practice.

Effect size conventions: Wikipedia — Effect size.

Frequently Asked Questions

What is power analysis?

Power analysis is a method used in a hypothesis test to work out how many participants a research study needs. It connects the sample size, the effect size, the significance level, and the statistical power, so that if you know three you can solve for the fourth. Researchers run it at the study design stage, before the experiment starts, and a power analysis calculator like this one does the arithmetic for comparing two means or two proportions. The same logic extends to ANOVA, correlation, and regression, but those designs need their own formulas.

What is the formula for power?

Statistical power = 1 − β, where β (beta) is the probability of a Type II error, or a false negative. In other words, power is the probability of rejecting the null hypothesis when the alternative hypothesis is true. The value of β in turn depends on the effect size, the standard deviation (or variance), the sample size, and α, which is why there is no single formula without those inputs. In a z-test, you compare where the test statistic falls under the alternative hypothesis with the critical value set by the null hypothesis.

How do I calculate an effect size?

For the mean difference between two groups, divide it by the pooled standard deviation (Cohen's d). For one sample against a known population value, divide the difference by the sample standard deviation. For two proportions, use Cohen's h, which applies an arcsine transformation to each proportion. An odds ratio is another common way to express an effect for yes/no outcomes, but this calculator works directly from the two proportions. The calculator shows the effect size it used.

What power level should I aim for?

80% is the common minimum. It means a one-in-five chance of a Type II error, a missed real effect. Use 90% or higher when a miss is costly, such as in a clinical trial. Higher power gives the test more sensitivity, but each step up needs a larger sample: going from 80% to 90% adds roughly a third more participants. If your sample size is already fixed, solve for the minimum detectable effect instead, which is the smallest effect the design can pick up reliably.

How many subjects do I need to detect a 10% difference?

It depends on the starting rate and the spread, so there is no single answer. For proportions of 30% and 20% at α = 0.05 and 80% power, you need about 294 per group. For 50% and 40% you need about 388 per group, because rates near 50% are noisier. These figures assume equal groups (an allocation ratio of 1); unequal group sizes raise the total you need.

What is the difference between α and β?

Alpha (α) is the significance level, the probability of a Type I error: concluding there is an effect when there is none. Beta (β) is the probability of a Type II error: missing an effect that is there. Lowering α makes false positives rarer but, for a fixed sample, raises β and lowers power. The confidence level is simply 1 − α, so a 95% confidence level goes with α = 0.05, and a result is called statistically significant only when it clears that threshold.

Should I use a one-sided or two-sided test, and a z-test or t-test?

Use a two-tailed test (two-sided) unless you would truly ignore an effect in the opposite direction; a one-tailed test (one-sided) needs about 20% fewer participants because its critical value is smaller, but it cannot detect that opposite effect. Use a t-test when you estimate the standard deviation from data, which is the usual case, and a z-test only when σ is known or the sample is very large.

Can I run a power analysis after the study is finished?

Power analysis is meant to be done before data collection. Computing power afterwards from the observed effect adds nothing: it is just a restatement of the p-value, and many statisticians consider it misleading. After the study, report the confidence interval of the effect instead; its width shows the precision of your estimate, and it can guide the sample size of the next study.

Other Useful Calculators

Disclaimer: This calculator is for educational, informational, and planning use. Sample sizes are for the simple designs shown: independent observations, a normal approximation for proportions, and a t or z test for means. Real studies may need adjustments for dropout, clustering, multiple comparisons, or non-normal data. The result is only as good as the expected effect and standard deviation you enter. For clinical, regulatory, or other consequential research, consult a qualified statistician.

Last updated: October 8, 2026