Sample Size Calculator
How many people do you need to survey? Pick a confidence level and margin of error to get the required sample size — or flip the mode to see what margin of error a sample you already have can support. Population size is optional.
Formula & substitution
What the inputs mean
The confidence level sets how sure you want to be that the true value falls inside your margin — 95% is the survey-industry default. The margin of error is the ± you can tolerate: a 5% margin on a 60% result means the truth is likely between 55% and 65%. The proportion is your best guess of the answer you are measuring; 50% is the safe worst case because it maximizes the required sample. Population size only matters when it is small — below roughly 20× the sample — where the finite-population correction trims the requirement.
How it’s calculated
Unlimited population: n₀ = z²p(1 − p) ÷ e². Finite population N: n = n₀ ÷ (1 + (n₀ − 1) ÷ N), rounded up. Margin-of-error mode: e = z√(p(1 − p) ÷ n), multiplied by √((N − n) ÷ (N − 1)) when N is given. z comes from the standard normal distribution (1.96 at 95%).
Results update as you type and are for education, not professional advice — double-check any number that matters.
Worked example
At 95% confidence, ±5% margin, p = 50%, no population limit: n₀ = 1.959964² × 0.25 ÷ 0.05² = 384.15, so you need 385 respondents. If the whole population is only 1,000 people, the correction gives 384.15 ÷ (1 + 383.15/1000) = 277.7 → 278. Flip the mode: a sample of 500 at p = 50% supports a margin of ±4.38% at 95% confidence.
Common mistakes
- Treating margin of error as a percent of the answer — it is percentage points on the proportion itself.
- Shrinking the sample because the population is huge — beyond ~20,000 people, population size barely matters.
- Ignoring non-response: if only half of invitees answer, invite twice the computed n.
Where it is used
- Sizing customer, employee, or political surveys before fieldwork.
- Checking whether a published poll’s sample supports its claimed margin.
- A/B tests and QA sampling plans that target a proportion.
Frequently asked questions
Why is 385 such a common survey sample size?
Because n = 1.96² × 0.25 ÷ 0.05² = 384.15 rounds up to 385 — the requirement for 95% confidence, ±5% margin, worst-case p = 50%, any large population. Tighter margins grow fast: ±3% needs 1,068 and ±2% needs 2,401.
What proportion should I enter if I have no idea?
Use 50%. The product p(1 − p) peaks at 0.25 when p = 0.5, so it is the conservative choice — any other true proportion needs a smaller sample than the one computed.
When does population size matter?
Only when the population is small relative to the sample. Surveying a 1,000-person company drops the 385 requirement to 278; for a country of millions, the correction changes nothing noticeable.
Does this work for estimating means rather than proportions?
This page targets proportions (yes/no style questions). For a mean, you need an estimate of the standard deviation: n = (zσ/e)². Our confidence interval calculator covers the mean side.
What z-scores do the confidence levels use?
70% → 1.0364, 80% → 1.2816, 90% → 1.6449, 95% → 1.9600, 98% → 2.3263, 99% → 2.5758, 99.9% → 3.2905. The steps panel shows the exact value used in the substitution.