Sample Size Calculator
Calculate the required sample size for a survey or statistical test given desired confidence level, margin of error and estimated population variability.
How to use the Sample Size Calculator
- Enter your inputs into the Sample Size Calculator above.
- Results update instantly as you type — no submit button needed.
- Adjust any value to see how the result changes in real time.
The sample size formula
n = (z² × p(1−p)) / E²
z is the z-score for the chosen confidence level (1.96 for 95%, 2.576 for 99%), p is the estimated proportion (use 0.5 for max variance), E is the margin of error as a decimal.
Worked example
For a survey with 95% confidence, ±3% margin of error, no prior estimate (use p=0.5): n = (1.96² × 0.25) / 0.03² = 1,068. For ±5% with the same parameters: n = 385.
Frequently asked questions
Why is 1,000 a common survey size?
A sample of 1,000 gives roughly ±3% margin at 95% confidence — enough precision for most public opinion work without the cost of larger samples.
Does population size matter?
Only when sampling more than ~5% of the population. For small populations, use the finite population correction: n = n₀ / (1 + (n₀ − 1)/N).
What does "margin of error" actually mean?
The half-width of the 95% confidence interval. A poll showing 52% support with ±3% margin means the true value is likely between 49% and 55%.