Sample Size Calculator: How Many Responses Do You Need?
Choose a confidence level and the margin of error you can accept. You will see how many responses you need to estimate a percentage or an average, and how a small population changes it.
Last reviewed
Sample size needed
385
rounded up to a whole person
- Critical value z
- 1.9600
- Before rounding
- 384.15
| Margin of error | Sample size |
|---|---|
| ± 1 point | 9,604 |
| ± 2 points | 2,401 |
| ± 3 points | 1,068 |
| ± 4 points | 601 |
| ± 5 points | 385 |
| ± 10 points | 97 |
Assumes a simple random sample with everyone answering. Cluster or stratified designs need more, and so does allowing for people who do not respond.
What the calculator finds
A survey or study measures a sample and uses it to say something about a larger group. The bigger the sample, the narrower the uncertainty. The calculator turns that around: you say how much uncertainty you can accept, and it tells you how many responses you need.
Two numbers describe the uncertainty:
- Confidence level: how sure you want to be that the true value lies inside the range. 95% is usual.
- Margin of error: how far either side of your result the true value may be, such as ±5 percentage points.
The formulas
For a percentage (the share who answer yes), Cochran’s formula is:
n = z² × p × (1 − p) ÷ e²
z is the critical value for the confidence level (1.96 at 95%), p is the share you expect, as a fraction, and e is the margin of error as a fraction. If you do not know p, use 0.5. The product p × (1 − p) is largest there, so it is the most conservative choice and it covers every other true value.
For an average, with σ the standard deviation of what you are measuring and e the margin of error in the same units:
n = (z × σ ÷ e)²
For a small population of N people, the sample can be reduced:
n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
where n₀ is the value from the formulas above. The result is always rounded up to the next whole person.
The calculator takes z exactly from the normal distribution for the confidence level you enter, rather than rounding it to 1.96.
Worked examples
A survey of a large group, 95% confidence, ±5 points, unknown percentage. z = 1.95996 and n₀ = 1.95996² × 0.5 × 0.5 ÷ 0.05² = 384.15, rounded up to 385.
The same survey of a population of 2,000. n = 384.15 ÷ (1 + 383.15 ÷ 2,000) = 322.4, rounded up to 323. For a population of 500 it is 218, and for 10,000 it is 370.
An average. You expect a standard deviation of 15 and want the average to within ±2, at 95% confidence. n = (1.95996 × 15 ÷ 2)² = 14.6997² = 216.08, rounded up to 217.
A known percentage. If you expect about 20%, at 95% and ±3 points: n = 3.8415 × 0.2 × 0.8 ÷ 0.0009 = 682.9, rounded up to 683. If you had used 50% instead, you would need 1,068.
Sample size by margin of error
At 95% confidence with an unknown percentage (p = 50%):
| Margin of error | Sample size |
|---|---|
| ± 1 point | 9,604 |
| ± 2 points | 2,401 |
| ± 3 points | 1,068 |
| ± 4 points | 601 |
| ± 5 points | 385 |
| ± 10 points | 97 |
Halving the margin of error needs four times the sample, because the margin shrinks with the square root of the sample size.
Sample size by confidence level
At a margin of ±5 points with an unknown percentage:
| Confidence | z | Sample size |
|---|---|---|
| 80% | 1.2816 | 165 |
| 90% | 1.6449 | 271 |
| 95% | 1.9600 | 385 |
| 99% | 2.5758 | 664 |
| 99.9% | 3.2905 | 1,083 |
Limits of the method
- Simple random sampling. Everyone in the population must have an equal chance of being chosen. A convenience sample, an online poll that anyone can join, or a cluster design breaks the assumption, and the true uncertainty is larger than the margin of error says.
- Completed responses. The calculator gives the number of answers you need. Divide by the share you expect to reply to get the number to invite.
- Subgroups. The margin of error is for the whole sample. If you want results for a subgroup, such as one age band, that subgroup needs a sample of its own.
- Significance tests. This is the size needed to estimate a value to a given precision. A study meant to detect a difference between groups needs a power calculation, which is a different question.
To turn a result into an interval, use the confidence interval calculator. The p-value calculator tests a sample mean, the z-score calculator gives the critical values, and the statistics calculator summarises the data you collect.
Frequently asked questions
How many people do I need to survey?
For a percentage at 95% confidence with a margin of error of ±5 points and no idea of the true figure, about 385. For ±3 points it is 1,068, and for ±1 point 9,604. The sample size depends on the margin you accept, not on the size of a large population.
What is the formula?
For a percentage, n = z² × p × (1 − p) ÷ e², where z is the critical value for your confidence level (1.96 at 95%), p is the expected proportion and e is the margin of error as a fraction. For 95%, p = 0.5 and e = 0.05: 3.8415 × 0.25 ÷ 0.0025 = 384.15, rounded up to 385.
Why use 50% when I do not know the percentage?
Because p × (1 − p) is largest at 50%, so it gives the biggest sample. Any other true value needs a smaller one. Using 50% is the most conservative assumption and the one that guarantees your margin of error.
When does the population size matter?
When the sample is a large part of the population. The correction is n = n0 ÷ (1 + (n0 − 1) ÷ N). For a population of 2,000, the 385 drops to 323. For a population of 100,000 the correction hardly changes the answer.
How do I find the sample size for an average?
Use n = (z × σ ÷ e)², where σ is the standard deviation of the thing you are measuring and e the margin of error in its units. With σ = 15, e = 2 and 95% confidence, n = (1.96 × 15 ÷ 2)² = 216.1, rounded up to 217.
Do I need to allow for people who do not respond?
Yes. The calculator gives the number of completed responses you need, so divide it by the share you expect to respond. If you need 385 and expect half to reply, invite about 770. The formula also assumes a simple random sample.
Related calculators
- Confidence Interval CalculatorChoose a mean with the standard deviation from your sample (t), a mean with a known standard deviation (z), or a proportion.
- P-Value CalculatorEnter a z-score or t-score (with its degrees of freedom), or a sample mean, and choose the kind of test.
- Z-Score CalculatorEnter a value, the mean and the standard deviation.
- Statistics CalculatorEnter your numbers, separated by commas, spaces or new lines.
- Standard Deviation CalculatorPaste your numbers and choose sample or population.
- Percentage CalculatorPick the question you are actually asking.
Sources
- cochranSize (R package): Introduction: Cochran's formula n0 = z²p(1−p)/e², the finite population correction and p = 0.5
- NIST/SEMATECH e-Handbook of Statistical Methods: 7.2.2.2 Sample sizes required (mean with known standard deviation)
- Wolfram MathWorld: Normal distribution function (the critical values)