Sample Size Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Choose a confidence level and margin of error to find the minimum number of responses for estimating a proportion.
Result
Required sample size (rounded up)
Critical value z
- Sample size for an unlimited population
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Confidence level: choose one of the 6 options in the list.
- Margin of error, in percent: enter 0 or more.
- Expected proportion (%) (use 50 if unknown): enter a number from 0 to 100.
- Population size (0 if very large or unknown): enter 0 or more.
- Read the result: Required sample size (rounded up); the panel also shows Critical value z and Sample size for an unlimited population.
How this calculator works
Cochran's formula for a proportion: n₀ = z² × p × (1 − p) ÷ E², where z is the critical value of the confidence level, p the expected proportion and E the margin of error (both as decimals).
For a population of N people, the finite population correction gives n = n₀ ÷ (1 + (n₀ − 1) ÷ N). The result is rounded up to a whole response.
p = 50% gives the largest sample, so it is the safe choice when you have no prior estimate.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| Confidence level | ||
| Margin of error | % | |
| Expected proportion (%) (use 50 if unknown) | ||
| Population size (0 if very large or unknown) | ||
| Critical value z | ||
| Sample size for an unlimited population | ||
| Required sample size (rounded up) | ||
norminv(p, m, s) | the value that a Gaussian variable with mean m and standard deviation s stays at or below with probability p (mean zero and standard deviation one without m and s). | |
ceil(x) | the smallest whole number not below x. |
Worked example
| Confidence level | 95% |
|---|---|
| Margin of error | 5% |
| Expected proportion (%) (use 50 if unknown) | 50 |
| Population size (0 if very large or unknown) | 0 |
| Critical value z | 1.96 |
|---|---|
| Sample size for an unlimited population | 384.1459 |
Required sample size (rounded up) 385
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How many survey responses do I need for 95% confidence and a 5% margin of error?
385 for a large population, using p = 50%. For a population of 10,000 people, 370 are enough.
Does a bigger population need a much bigger sample?
No. Past a few tens of thousands, the population size barely changes the required sample.