Sample Size Calculator
Calculators · Added
Asking everybody is expensive and usually impossible, so surveys ask a sample and accept a known amount of uncertainty in exchange. This works out how large that sample has to be for the precision you want — or, going the other way, how precise the answer you already have actually is. The z-score is computed rather than looked up in a table of four values, so any confidence level works, and a finite population correction is applied whenever you know how many people there are in total.
How to use the sample size calculator
- 1Choose whether you are planning a survey or assessing one you have already run.
- 2Set the margin of error you can live with — ±5% is the usual starting point.
- 3Choose a confidence level. 95% is the convention and means the interval would contain the true value in 95 of 100 repeated samples.
- 4Leave the response distribution at 50% unless you have genuine prior evidence about the split.
- 5Enter the population size if it is small enough to matter — below a few thousand it makes a real difference.
- 6Add an expected response rate to see how many invitations that implies sending.
Examples
The default national poll
- Input
- ±5%, 95% confidence, 50% distribution
- Result
- 385 responses
This is why so many published polls quote around 1,000 respondents for ±3% — the sample grows with the square of the precision.
A small organisation
- Input
- ±5%, 95% confidence, population of 500
- Result
- 218 responses instead of 385
The finite population correction nearly halves the requirement once the sample is a large share of the whole.
Assessing a result you already have
- Input
- 400 responses, 62% said yes, 95% confidence
- Result
- ±4.76% — the true figure is very likely between 57.2% and 66.8%
Wide enough that a rival option at 58% would not be reliably behind.
About the sample size calculator
Where the formula comes from
When you sample repeatedly from a population and record the proportion each time, those proportions cluster around the true value in a bell curve — a consequence of the central limit theorem, which is what makes any of this possible. The spread of that curve is the standard error, and it equals the square root of p(1−p) divided by n. Multiply the standard error by a z-score chosen for your confidence level and you have the margin of error.
Rearranging for n gives the formula this page uses: z² times p(1−p), divided by the margin squared. Everything follows from there. The margin is squared, which is why precision is so expensive. The p(1−p) term peaks at a half, which is why 50% is the safe default. And n does not depend on the population size at all, which is the result that surprises people most.
The finite population correction is the one adjustment to that picture. The formula above assumes sampling with replacement from an infinite pool, and when the population is small each person you have already asked genuinely reduces what is left to learn. Multiplying by the correction accounts for it, and its effect fades quickly as the population grows.
The z-score, and why it is calculated here
The z-score is the number of standard errors you have to reach out from the centre to capture your chosen share of the distribution. For 95% confidence it is 1.95996, usually rounded to 1.96; for 99% it is 2.5758. Most calculators carry a short table of these and refuse anything not on it, which quietly limits what you can ask.
This page computes the inverse normal distribution directly, using a rational approximation refined against the complementary error function. That means any confidence level works — including the awkward ones that come up when a client asks for 97.5%, or when you are reconstructing a figure somebody else published without saying which level they used.
One consequence worth knowing: the relationship between confidence and sample size is steep at the top end. Moving from 95% to 99% confidence multiplies the required sample by about 1.7, and moving to 99.9% multiplies it by nearly three. Very high confidence is rarely worth what it costs in a survey context, which is why 95% became the convention in the first place.
Frequently asked questions
Why does the population size barely matter for large populations?
What does 95% confidence actually mean?
Why is 50% the default response distribution?
Halving the margin of error more than doubles my sample. Why?
Does hitting this number make my survey accurate?
Related tools
Standard Deviation Calculator
Calculators
Calculate sample or population standard deviation with the full working shown.
Average Calculator
Calculators
Find the mean, median, mode and range of a list of numbers, pasted in any format.
Percentage Calculator
Calculators
Five percentage calculations in one place — including percentage change and reverse percentages.