Sample Size
calculator.
Work out how many survey replies you need, or the margin your replies give you.
- z value
- 1.96
- Before rounding, n₀
- 384.15
- Invitations at 30% reply
- 1,284
With 385 random replies, about 95% of samples like this one land within 5% of the true share. Halving the margin would take 1,537.
Sample size against margin of error
Drag the pointAt 95% confidence, a sample of 385 gives a margin of ±4.99%. The curve is steep at small margins: the size grows with the square of the precision you ask for. The table of margins gives the same figures.
Plan for who replies
385 completed replies, divided by a 30% reply rate. Both only cover volume. A low reply rate can still bias the answer.
Size at other margins
| 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 |
For an expected share of 50%.
Size at other population sizes
| Population | Sample | Share surveyed |
|---|---|---|
| 100 | 80 | 80% |
| 500 | 218 | 43.6% |
| 1,000 | 278 | 27.8% |
| 10,000 | 370 | 3.7% |
| 100,000 | 383 | 0.4% |
| 1,000,000 | 384 | 0% |
Population size matters only when the sample is a large share of it.
Half the margin
Twice the precision takes about four times the sample, because the margin is squared in the formula.
Working
- 1Find z for 95% confidencez = 1.96
- 2Unrounded size for a sharen₀ =1.96² × 0.5 × 0.50.05²= 384.15
- 3Always round up, so the margin is metSample size = 385
- 4Check: that sample gives a margin inside your target385 gives ±4.99%, within ±5%
How it's worked out
You decide how close the answer must be, called the margin of error , and how sure you want to be, called the confidence level. The confidence level sets , a value from the normal curve: 1.645 at 90%, 1.96 at 95%, and 2.326 at 98%. For a share of people, such as those who would recommend you, the size comes from this formula, where is the share you expect.
For a mean, such as average weight, the spread takes the place of the share. is the standard deviation, which you take from a pilot study, past data or a published figure. NIST notes that this formula needs to be known, so an earlier estimate has to stand in for it.
If you know the population is small, such as 800 staff, the finite population correction reduces the size, because each reply covers more of the group. is the population.
The last step is to round up, always, so the margin is met. This tool keeps unrounded until then, because rounding it early can add a reply you do not need.
Run the other way, the same algebra gives the margin for a sample you already have. The second root is the correction, and you leave it out when the population is very large.
Worked examples
A national poll that wants ±3 points
With no earlier figure to go on, the pollster uses . At 95% confidence, the formula gives 1,067.07 before rounding, so the poll needs 1,068 completed replies. Put that back in the margin formula and you get ±2.999%, just inside the ±3% target.
At 90% confidence the same ±3 points takes only 752, the figure OpenStax reaches in its phone company example. The poll is paying about 316 extra replies for the higher confidence.
Rosa surveys a company of 800
Rosa wants ±5 points at 95% confidence. For a very large group, that takes 385 replies. Her group has 800 people, so the correction brings it down to 260, or 33% of the staff.
She expects 30% to reply, so she has to invite 867. That is more than the 800 she has, so even asking everyone will not get her there. She needs a higher reply rate or a wider margin, and it is better to learn that before sending anything.
Average weight to within 1 kg
Past data put the standard deviation at about 8 kg, and the target is ±1 kg at 95% confidence. The formula gives 245.85, which rounds up to 246 people. If the spread turns out larger than 8 kg, the real margin will be wider than 1 kg, so a cautious planner rounds the 8 up.
Reading your result
The size grows with the square of the precision. Halving the margin from ±5% to ±2.5% takes the size from 385 to 1,537, about four times as many. The reverse holds as well: 400 replies give ±4.9%, and 1,000 replies only narrow that to ±3.1%.
Confidence costs less than precision. Going from 95% to 99% takes ±5 points from 385 to 664 replies, because rises from about 1.96 to 2.58 and is squared.
The margin applies to the whole sample. Pew Research Center gives the example of a 1,067-person poll, good for about ±3 points, with a subgroup of about 160 at about ±8. This tool gives ±3% and ±7.7% for those sizes. Pew adds that the margin for the gap between two candidates is about twice the margin for one.
Population size stops mattering quickly. At ±5% and 95% confidence, a population of 500 needs 218, 1,000 needs 278, 10,000 needs 370, 100,000 needs 383. Above a few tens of thousands, the size barely moves.
This tool sizes a sample for a precise estimate of one figure. To detect a difference between two groups, use the power analysis calculator, which also takes the power you want.
Common mistakes
- Counting invitations as replies. Every formula here counts completed replies. Divide by the share you expect to answer, and do it at the planning stage.
- Assuming a large sample fixes bias. The formulas assume a random sample. A thousand volunteers from one website can still be badly unrepresentative, and no margin of error covers that.
- Ignoring a clustered or weighted design. Pew points out that weighting makes the margin larger. A design effect of 1.25 means a sample of 1,000 is only as precise as a simple random sample of 800, so at 1.5 the 385 becomes 578.
- Trusting the formula at an extreme share. With an expected share of 2%, the ±5% formula asks for only 31 replies, and a margin of 5 points is larger than the share itself. Ask for a much smaller margin when the share is small.
Questions people ask
Sources
- OpenStax, Introductory Statistics 2e, section 8.3, A Population Proportion
- OpenStax, Introductory Statistics 2e, section 8.1, A Single Population Mean
- NIST/SEMATECH e-Handbook of Statistical Methods, section 7.2.2.2, Sample sizes required
- cochranSize package, CRAN
- PEAS, Finite population correction
- Pew Research Center (2016), 5 key things to know about the margin of error in election polls
- PracTools package vignette, Design effects and effective sample size