Sample Size Calculator

Enter your target margin of error, confidence level, and optionally population size to compute the minimum required sample size for a statistically valid survey or study.

How to use this calculator

  1. Select your desired confidence level (95% is standard).
  2. Enter your acceptable margin of error in percent.
  3. Use 50% for estimated proportion unless you have a prior estimate.
  4. Enter population size if finite (leave 0 for large/unknown populations).
  5. Read the minimum sample size required.

Formula & method

Sample size formula

n₀ = (z* × p × (1−p)) / E² · With finite population: n = n₀N / (n₀ + N − 1)

z* = confidence level critical value, p = estimated proportion, E = margin of error (decimal), N = population size.

Example

95% CI (z*=1.96), MOE=5% (E=0.05), p=50%: n₀ = (1.96² × 0.25) / 0.0025 = 384.16 → n = 385.

Key insights

How to interpret your result

Margin of error vs sample size trade-off

A smaller MOE requires a much larger sample. Going from ±5% to ±2.5% quadruples the required sample.

Conservative 50% estimate

When you have no prior estimate of the proportion, use p = 0.5. This maximises variance and gives the largest required sample.

Frequently asked questions

How many respondents do I need for a 95% CI and ±5% margin of error?
For an unknown/large population: 385 respondents. This is the standard minimum for most surveys.
Does population size always matter?
Only for small populations. For populations above ~10,000, the finite correction has little effect and the infinite formula is sufficient.
Why use 50% as the estimated proportion?
p = 0.5 maximises p(1−p) = 0.25, giving the largest required sample size and the most conservative (safe) estimate.

Related calculators

See all math calculators · Explore all online calculators