Sample Size Calculator
Work out the minimum number of survey or experiment respondents you need for a chosen confidence level and margin of error. Uses Cochran's formula with the finite-population correction, shows the working, and gives you a sentence to cite. No signup, no ads.
How it works
The calculator uses the method published by W. G. Cochran in Sampling Techniques (1977) for estimating a single population proportion under simple random sampling. It runs in four steps, each of which is shown back to you with your own numbers substituted in.
- Pick the z critical value. Each confidence level maps to a two-tailed standard-normal critical value (NIST/SEMATECH e-Handbook §1.3.6.7.1): 80% → 1.282, 85% → 1.440, 90% → 1.645, 95% → 1.960, 99% → 2.576.
- Convert to decimals. The margin of error
eand proportionpare divided by 100, so a 5% margin becomes 0.05 and a 50% proportion becomes 0.5. - Compute the unadjusted size. Cochran's formula is
n₀ = z² · p · (1 − p) / e². The term p·(1−p) is the variance of a proportion and is largest at p = 0.5, which is why 50% gives the safest (largest) sample when the true proportion is unknown. - Apply the finite-population correction. If you supply a population N, the tool applies
n = n₀ / (1 + (n₀ − 1) / N), which lowers the requirement when the population is small relative to n₀. With no population entered, the infinite-population assumption applies and n = n₀.
The result is always rounded up to a whole respondent — you cannot survey a fraction of a person, and rounding down would undershoot your target precision. As an independent check, the tool feeds the rounded-up sample size back through the inverse of the formula, e = z · √(p·(1 − p) / n₀), and reports the margin of error that size actually delivers. That figure is always at or inside your requested margin, which confirms the rounding is on the safe side. The default proportion is 50% precisely because it maximises this safety margin.
Worked examples
Frequently asked questions
Sources & references
- Cochran, W. G. (1977). Sampling Techniques, 3rd ed., Wiley
- NIST/SEMATECH e-Handbook §7.2.2 — Sample sizes required
- NIST/SEMATECH e-Handbook §1.3.6.7.1 — Standard normal critical (z) values
The formula and z critical values were last cross-checked against these sources on 2026-06-11. This version assumes simple random sampling of a single proportion; it does not cover two-group comparisons, statistical power, stratified or cluster designs, or sample size for estimating a mean.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.