Math
Sample Size Calculator
Enter the margin of error you want and the size of the group you are studying.
The formula
n = z² × p × (1 − p) ÷ margin²
with a finite population: n ÷ (1 + (n − 1) ÷ population)
Worked example
±5% at 95% confidence, on a population large enough to ignore
- 1.95996² × 0.5 × 0.5 = 0.9604
- 0.9604 ÷ 0.05² = 384.1
- Round up: 385 responses
Where this goes wrong
Sizing the sample to the population
A national survey and a city survey need almost the same number of responses. Above roughly 20,000 people the population barely enters the arithmetic: 385 responses give ±5% whether you are studying a town of 50,000 or a country of 50 million. The instinct to sample a fixed percentage is what makes surveys needlessly expensive.
Questions
- Why does the expected proportion change the answer?
- Because variance peaks at 50-50. If you already know a result will land near 90-10, you need fewer responses to pin it down. Using 50% when you are unsure is the conservative choice — it never underestimates.
- When does the population size start to matter?
- When your sample would be a meaningful share of it. Surveying 385 people out of 1,000 is a third of them, and the correction cuts the requirement to 278. Out of a million, the correction changes nothing.
- Does this account for people not responding?
- No. This is the number of completed responses you need. If a third of people you approach reply, you have to contact three times as many — and non-response is rarely random, which is a bigger problem than the arithmetic.