Statistics

Sample Size Calculator

Enter your desired confidence level, margin of error, and (optionally) total population size to calculate the minimum sample size needed for a statistically sound survey or study.

Your study parameters

%
Minimum sample size
Enter your parameters to calculate.

How the Sample Size formula works

The base sample size formula, with an optional finite population correction:

n₀ = (Z² × p × (1−p)) / e²
n = n₀ / (1 + (n₀−1)/N)   [only if population size N is known]

Z is the z-score for your confidence level (1.96 for 95%), p is the expected proportion (0.5 is used by default for maximum required sample size), and e is the margin of error as a decimal.

Step-by-step calculation

  1. Look up the Z-score for your chosen confidence level.
  2. Square the Z-score and multiply by p×(1−p) — using 0.5 for p if you don't have a prior estimate, since that maximizes the required sample size.
  3. Divide by the margin of error squared to get the base sample size.
  4. If you know your total population size, apply the finite population correction to reduce the required sample size accordingly.

Worked example

For a 95% confidence level (Z=1.96), 5% margin of error, and p=0.5, with no population size given: n₀ = (1.96² × 0.5 × 0.5) / 0.05² = 0.9604 / 0.0025 ≈ 384 respondents.

Frequently asked questions

Why does the calculator default p to 0.5?

p×(1−p) is largest when p=0.5, so using 0.5 without a better estimate gives the most conservative (largest) required sample size — a safe default when you don't already know roughly what proportion to expect.

Do I need the finite population correction?

Only if you're sampling from a relatively small, known population (like all employees at a mid-sized company). For large or effectively unlimited populations (like 'all adults in a country'), the correction makes very little difference and can be skipped.