Work out how many responses a survey or study needs to hit a target margin of error, for a percentage or an average, with a correction for small populations.
n = z² p(1 − p) ÷ E²
Leave the expected percentage at 50% if you don’t know it: that gives the largest, safest sample.
A sample size calculation tells you how many people to survey (or items to measure) so your result lands within a chosen distance of the truth, most of the time. That distance is the margin of error; "most of the time" is the confidence level.
The surprising part is that, for large populations, the answer barely depends on population size. About 1,068 random responses give ±3% at 95% confidence whether you're surveying a town or a whole country.
Population size only matters when the sample is a sizeable share of it, such as surveying a company of 500 staff. The finite population correction then trims the number needed.
As given in Cochran, Sampling Techniques, chapter 4, and the NIST/SEMATECH e-Handbook, section 7.2.2.2. See Sources.
p(1 − p) is largest at p = 0.5, which is why 50% is the safe default.
The population correction saves nearly 190 responses compared with the 1,068 a national poll would need. The margin still only covers random error: a survey that only keen staff answer can be precise and wrong.
For a percentage near 50% in a large population. Halving the margin quadruples the sample.
| Margin | 90% | 95% | 99% |
|---|---|---|---|
| ±10% | 68 | 97 | 166 |
| ±5% | 271 | 385 | 664 |
| ±3% | 752 | 1,068 | 1,844 |
| ±2% | 1,691 | 2,401 | 4,147 |
| ±1% | 6,764 | 9,604 | 16,588 |
Because 1,000 random respondents give roughly ±3% at 95% confidence, whatever the country’s size, and going much further costs a lot for little gain.
p(1 − p) is largest at 50%, so it gives the biggest sample. If the truth is nearer 10% or 90%, you’ll end up more precise than planned.
When the sample would be more than about 5% of the population. Below that, the correction makes little difference.
95% is standard. 99% needs about 70% more responses for the same margin.
Not directly. Comparing groups needs a power calculation; use the power analysis calculator.
Report the larger margin of error you actually achieved. The margin of error calculator works it out from your real sample.
From a pilot study, earlier surveys, or roughly range ÷ 4 if you know the typical spread.
No. It covers only random sampling error. Bias from wording, coverage or who answers needs separate attention.
Related Tools
Estimate population parameters.
Survey accuracy measure.
Single parameter value.
Sampling variability.
Sample statistic distribution.
Sample vs population difference.