How this is calculated
The sample needed depends on the confidence level, the margin of error and how varied the answers are expected to be. The margin enters squared, so going from five percent to two and a half needs four times the responses and from five to one needs twenty-five times. That relationship is why polls cluster around a thousand respondents: it buys about three percent, and buying one percent would cost twenty-five times as much for a precision nobody needs. Population size barely matters once it exceeds about twenty thousand, which surprises people.
Full derivation: Why your A/B test needs so many visitors
Worked examples
Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.
a five percent margin at 95 percent
- Population size, zero if very large
- 0
- Confidence level
- 95%
- Margin of error
- 5%
- Expected proportion
- 50%
- Expected response rate
- 100%
Sample size needed385
1.96 squared times 0.25 over 0.05 squared; the 1% figure is 25 times the 5% one
Open this examplea small population needs far fewer
- Population size, zero if very large
- 500
- Confidence level
- 95%
- Margin of error
- 5%
- Expected proportion
- 50%
- Expected response rate
- 100%
Sample size needed218
boundary: the finite population correction bites at small populations
Open this exampleMethod and limits
What it assumes
- Simple random sampling, which real surveys approximate at best.
What it deliberately does not model
- Non-response bias is usually a larger error than sampling error and no sample size fixes it.
- The fifty percent expected proportion is the conservative default and gives the largest required sample.
- Cluster and stratified designs need a design effect adjustment this does not apply.
Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator
Frequently asked questions
- Why do national polls only survey a thousand people?
- Because precision costs quadratically. A thousand buys about three percent margin, and getting to one percent would need twenty-five thousand for precision that changes no conclusion.
- Does the population size matter?
- Barely, above about twenty thousand. Sampling a city of a million and a country of a billion need almost the same number of responses, which is the least intuitive result in survey design.