Sample Size & Power Calculator

Sample size to compare two means or two proportions at a chosen power, survey sample size for a margin of error with finite-population correction, and the power achieved by an existing n.

The Sample Size Calculator gives the number of subjects per group needed to detect a difference δ between means with standard deviation σ (n = 2[(z_α + z_β)σ/δ]²), between two proportions, or to estimate a proportion within a margin of error (n = z²p(1 − p)/e², with finite-population correction), plus the statistical power for a given n.

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

How to use it

  1. Choose the design.
  2. Enter the effect you want to detect and the variability.
  3. Set α and power.
  4. Read n per group; inflate for dropout.

What you enter

What you get

Formula

n = 2 [ (z₁₋α/₂ + z₁₋β) · σ / δ ]²   |   n = z² p(1−p) / e²   |   n_fpc = n / (1 + (n − 1)/N)

Larger effects, smaller variability, higher α or lower power all reduce the required n. Power 0.80 and α 0.05 (two-sided) are conventional defaults.

Worked example

Input: δ = 5, σ = 10, α = 0.05 two-sided, power 0.80

Result: n = 63 per group (126 total)

Standardised effect 0.5 (medium) needs about 63 subjects per arm.

Questions

What power should I use?

0.80 is the conventional minimum; 0.90 is common for confirmatory trials. Higher power needs more subjects.

How do I choose the difference to detect?

Use the smallest difference that would matter scientifically or clinically, and the SD from a pilot study or the literature.

How many animals do I need?

Use the compare-means mode with the expected difference and SD from pilot data; ethics committees expect this calculation in the protocol.

Limitations

References

Related reading

More Statistics

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