Sample Size Calculator
Two tools in one: figure out the minimum sample size you need for a survey at a given confidence level and margin of error, or take an existing sample and compute the margin of error it can support. Includes the finite-population correction so small, closed populations aren't over-sampled.
1. Find the sample size
Enter your target confidence and margin of error to get the minimum number of responses your survey needs.
2. Find the margin of error
Enter your existing sample size to see the margin of error / confidence interval width it supports.
3. Find the sample size for a mean
Enter your target confidence, the population (or estimated) standard deviation σ, and the desired margin of error E to get the minimum number of observations needed to estimate the population mean.
Why can't you just survey everyone?
In statistics, you almost never have access to every member of the group you care about — the "population" might be every U.S. adult, every user of an app, every widget rolling off a production line. Instead you take a sample: a smaller, hopefully representative subset, and use it to estimate the true proportion p of some trait in the full population.
Any single sample produces an estimate, written p̂ ("p-hat"). It's close to the true p but almost never exactly equal — draw two different samples of the same size and you'll get two slightly different p̂ values. Sample size calculations are about deciding how close is close enough, and how confident you want to be in that closeness.
What confidence level actually means
A 95% confidence level does not mean "there's a 95% chance the true proportion is inside this specific interval." Once you've drawn a sample and computed an interval, the true proportion either is inside it or it isn't. What 95% confidence really describes is the reliability of the method: if you repeated the whole survey many times, about 95% of the intervals you built would cover the true proportion. The probability sits with the procedure, not with any one interval.
Sample size, step by step
Each card below is one link in the chain: pick a confidence level (which sets z), pick the proportion assumption, plug in the target margin of error, and — if the population is small — apply the finite population correction. Definitions and formulas on the left, a small diagram on the right, and a worked example beneath.
1. Pick a confidence level → get z
The confidence level says how often the method should succeed if you repeated the whole survey many times. That level maps to a two-sided z-multiplier from the standard normal. Higher confidence needs a bigger z, and a bigger z pushes n up proportionally to z².
2. Choose the population proportion p̂
The formula depends on the variance term p̂(1 − p̂). It is largest at p̂ = 0.5, so if you have no prior information the safe default is 50% — you'll never under-sample. If a previous study or pilot suggests p̂ is far from 0.5, using that value gives a smaller (and still valid) sample size.
3. Solve for sample size at margin ε
The unlimited-population formula puts ε in the denominator squared. That's why halving your target margin of error quadruples the required sample. Tighter certainty is disproportionately expensive.
4. Finite population correction (small groups)
The base formula assumes an effectively infinite population. Once your sample is more than about 5% of N, the FPC noticeably cuts the required sample — every person you survey is a larger share of the whole, so uncertainty shrinks faster.
z-score reference table
The z-score is the two-sided critical value from the standard normal distribution corresponding to your confidence level. These are the multipliers the calculator plugs into the formulas. Custom levels are computed with the inverse-normal function, so any value in between works too.
| Confidence level | z-score (±) |
|---|---|
| 70% | 1.04 |
| 80% | 1.28 |
| 90% | 1.645 |
| 95% | 1.96 |
| 98% | 2.33 |
| 99% | 2.576 |
| 99.9% | 3.29 |
Features of this calculator
- Two directions in one page — solve for sample size, or solve for margin of error
- Confidence-level dropdown for 90 / 95 / 99% plus a custom field that accepts any level (e.g. 92.5%)
- Automatic finite population correction when a population size is entered
- Step-by-step working shows the z-score, the substitution, and (when relevant) the correction term
- z-score reference table so you can see exactly where the multiplier comes from
- Sensible default of p̂ = 50%, the mathematically most conservative choice
Frequently asked questions
+Why is 50% the conservative default for population proportion?
The variance term p̂(1 − p̂) is maximised at p̂ = 0.5, where it equals 0.25. Using 50% when you don't know the true proportion guarantees you don't under-sample.
+What happens to sample size if I raise the confidence level?
Sample size grows with the square of the z-score. Moving from 90% to 95% roughly multiplies n by 1.42; from 95% to 99.9% nearly triples it. High certainty is expensive.
+Do I need the finite population correction?
Only if your sample is a meaningful fraction of the whole population — as a rule of thumb, once n is more than about 5% of N. For national surveys the correction is negligible; for a small company or school it can cut the required sample substantially.
+Is this the same math pollsters use?
This is the standard textbook proportion-based sample size formula, which is what most media polls quote (the "margin of error ±3 points" you see on election coverage).