Skip to content

Sample Size Calculator

Work out how many responses a survey or study needs for the confidence level and margin of error you want, with an optional finite-population correction.

Formulas last reviewed: September 2026

Disclaimer: Results are calculated with standard formulas and are meant for learning and quick checks. Please double-check important work, especially anything used for exams, engineering, finance or safety.

How many responses do you need?

The sample size of a survey decides how trustworthy its results are. Too few responses and the margin of error is wide; too many and you waste time and money. This calculator finds the smallest sample that gives the confidence level and margin of error you want.

You can plan a survey about a percentage (a poll, an approval rating) or about an average (mean height, mean spend). If you know the size of the whole population you can add it for a finite-population correction, which reduces the sample needed for small groups.

How it is calculated

For a percentage: n = z² × p × (1 − p) ÷ e²
For a mean: n = (z × σ ÷ e)²
Finite population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N)

Worked example

95% confidence, ±5% margin, unknown percentage (use 50%)

z-score for 95%
1.96
Sample size needed
385
With a ±3% margin
1,068

Choosing the settings

  • Confidence level: 95% is standard. Higher confidence needs a larger sample.
  • Margin of error: the ± range you can accept. Halving it roughly quadruples the sample.
  • Expected percentage: keep 50% if you do not know, because it gives the largest, safest sample.

Frequently asked questions

Does the population size matter?

Very little unless the population is small. For populations in the tens of thousands or more the required sample barely changes.

Why is 50% used when the percentage is unknown?

The product p × (1 − p) is largest at 50%, so it gives the most cautious sample size.

What is the margin of error?

It is the plus-or-minus range around your survey result within which the true value should lie at your chosen confidence level.

Is a bigger sample always better?

It is more precise, but the gain shrinks quickly. A well-chosen random sample of a few hundred often beats a huge biased one.