👥 Sample Size Calculator
Find the sample size you need for a given confidence level and margin of error — for estimating a proportion (survey) or a mean.
Required sample size
385
respondents
Critical value (z)
1.95996
for this confidence level
n = z²·p(1−p) / E². Use 50% for the expected proportion if unknown — it gives the most conservative (largest) sample. 🔒 Computed in your browser.
How the sample size calculator works
For a proportion, the required sample size is n = z²·p(1−p) / E², where z is the critical value for your confidence level, p the expected proportion (0.5 is the safe, most-conservative choice), and E the margin of error. For a mean, n = (z·σ / E)². An optional finite-population correction reduces n when you are sampling a large fraction of a small population.
The go-to tool before running a survey: it tells you how many responses you need for the precision you want. Uses the exact normal critical value for your confidence level.
Frequently asked questions
How do I calculate sample size for a survey?
Use n = z²·p(1−p) / E². For 95% confidence (z ≈ 1.96), a 5% margin of error (E = 0.05), and the conservative p = 0.5, you need about 385 responses. Enter your values to get the exact figure.
What value should I use for the expected proportion?
If you have no prior estimate, use 0.5 — it maximises the required sample size, so your margin of error is guaranteed to be no worse than planned. If you expect a proportion far from 0.5 (say 0.1), the required sample is smaller.
What is the margin of error?
The precision you want — the ± range around your estimate. A 3% margin needs a larger sample than a 5% margin; halving the margin roughly quadruples the required sample.
What is the finite-population correction?
When your sample is a large fraction of a small population, you need fewer respondents than the basic formula suggests. The correction adjusts n downward using the total population size.
Why does higher confidence need a bigger sample?
A higher confidence level (99% vs 95%) uses a larger critical value z, which increases the required sample size. More confidence in a narrower margin costs more data.
Does the population size matter?
Surprisingly little for large populations — a 95%/5% survey needs about 385 responses whether the population is 20,000 or 20 million. It only matters (via the finite-population correction) when the sample is a large share of a small population.