Sample Size for a Mean

n=(zσE)2n = \left( \frac{z \sigma}{E} \right)^{2}

Worked example: 95% CI, sigma 15, E 2 → n = 216.09 — press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!

Learning zone

Sample Size for a Mean explained

Eσn

Every study design eventually reduces to this line: decide how much error you can live with, decide how confident you want to be, guess the standard deviation, and the sample size falls out. Estimating a mean to within 2 units at 95% confidence when σ ≈ 15 needs n = (1.96 × 15/2)² = 216.09 — always round up, so 217. Rounding down is the classic slip; it leaves you fractionally short of the precision you promised. The σ you plug in is usually borrowed from a pilot study, published literature, or the crude rule that a range spans about four standard deviations.

The square in the formula is the brutal part of research economics. Precision is bought at quadratic cost: tightening E from 2 to 1 in the example above takes the requirement from 217 to 865. Note too that the population size never appears — a well-drawn sample of 1,000 estimates a mean about as well in a city of 100,000 as in a country of 100 million, which is the single most counter-intuitive fact in survey work. Only when the sample is a sizeable fraction of a finite population (over about 5%) does a correction factor start to help you.

Sample Size for a Mean formula

n=(zσE)2n = \left( \frac{z \sigma}{E} \right)^{2}
Where
  • nn= Required sample size
  • zz= Critical z-value
  • σ\sigma= Standard deviation
  • EE= Target margin of error

Missing one of these? Work it out first, then come back