Before you run a survey, you need to know how many people to ask. Too few and your results are too uncertain to act on; too many and you waste time and money. Our sample size calculator tells you how many responses you need for a chosen margin of error and confidence level, and adjusts for small populations. This guide explains the formula and the choices behind it.
How to use the calculator
- Confidence level: 90%, 95% or 99%. 95% is standard.
- Margin of error (%): how close you want the result to be to the true value, such as ±5%.
- Expected proportion (%): your best guess of the answer. Use 50% if you have no idea.
- Population size (optional): the total number of people you are sampling from. Leave blank for a large or unknown population.
With the defaults, 95% confidence, ±5% margin and 50% proportion, you need 385 responses. If the population is only 2,000, you need 323.
The formula
For a large population:
- z is the critical value (1.96 for 95%).
- p is the expected proportion as a decimal.
- e is the margin of error as a decimal.
Default example: n = 1.96² × 0.5 × 0.5 ÷ 0.05² = 3.8416 × 0.25 ÷ 0.0025 = 384.16. Always round up, so 385.
Finite population correction
When the population is small, you need fewer responses, because each one covers a larger share of the group:
For N = 2,000: 384.16 ÷ (1 + 383.16 ÷ 2,000) = 384.16 ÷ 1.1916 = 322.4, rounded up to 323. For populations over about 100,000, the correction makes almost no difference.
How the choices change the answer
| Setting | Sample size |
|---|---|
| 95%, ±5%, 50% (default) | 385 |
| 95%, ±3%, 50% | 1,068 |
| 99%, ±5%, 50% | 664 |
| 95%, ±5%, 20% | 246 |
- Tighter margin of error has the biggest effect. Halving the margin roughly quadruples the sample, because e is squared.
- Higher confidence raises the sample size.
- An expected proportion far from 50% lowers it. 50% is the most conservative choice, because p(1 − p) is largest there.
Why 50% is the safe default
If you have no prior information, assuming 50% guarantees your sample is big enough whatever the true answer turns out to be. If an earlier survey found that about 20% of customers use a feature, you can use 20% and save responses.
Responses, not invitations
The calculator gives the number of completed responses you need. If you expect a 20% response rate, invite 385 ÷ 0.2 = 1,925 people to get 385 back.
Quality matters more than quantity
A large sample does not fix a biased one. The formula assumes a random sample, where everyone in the population has an equal chance of being chosen. Common pitfalls:
- Self-selection: people who choose to answer online polls are often unusually keen or unhappy.
- Coverage gaps: an email survey misses customers without email addresses.
- Non-response: if certain groups ignore the survey, their views are under-represented.
Subgroups
If you want reliable results for each subgroup, such as each region or age band, each subgroup needs its own adequate sample. Analysing five regions at ±5% each could need around 385 × 5 = 1,925 responses.
After the survey
Once results are in, the confidence interval calculator gives the range around an average, and the p-value calculator tests whether differences are significant. The percentage calculator helps turn counts into proportions, and the statistics calculator summarises numeric answers.
Frequently asked questions
What margin of error should I choose?
±5% is common for general surveys. Political polls often aim for ±3%. For quick internal feedback, ±10% may be enough.
Why does the sample size barely change for large populations?
Precision depends mainly on how many people you ask, not on what fraction of the population they are. 385 responses give about ±5% whether the population is 50,000 or 50 million.
Should I round the sample size up or down?
Always up. Rounding down would give a slightly larger margin of error than you asked for.
What if I have no idea of the expected proportion?
Use 50%. It gives the largest, safest sample size.
Try it yourself
Run your own numbers with our free tool: Sample size calculator. No sign-up, and it works on any device.