Home › Math & Study › Sample Size Calculator

Sample Size Calculator

This sample size calculator tells you how many responses you need for a survey to be accurate to within a chosen margin of error. The second form shows the margin of error for a sample you already have.

Sample size needed

Margin of error for a sample

Formulas

n₀ = z² × p(1 − p) ÷ e²
With a known population N: n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
Margin of error = z × √(p(1 − p) ÷ n)

z is 1.645 for 90%, 1.96 for 95% and 2.576 for 99% confidence. Using p = 50% gives the largest (safest) sample.

Sample sizes for large populations (p = 50%)

Margin of error95% confidence99% confidence
±1%960416588
±2%24014147
±3%10681844
±4%6011037
±5%385664
±10%97166

Example

For 95% confidence and a ±5% margin, you need 385 responses from a large population. If the whole population is only 1,000 people, 278 responses are enough.

Tips

  • Plan for non-response: if you expect 20% of people to answer, invite five times as many.
  • A bigger sample doesn't fix a biased one; who you ask matters as much as how many.
  • For a confidence interval around an average, use the confidence interval calculator.

Frequently asked questions

Why is 385 such a common sample size?

It's what you need for 95% confidence and a ±5% margin of error in a large population.

Does population size matter?

Only when the sample is a sizeable share of the population; for large populations it barely changes the answer.

What proportion should I use?

Use 50% if you have no estimate; it gives the most conservative sample size.

Written and checked by Vijay. Last updated .