Sample Size Calculator

Quick answer

The sample size calculator finds how many survey responses you need for a chosen confidence level and margin of error. It uses Cochran’s formula for proportions, then applies the finite population correction so smaller populations need fewer responses.

%
%

Use 50% if unsure; it gives the largest, safest sample.

Use a very large number for an effectively infinite population.

Sample size (infinite population)
—
Required sample size
—

Bigger samples give more precise estimates, but with diminishing returns: halving the margin of error needs about four times as many responses.

How to use it

  • Confidence level: 95% is standard.
  • Margin of error: ±5% is common for opinion surveys.
  • Expected proportion: use 50% if unknown; it gives the safest, largest sample.
  • Population size: the number of people you could survey.

Response rates

This is the number of completed responses. If you expect 20% to respond, invite five times as many people.

Inputs explained

Field What to enter
Confidence level Choose one: 90%, 95%, 99%
Margin of error In %
Expected proportion In %. Use 50% if unsure; it gives the largest, safest sample.
Population size A number. Use a very large number for an effectively infinite population.

What each result means

  • Sample size (infinite population) = [Confidence level]^2 × ([Expected proportion]÷100) × (1 – [Expected proportion]÷100) ÷ ([Margin of error]÷100)^2
  • Required sample size = ceil([Sample size (infinite population)] ÷ (1 + ([Sample size (infinite population)] – 1) ÷ [Population size]))

Example values

How the main result changes when Margin of error changes and everything else stays at the example values above:

Margin of error (%) Required sample size
2.5 1,428
3.75 661
5 377
6.25 243
7.5 170
10 96

Formula

n₀ = z² × p(1 − p) ÷ e²n = n₀ ÷ (1 + (n₀ − 1) ÷ N)

Worked example

95% confidence, ±5% margin, p = 50%, population 20,000.
n₀ = 1.96² × 0.25 ÷ 0.05² = 384.16. n = 384.16 ÷ (1 + 383.16/20,000) → 377 responses.

Key terms

Margin of error
Half the width of the confidence interval.
Confidence level
How often intervals built this way contain the true value.
Finite population correction
Adjustment that reduces sample size for small populations.

Frequently asked questions

Why does 50% give the largest sample?

p(1 − p) is maximised at p = 0.5.

Does population size matter much?

Only for small populations; above about 100,000 the result barely changes.

Does this apply to averages?

No, it is for proportions. Means require an estimate of the standard deviation.

What formula does the Sample Size Calculator use?

n₀ = z² × p(1 − p) ÷ e².

Sources

  1. Cochran WG. Sampling Techniques, 3rd ed. Wiley, 1977
  2. NIST/SEMATECH e-Handbook – sample sizes

Cite this calculator

Speedy Calculator. (2026). Sample Size Calculator. Speedy Calculator. https://speedycalculator.com/calculators/statistics/sample-size/