Sample size calculator (survey)
Give the confidence you want, the margin of error you accept and, if you know it, the population size.
Result
370People to survey
- n₀ = 1.96² × 0.5 × (1 − 0.5) ÷ 0.05² = 384.15
- Without correction (infinite population)
- 385
- After correction (before rounding)
- 369.97
- z value used
- 1.96
Inputs
- Confidence level
- 95%
- Margin of error
- 5
- Expected proportion
- 50
- Population size (optional)
- 10000
How it is calculated
Cochran’s formula: n₀ = z² × p × (1 − p) ÷ e².
Result
People to survey
- Without correction (infinite population)
- 385
- After correction (before rounding)
- 369.97
- z value used
- 1.96
How it is calculated
- Cochran’s formula: n₀ = z² × p × (1 − p) ÷ e².
- z is 1.645 (90%), 1.960 (95%) or 2.576 (99%), from the normal law.
- Finite population N: n = n₀ ÷ (1 + (n₀ − 1) ÷ N).
- Always round up to the next whole number.
Example
95%, margin 5%, p = 50%: n₀ = 1.96² × 0.25 ÷ 0.0025 ≈ 384.1, so 385 people. For 10,000 people: 370.
Good to know
- The formula assumes random selection. A biased sample stays wrong, even when large.
- It is a normal approximation, valid for a simple survey of one proportion.
- Plan more contacts than n: not everyone answers.
Sources
- W. G. Cochran, Sampling Techniques (1977)
When to use it
- Plan how many replies a customer or student survey needs.
- See how much a tighter margin of error costs in extra respondents.
- Once the survey is done, use the Confidence interval calculator (mean or proportion) to read the result.
Frequently asked questions
Why use 50% when I do not know the proportion?
p × (1 − p) is largest at 50%, so it gives the biggest, safest sample. Any other true proportion then needs fewer people.
Does a bigger population need a much bigger sample?
Not really. At 95% and a 5% margin, the size stays close to 385 people whether the population is 100,000 or 10 million. It matters only for small populations.
How many people for a 3% margin?
About 1,068 at 95% confidence with p = 50%. Halving the margin roughly quadruples the sample.