Sample Size Calculator
How many people to survey for a given confidence level and margin of error — with the finite-population correction for small populations.
For a proportion, n₀ = z² p(1 − p) ÷ e², with z from the confidence level (1.
How the sample size calculator works
For a proportion, n₀ = z² p(1 − p) ÷ e², with z from the confidence level (1.96 for 95%), p the expected proportion (0.5 is the safe, largest case) and e the margin of error. If the population is small, the finite-population correction n = n₀ ÷ (1 + (n₀ − 1)/N) reduces it.
Formula: n₀ = z² p(1−p) / e²; n = n₀ / (1 + (n₀ − 1)/N)
Worked examples
| Inputs | Sample size needed | Note |
|---|---|---|
| 95%, ±5%, p = 50% | 385 | 385 |
| 99%, ±3% | 1,843 | 1,844 |
| population of 500, 95%, ±5% | 218 | 218 after the correction |
FAQFrequently asked questions
Why 385?
That is 1.96² × 0.25 ÷ 0.05²: the classic 95% ± 5% sample for a very large population.
Does population size matter?
Barely, once the population is over about 20 times the sample. It matters for small groups — a school or a company.
What if I expect a proportion far from 50%?
Enter it; the sample shrinks. 50% is the worst case and the safe default.
Does this cover means as well as proportions?
This formula is for proportions (yes/no answers). For a mean use n = (zσ/e)² with an estimate of σ.
What about non-response?
Divide by the expected response rate: 385 needed with a 40% response means inviting about 963.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- National curriculum in England — Mathematics — the terms and methods taught in UK schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.