Skip to the calculator
SwiftSums
Math & statistics

Sample Size Calculator. For a target margin of error.

Minimum sample size needed for a given confidence level and margin of error, with an optional finite-population correction.

Live calculation

How many responses?

%
%
Confidence level
Required sample size 385
Z-value used
1.96

Your figures are kept on this device only.

How it works

Sample size calculations answer one question: how many responses do you need so that your survey result is accurate to within a chosen margin of error, at a chosen confidence level? Assuming the most conservative case — a 50/50 split — gives the largest, safest sample size; narrowing that estimate with prior data lets you survey fewer people for the same precision.

n = (Z² × p × (1 − p)) ÷ E²
nadjusted = n ÷ (1 + (n − 1) ÷ N) — only applied when a population size N is given
Z = 1.645 (90%) · 1.96 (95%) · 2.576 (99%)

The finite population correction only matters when your sample would represent a meaningful share of the whole population — for a population in the millions the correction barely changes the result, so it's most useful for smaller, well-defined groups like a company's staff or a school's student body.

Worked examples

The standard case, then the same case with a finite population correction applied.

No population correction
  1. 95% confidence uses Z = 1.96; margin of error is 5% (0.05); estimated proportion is 50% (0.5).
  2. n = (1.96² × 0.5 × 0.5) ÷ 0.05² = (3.8416 × 0.25) ÷ 0.0025 = 0.9604 ÷ 0.0025 = 384.16.
  3. Round up to a whole respondent: n = 385.

Required sample size is 385.

With a finite population of 2,000
  1. Start from the uncorrected result: n = 384.16.
  2. nadjusted = 384.16 ÷ (1 + 383.16 ÷ 2000) = 384.16 ÷ 1.19158 ≈ 322.40.
  3. Round up: n = 323.

Required sample size is 323 — smaller because the population itself is small.

Common questions

Why use 50% for estimated proportion if I don't know it?

50% is the most conservative assumption — it produces the largest possible required sample size for a given margin of error, since p×(1−p) is maximized at p=0.5. If you have prior data suggesting the true proportion is far from 50%, using that estimate will give a smaller, more efficient sample size.

What does the finite population correction do?

It reduces the required sample size when your total population is small relative to the sample itself — surveying 385 people out of a population of 2,000 covers a meaningful share of everyone, so fewer responses are needed than the uncorrected formula assumes for an effectively infinite population.

What's the practical difference between 95% and 99% confidence?

Higher confidence means you're more certain your true result falls within the margin of error — but it requires a noticeably larger sample. Moving from 95% to 99% confidence (Z from 1.96 to 2.576) increases the required sample size by about 73% for the same margin of error.