How many survey responses do you need?
Four numbers decide it. The confidence level is how sure you want to be that the true answer falls inside your range; 95% is the usual choice. The margin of error is how wide that range is: ±5% means a result of 62% really means somewhere between 57% and 67%. The population size is how many people you could survey in total. The expected percentage is your best guess of the answer; if you have no idea, leave it at 50%, which gives the largest and safest sample.
With 95% confidence and a ±5% margin of error you need 385 completed responses from a large population. A tighter ±3% needs 1,068, and 99% confidence at ±5% needs 664.
Sample size formula
For a percentage (a proportion), the standard formula is Cochran's:
n0 = z2 × p(1 − p) / e2
where z is the z-score for the confidence level, p is the expected proportion and e is the margin of error as a decimal. At 95% confidence, z = 1.96, so with p = 0.5 and e = 0.05:
n0 = 1.962 × 0.5 × 0.5 / 0.052 = 384.16 → 385
| Confidence level | z-score |
|---|---|
| 80% | 1.282 |
| 90% | 1.645 |
| 95% | 1.960 |
| 99% | 2.576 |
Small populations: the finite population correction
When the group you are surveying is small, every response covers a bigger share of it, so you need fewer. The correction is:
n = n0 / (1 + (n0 − 1) / N)
For a company of 500 employees at 95% and ±5%, that turns 384.16 into 218. For 1,000 people it is 278. Past about 20,000 people the population hardly matters, which is why national polls use roughly the same sample sizes as city polls.
Sample size table
Responses needed at 95% confidence with an expected percentage of 50%. This matches the widely used Krejcie and Morgan table for the ±5% column.
| Population | ±10% | ±5% | ±3% | ±1% |
|---|---|---|---|---|
| 100 | 50 | 80 | 92 | 99 |
| 250 | 70 | 152 | 203 | 244 |
| 500 | 81 | 218 | 341 | 476 |
| 1,000 | 88 | 278 | 517 | 906 |
| 2,500 | 93 | 334 | 749 | 1,984 |
| 5,000 | 95 | 357 | 880 | 3,289 |
| 10,000 | 96 | 370 | 965 | 4,900 |
| 25,000 | 96 | 379 | 1,024 | 6,939 |
| 100,000 | 96 | 383 | 1,056 | 8,763 |
| 1,000,000 | 97 | 385 | 1,066 | 9,513 |
| Unlimited | 97 | 385 | 1,068 | 9,604 |
Margin of error for a sample you already have
Turn the formula around: e = z × √(p(1 − p) / n). At 95% confidence, 100 responses give about ±9.8%, 400 give ±4.9% and 1,000 give ±3.1%. Halving the margin of error takes four times as many responses, which the curve above the formula shows.
Sample size for an average (mean)
If you are estimating an average, such as minutes spent on a task or a satisfaction score, use n0 = (z × σ / E)2, where σ is the standard deviation and E is the margin of error in the same units. If the standard deviation is 15 and you want the average within ±2 at 95% confidence, you need (1.96 × 15 / 2)2 = 216.09, so 217. Take the standard deviation from a pilot study or past data. Choose An average above to calculate it.
How many people should you invite?
The sample size is the number of completed responses, not invitations. Divide by the response rate you expect: 385 completes at a 20% response rate means inviting 1,925 people. Online surveys to a cold list often get well under 20%, so use your own past rates when you have them. Low response also raises the risk that the people who answer differ from those who don't, which no sample size can fix.
Slovin's formula and Yamane's formula
Many textbooks use n = N / (1 + N × e2), called Slovin's or Taro Yamane's formula. For 1,000 people and ±5% it gives 286, close to Cochran's 278. It is a shortcut that bakes in about 95% confidence and a 50% proportion, so it cannot be adjusted for a different confidence level or expected percentage. Cochran's formula with the population correction is the more flexible choice.
When you need a power analysis instead
This calculator answers "how precisely can I estimate one number?" Comparing two groups, such as an A/B test, a before and after study or a clinical trial, asks a different question: "how many do I need to detect a difference of a given size?" That calls for a power analysis using the effect size, the significance level (often 0.05) and the power (often 80%).
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.2.4.2 Sample sizes required (proportions)
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.2.2.2 Sample sizes required (means)
- Pew Research Center: Understanding the margin of error in election polls
- AAPOR: Margin of Sampling Error / Credibility Interval