Skip to content
Math & Statisticsstatistics

Sample Size Calculator

Sample size for a survey, with the finite population correction. Precision costs quadratically: halving the margin of error needs four times the sample, which is why national polls stop at around a thousand.

Also called: survey sample size, how many respondents.

%
%
%
%
Sample size needed
385

385 responses for a margin of error of 5% at 95% confidence. At a 100% response rate you would need to contact 385. Treated as a very large population, where the correction makes no difference. A 3% margin would need 1068 and a 1% margin 9604, because the sample scales with the inverse square of the margin.

People to contact
385
Without the population correction
385
For a 3% margin
1,068
For a 1% margin
9,604
Margin of error with 1,000 responses
3.1
On population size
Treated as a very large population, where the correction makes no difference.
On the cost of precision
A 3% margin would need 1068 and a 1% margin 9604, because the sample scales with the inverse square of the margin.
Method and background

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.

sample size depends on the margin squared, so halving the margin quadruples the sample
e
Margin of error
N
Population size

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 example

a 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 example

Method 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 · United States · 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.