Sample Size Explained: Cochran’s Formula, Margin of Error, and Finite Populations
How many responses make a survey trustworthy? The answer is a formula with three inputs — confidence, margin, and proportion — and a correction for small populations.
Sample size is the number of observations needed for a survey or study to support a stated precision: a confidence level, a margin of error, and an assumed proportion. The standard formula — Cochran’s — gives 385 respondents for 95% confidence and a ±5% margin at the most conservative proportion. That number is remarkably stable: it barely moves for populations above a few thousand, it quadruples when the margin is halved, and it collapses when the population is small enough for the finite population correction to matter. This guide covers the formula, the three inputs, the correction, and the non-response adjustment that turns the statistical sample into the invitations that must be sent.
- Cochran’s formula: n = Z² × p × (1 − p) ÷ e². At 95% confidence (Z = 1.96), p = 0.5, e = 0.05: n = 384.16, rounded up to 385. The p = 0.5 assumption is the conservative maximum — it gives the largest sample, and it is the right default when the proportion is unknown.
- Halving the margin quadruples the sample: ±5% needs 385, ±2.5% needs 1,537, ±1% needs 9,604. Precision is expensive, and the cost is quadratic — decide the margin from the decision the survey supports, not from a round number.
- For a finite population, apply the correction: n_adj = n ÷ (1 + (n − 1) ÷ N). At N = 10,000, the correction gives 370. At N = 500, it gives 218. Below a few thousand, the population size matters; above it, it barely does.
Cochran’s formula: three inputs, one division
Cochran’s formula for a proportion is n = Z² × p × (1 − p) ÷ e². Z is the standard normal value for the confidence level: 1.645 for 90%, 1.96 for 95%, 2.576 for 99%. p is the estimated proportion of the population with the characteristic — the share who would answer yes, buy, or vote a way — and (1 − p) is the complement. e is the margin of error as a decimal: 0.05 for ±5 percentage points. The formula assumes random sampling from a large population and a normal approximation to the binomial, which holds when n × p and n × (1 − p) are both comfortably above 5 — true at the usual sample sizes.
The p = 0.5 default is deliberate. The product p × (1 − p) is maximised at p = 0.5, where it equals 0.25, so p = 0.5 gives the largest sample for any confidence and margin. When the proportion is unknown — the usual case before the survey — p = 0.5 is the safe assumption: it guarantees the stated precision whatever the true proportion turns out to be. When the proportion is known from prior data — a previous survey found 20% — using p = 0.2 gives a smaller sample (246 at 95% and ±5%, against 385), but the precision is then guaranteed only near 20%: if the true proportion is 50%, the margin is wider than stated. The saving is real and the risk is real, and the choice should be recorded with the reason.
Worked example. 95% confidence, ±5%, p = 0.5: Z² = 3.8416, p × (1 − p) = 0.25, numerator 0.9604, divided by e² = 0.0025, gives 384.16, rounded up to 385. Rounding up is mandatory: 384 respondents give a margin slightly wider than ±5%, and the sample size is the smallest integer that meets the specification, not the nearest one. The Sample Size Calculator applies the formula and rounds up, and it shows the Z value and the inputs, so the specification is auditable.
Confidence, margin, and the quadratic cost of precision
Confidence and margin trade against each other through the formula. Raising the confidence from 95% to 99% raises Z from 1.96 to 2.576, and the sample by the square of the ratio: 385 becomes 664, a 72% increase, for four more points of confidence. Halving the margin from ±5% to ±2.5% divides e² by 4, so the sample quadruples: 385 becomes 1,537. Halving again to ±1% gives 9,604. The cost of precision is quadratic in the margin and quadratic in Z, and it is the reason surveys cluster at 95% and ±5%: that combination is affordable, and tighter combinations quickly are not.
The margin is in percentage points, not percent. A ±5% margin on a 40% proportion means the interval 35%–45%, not 38%–42%. The distinction matters when the proportion is small: a ±5-point margin on a 3% proportion gives an interval from −2% to 8%, which is useless on the low side, and the proportion’s relative precision is terrible. For small proportions, specify the margin in absolute points that make sense for the decision, or use a method designed for rare events, and do not quote a ±5% margin as if it were ±5% of the estimate.
The decision the survey supports should set the margin. A survey that decides a product launch needs a tighter margin than one that monitors a trend; a survey whose result will be quoted to one decimal place needs a margin that justifies the decimal. A margin chosen because “5% is standard” without a decision behind it is a convention, not a specification, and a convention that costs 385 interviews deserves a reason. State the decision, derive the margin, and the sample size follows.
Finite populations, and the invitations that must be sent
Cochran’s formula assumes an effectively infinite population. For a finite population of size N, the correction is n_adj = n ÷ (1 + (n − 1) ÷ N). At N = 10,000, 384.16 becomes 369.98, rounded up to 370 — barely different. At N = 1,000, it becomes 278. At N = 500, it becomes 218. At N = 100, it becomes 80. The correction matters when the sample is a substantial fraction of the population — roughly above 5% — and it is negligible above a few thousand. The intuition is sampling without replacement: drawing from a small population removes a noticeable fraction of it, so each draw carries more information, and fewer draws are needed.
The correction is often misapplied to the wrong N. N is the population the survey generalises to — the customers, the employees, the residents — not the mailing list, the panel, or the number of people contacted. A survey of a company’s 500 employees has N = 500, however many former employees are on the mailing list. A survey of a city’s residents has N = the city’s population, not the number of phone numbers dialled. The population definition is part of the specification, and it should be stated with the sample size.
The statistical sample is not the number of invitations. If the expected response rate is 40%, the invitations needed are the sample divided by the rate: 385 ÷ 0.40 = 962.5, rounded up to 963. If the response rate is 10%, the invitations are 3,850. The response rate should be estimated from prior surveys of the same population and mode, not assumed, and the invitations should overshoot slightly, because a shortfall below the target sample widens the margin, while a small overshoot narrows it harmlessly. Non-response is also a bias, not only a count: the people who answer differ from those who do not, and a larger invitation list does not cure a biased sample. Weighting and follow-up address the bias; the sample size addresses only the precision.
Worked table: confidence against margin, at p = 0.5
Nine combinations, one formula, and the pattern is the lesson. At 90% confidence: ±10% needs 68, ±5% needs 271, ±3% needs 752. At 95%: ±10% needs 97, ±5% needs 385, ±3% needs 1,068. At 99%: ±10% needs 166, ±5% needs 664, ±3% needs 1,844. Reading across a row, halving the margin roughly quadruples the sample; reading down a column, raising the confidence from 90% to 99% roughly doubles it. The table’s corners show the extremes: the cheapest specification in the table, 90% and ±10%, needs 68 respondents, and the dearest, 99% and ±3%, needs 1,844 — twenty-seven times as many, for a specification that is tighter in both dimensions.
The table also shows why 95% and ±5% is the conventional choice: it sits in the affordable middle, and the neighbouring specifications are either much cheaper and much weaker, or much dearer and only somewhat stronger. Moving from 95% and ±5% to 99% and ±5% costs 279 more respondents for four points of confidence; moving to ±3% at the same confidence costs 683 more for two points of margin. The marginal cost of precision rises steeply, and the table prices it: every tightening has a number attached, and the number is the budget the tightening requires.
The table assumes p = 0.5, the conservative maximum, and an effectively infinite population. A known proportion reduces the numbers — at p = 0.2, the 95% and ±5% figure falls from 385 to 246 — and a finite population reduces them further through the correction. The table is therefore an upper bound for most real surveys, and a survey planned from it will meet its specification whatever the true proportion and population turn out to be, provided the sampling is random and the response is unbiased. A survey planned from a smaller figure, on an assumed proportion, meets its specification only if the assumption holds.
| Confidence | ±10% margin | ±5% margin | ±3% margin |
|---|---|---|---|
| 90% (Z = 1.645) | 68 | 271 | 752 |
| 95% (Z = 1.96) | 97 | 385 | 1,068 |
| 99% (Z = 2.576) | 166 | 664 | 1,844 |
Cochran’s formula at p = 0.5, rounded up; infinite population. Apply the finite population correction for small populations.
Pilot surveys: estimating p before committing
When the proportion is unknown, a pilot survey estimates it before the main survey commits its budget. A small pilot — 30 to 50 respondents, drawn the same way the main survey will be drawn — gives a rough estimate of p, and the main survey’s sample size is then computed at that p rather than at the conservative 0.5. If the pilot finds p = 0.2, the main survey needs 246 at 95% and ±5% instead of 385, a saving of 139 interviews. If the pilot finds p near 0.5, the saving vanishes, and the main survey needs the full 385 — but the pilot has confirmed that, rather than assumed it.
The pilot’s estimate is itself uncertain, and the main survey’s size should allow for it. A pilot of 40 that finds 8 yeses estimates p = 0.2, but the interval around that estimate is wide — roughly 0.09 to 0.36 at 95% confidence — and a main survey sized at p = 0.2 will miss its margin if the true p is 0.36. The safe practice is to size the main survey at the upper end of the pilot’s interval for p(1 − p), or to retain a margin: size at p = 0.3 when the pilot says 0.2, and the specification survives the pilot’s error. The pilot saves money only when its estimate is used cautiously; used boldly, it saves money and loses precision.
The pilot has a second job beyond estimating p: testing the questionnaire. A question that confuses pilot respondents will confuse main-survey respondents at scale, and a pilot that catches it saves the whole survey. The pilot should be run under the same mode, the same invitation, and the same timing as the main survey, so its response rate estimates the main survey’s invitations honestly — the 40% response rate in the invitations example should come from a pilot, not from hope. A pilot that tests the questions, estimates the proportion, and measures the response rate earns its small cost three times over.
Frequently asked questions
What sample size do I need for 95% confidence and ±5% margin?
385 respondents, at the conservative proportion p = 0.5. The calculation is 1.96² × 0.25 ÷ 0.05² = 384.16, rounded up to 385. For a finite population, apply the correction — at 10,000 it becomes 370.
How does halving the margin of error change the sample size?
It quadruples it, because the margin is squared in the denominator. ±5% needs 385, ±2.5% needs 1,537, and ±1% needs 9,604, all at 95% confidence and p = 0.5. Precision is quadratically expensive.
What is the finite population correction?
An adjustment for small populations: n_adj = n ÷ (1 + (n − 1) ÷ N), where N is the population size. At N = 10,000, it becomes 370; at N = 500, it becomes 218. Above a few thousand it barely matters.
Why use p = 0.5 for sample size?
Because p × (1 − p) is maximised at p = 0.5, so it gives the largest sample and guarantees the stated precision whatever the true proportion turns out to be. When the proportion is known from prior data, a smaller p gives a smaller sample, but the precision is then guaranteed only near that proportion.
How many invitations do I need to send?
Divide the target sample by the expected response rate. For 385 responses at a 40% response rate, send 963 invitations. Estimate the rate from prior surveys of the same population and mode, and overshoot slightly.
Does a bigger sample fix a biased sample?
No. Sample size controls precision — the margin of error — not bias. If the people who answer differ systematically from those who do not, a larger sample gives a more precise estimate of the wrong population. Weighting and follow-up address bias; size does not.
Try it on the calculator
Run your own figures through the calculator and see the answer in numbers.
Open the Sample Size Calculator →- 1Statistics Calculator
Mean, median, mode, and more, from a list.
- 2Sample Size Calculator
Confidence, margin, and proportion into the count, with the correction.
- 3Confidence Interval Calculator
The interval behind the headline figure.
- 4Percentage Calculator
Parts, wholes, and changes.
