How sample size works
You cannot ask everyone. So you ask some people, and then you have to decide how much to trust what they told you. Sample size is the arithmetic that connects those two things: how many responses you gather, and how tight a bracket you can honestly put around the answer.
Two dials control it. Margin of error is how wide that bracket is, and confidence level is how often the bracket is expected to contain the truth. Say 60 percent of your sample said yes, with a margin of error of 4 points at 95 percent confidence. The honest sentence is: the real figure is probably between 56 and 64 percent, and if you ran this same survey twenty times, you would expect about nineteen of those brackets to contain the true number and one to miss it entirely.
The formula
Where z comes from your confidence level (1.96 for 95 percent), p is the result you expect as a decimal, and e is your margin of error as a decimal. If you know your population size N, a second step trims the answer:
That is the finite population correction, and it is the piece that leads to the strangest result on this page.
Worked example
A standard survey. You want 95 percent confidence and a margin of error of plus or minus 5 points. You have no idea what people will say, so you leave the expected result at 50 percent.
n = 1.962 × 0.5 × 0.5 ÷ 0.052
n = 3.8415 × 0.25 ÷ 0.0025
n = 0.9604 ÷ 0.0025 = 384.1, so 385 responses
Now tighten the margin to plus or minus 2.5 points, which is merely twice as precise. The requirement jumps to 1,537 responses. Twice the precision cost four times the work.
The population almost does not matter
This is the result that stops people, and it is worth sitting with, because it is the reason a national poll of 1,000 people is not the absurdity it looks like.
Here is the same survey, 95 percent confidence and plus or minus 5 points, run against populations of wildly different sizes:
| Population | Responses needed |
|---|---|
| 1,000 | 278 |
| 10,000 | 370 |
| 100,000 | 383 |
| 1,000,000 | 384 |
| 100,000,000 | 385 |
Go from a city of 100,000 to a continent of 100,000,000, a population a thousand times larger, and you need two more people.
The reason is that precision comes from the absolute number of people you asked, not from what fraction of the whole they are. A spoonful tells you about the soup whether the pot holds a litre or fills a bathtub, provided somebody stirred it. That last clause is doing enormous work, and we come back to it below.
Population size only bites when your sample would be a serious slice of it, roughly 5 percent or more, which is why the 1,000-person row above is genuinely lower. Below that, you can ignore it.
Why halving the margin quadruples the sample
Look at where e sits in the formula: on the bottom, squared. Halve it and you divide by a quarter as much, so n goes up four times. Precision improves with the square root of your sample, which means the returns get punishing quickly:
| Margin of error | Responses | Cost vs the row above |
|---|---|---|
| ±10 points | 97 | |
| ±5 points | 385 | 4 times |
| ±2.5 points | 1,537 | 4 times |
| ±1 point | 9,604 | 6.2 times |
This is the law of large numbers doing its work, and it is worth being precise about what that law promises. It says your sample average converges on the truth as the sample grows. It does not say that a run of odd responses will be corrected by opposite ones later: nothing is owed and nothing is due. The average settles down simply because early noise gets diluted by a growing pile of ordinary results, not because the universe balances the books.
What a bigger sample cannot fix
Every number on this page assumes one thing that real surveys struggle to deliver: that the people who answered are like the people who did not. That is the stirring in the soup analogy, and it is where survey accuracy usually goes wrong, not in the arithmetic.
If the people who respond to you differ systematically from those who ignore you, and they generally do, then more responses buy you a more precise measurement of a biased sample. The bracket gets narrower and stays in the wrong place. There is no sample size that fixes this, which is why professional pollsters spend far more effort on reaching the right people than on reaching more of them.
None of this makes the arithmetic pointless. It makes it the easy half, done first, so you can spend your attention on the hard half. Work out the number you need, then ask yourself who is likely to be missing from it. Once your responses are in, the confidence interval calculator turns them back into the bracket this page was planning for.