Power Analysis Calculator (Sample Size for t-Tests)

Sample size per group for a target power, or the power of a planned study, from effect size and alpha.

For two groups, n per group ≈ 2(z₁₋α/₂ + z₁₋β)² ÷ d² + z²₁₋α/₂ ÷ 4. Detecting a medium effect (d = 0.5) at α = 0.05 with 80% power needs 2 × (1.96 + 0.84)² ÷ 0.25 + 0.96 ≈ 64 per group, 128 in total.

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Pick two independent groups or a paired/one-sample design.
  2. Enter the expected effect size d, alpha and target power (or your sample size).
  3. Read the sample size per group and in total, or the achieved power.

What you enter

What you get

Formula

Two groups: n = 2(z₁₋α/₂ + z₁₋β)²/d² + z²₁₋α/₂/4 | Paired: n = (z₁₋α/₂ + z₁₋β)²/d² + z²₁₋α/₂/2

Normal approximation with Guenther's (1981) small-sample correction, which reproduces exact noncentral-t sample sizes closely.

Worked example: animal study

Input: Two groups, d = 0.8, α = 0.05, power 80%

Result: 26 per group

A large expected effect keeps the study small; add a margin for losses.

Questions

What is power analysis?

Working out how many subjects you need to have a good chance (usually 80%) of detecting an effect of a given size if it really exists.

What effect size should I use?

Use the smallest effect that would matter, or estimates from pilot data or earlier studies. Without either, Cohen's benchmarks are 0.2 small, 0.5 medium and 0.8 large.

Why is 80% power the standard?

It balances a 20% risk of missing a real effect against cost. Clinical trials often use 90%.

Does a paired design need fewer subjects?

Usually, because each subject is their own control. With d defined on the paired differences, a medium effect needs about 34 pairs rather than 64 per group.

References

Related reading

More Statistics

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.