The formula, and where each piece comes from
n = z² × p × (1 - p) / e²
- z — the z-score corresponding to your desired confidence level (1.96 for 95%, 2.576 for 99%), derived from the normal distribution's quantile function.
- p — the estimated proportion you're measuring (use 50% if genuinely unknown).
- e — your desired margin of error, expressed as a decimal (5% margin = 0.05).
This formula comes directly from the normal approximation to a proportion's sampling distribution — it's asking "how large does my sample need to be so that, at my chosen confidence level, my estimate lands within e of the true value?"
Why 50% is the safest assumption for an unknown proportion
The term p × (1 - p) is maximized exactly at p = 50% (0.5 × 0.5 = 0.25, larger than any other combination like 0.3 × 0.7 = 0.21 or 0.1 × 0.9 = 0.09). Since this term directly drives the required sample size upward, assuming 50% when the true proportion is unknown gives the largest, most conservative sample size estimate — guaranteeing your margin of error holds even in the worst case, rather than under-sampling based on an optimistic guess.
Why the margin of error matters more than people expect
Because e appears squared in the denominator, halving your desired margin of error doesn't double the required sample size — it quadruples it. Going from a 5% margin to a 2.5% margin requires 4× the sample size, not 2×. This nonlinear relationship is exactly why tightening precision requirements gets expensive fast, and why researchers often accept a slightly wider margin of error rather than pay the steep sample-size cost of a marginally tighter one.
5% margin, 95% confidence, p=50%: n ≈ 385
2.5% margin, same confidence/p: n ≈ 1,537 (roughly 4×, not 2×)
The finite population correction
The base formula assumes an effectively infinite (or very large) population. If your actual population is small enough that your sample would represent a meaningful fraction of it, the finite population correction reduces the required sample size:
n_adjusted = n / (1 + (n - 1) / N)
where N is the population size. This correction matters increasingly as your sample size approaches a significant fraction of the population — for a population much larger than your calculated sample size, the correction's effect becomes negligible, which is why it's often skipped entirely for large or effectively unbounded populations.
Common mistakes
- Using an optimistic (non-50%) proportion estimate without strong prior evidence. Unless you have genuine data supporting a different value, 50% is the safe, conservative default.
- Assuming halving the margin of error only doubles the sample size. It roughly quadruples it, since margin of error is squared in the denominator — a common and expensive miscalculation when planning a study's budget.
- Applying the finite population correction to a very large or unknown population. Its effect becomes negligible once the population is much larger than the sample, making it unnecessary overhead in that case.
FAQ
Why does using 50% give the largest required sample size?
Because p×(1-p) is mathematically maximized at p=50%, and this term directly drives the sample size formula upward — assuming 50% is the safe, worst-case choice when the true proportion isn't known.
Does halving my margin of error double my required sample size?
No — it roughly quadruples it, since the margin of error is squared in the denominator of the sample size formula.
When does population size stop affecting the required sample size?
Once the population is much larger than the calculated sample size, the finite population correction's effect becomes negligible — this is why it's commonly omitted for large or effectively unlimited populations.
Calculate your exact required sample size, with or without a finite population correction, using the Sample Size Calculator — entirely in your browser.