Sample Size & Margin of Error Calculator
Work out how many completed responses a survey needs for a given margin of error, or how precise the responses you already have are.
How the calculation works
For a percentage estimated from a survey, the number of completed responses needed is
n₀ = z² × p × (1 − p) ÷ e²
where z is 1.96 for 95% confidence, p is the expected proportion and e is the margin of error. With p = 50% (the most conservative choice when you do not know what to expect) and ±5% at 95% confidence, n₀ is 384.2, so you need 385 completed responses.
When the population is small, a finite population correction reduces the requirement: n = n₀ ÷ (1 + (n₀ − 1) ÷ N). For a population of 5,000 the same survey needs 357 responses. The Margin of error tab reverses the calculation: 400 responses give about ±4.9% at 95% confidence.
If you expect only some invited people to answer, enter a response rate to see how many invitations to send.
Precision is not the whole question
Halving the margin of error roughly quadruples the sample size, which is why ±1% surveys are rare. Lenth (2001) makes the same point for effect sizes: halving the effect you want to detect approximately quadruples the sample size. He also argues that sample size may not be the main issue, because the real goal is a high-quality study design.
Two practical consequences follow. First, decide in advance what difference would change your decision, and size the study for that. Second, fix the questionnaire and sampling before paying for a larger sample; more responses do not repair a biased question. The survey questions guide covers the wording side.
The margin of error assumes a probability sample
The formula assumes that every member of the population had a known chance of being selected. Many online surveys use opt-in panels instead. The AAPOR task force on non-probability sampling (Baker et al., 2013) quotes AAPOR's long-standing position that reporting a margin of sampling error for opt-in or self-identified samples is misleading. You can still use this calculator to plan the size of such a study, but do not present the result as a statistical margin of error.
The same caution applies to synthetic respondents: they are not a random sample of people. Our synthetic survey sample size guide explains what a larger synthetic sample can and cannot tell you.
Frequently asked questions
How many survey responses do I need?
For a single overall percentage at ±5% and 95% confidence, about 385 completed responses, fewer if the population is small. If you need results for subgroups, each subgroup needs its own adequate sample.
Is 400 a large sample size?
400 responses give a margin of about ±4.9% for an overall percentage. That is often enough for a headline figure but rarely for detailed comparisons between small subgroups.
Should I always use 50% as the expected proportion?
Use 50% when you have no prior estimate; it gives the largest, safest sample size. If earlier research suggests a figure near 10% or 90%, you can enter it and need fewer responses.
Plan before you field
Use a synthetic rehearsal to check that your questions are understood before you invest in a large sample, and see pricing for larger studies.
Sources and editorial method
The formulas are the standard normal-approximation formulas for a proportion with finite population correction. The examples are illustrative. The cited sources support the interpretation and did not evaluate this calculator.
- Lenth, R. V. (2001). Some practical guidelines for effective sample size determination. The American Statistician, 55(3), 187–193. DOI: 10.1198/000313001317098149. Read in the author's version.
- Baker, R., Brick, J. M., Bates, N. A., Battaglia, M., Couper, M. P., Dever, J. A., Gile, K. J., & Tourangeau, R. (2013). Summary report of the AAPOR task force on non-probability sampling. Journal of Survey Statistics and Methodology, 1(2), 90–143. DOI: 10.1093/jssam/smt008.