Sample size calculator
Enter the confidence and margin of error, get the sample size.
How many people do I need to survey?
For 95% confidence and a ±5% margin of error, 385 responses — if the population is large. The formula is n = z² × p(1 − p) ÷ e², with z = 1.96, p = 0.5 and e = 0.05: 384.1, rounded up. This is Cochran’s formula for proportions, as presented in the University of Florida extension fact sheet “Determining Sample Size”. Plugging 385 back into the margin-of-error formula gives ±4.99 points.
What if my population is small?
Then fewer responses are enough: n ÷ (1 + (n − 1) ÷ N). For a population of 1,000, the same survey needs 278; for 2,000 it needs 323. This finite population correction matters when the sample would be more than a few percent of the population, and it hardly changes anything for large populations.
Why use 50% for the expected proportion?
Because p(1 − p) is largest at 50%, so it gives the safest (largest) sample size when you do not know the answer in advance. The fact sheet calls 50% the maximum-variability assumption. If earlier surveys suggest the true share is near 10%, the same ±5% at 95% needs only 139 responses; only lower p if you trust the estimate.
How does the margin of error change the size?
Sharply: halving the margin from ±5% to ±2.5% needs about four times the responses — 1,537 instead of 385. The confidence level matters too: at ±5%, 90% confidence needs 271 responses (z = 1.645), 95% needs 385 and 99% needs 664 (z = 2.576).
Does this account for people who do not respond?
No — it is the number of completed responses you need. Invite more people to allow for those who do not answer. The University of Florida fact sheet suggests adding about 10% for people you cannot contact and about 30% for nonresponse. If you expect 30% not to respond, send 385 ÷ 0.7 = 550 invitations to end up with 385 responses.
Worked example, step by step
A school wants to know what share of its 2,000 families support a later start time, with 95% confidence and a margin of ±5 points, and has no idea of the answer yet. Step one: z = 1.96 for 95%, p = 0.5, e = 0.05, so n₀ = 1.96² × 0.25 ÷ 0.05² = 384.1. Step two: because the population is only 2,000, apply the correction, n = 384.1 ÷ (1 + 383.1 ÷ 2,000) = 323 after rounding up. Step three: if about a third of families usually ignore school surveys, invite roughly 485 families.
Common mistakes when sizing a survey
First, rounding down: always round up, or the margin ends up slightly over your target. Second, using the total for subgroups: the formula gives the size for the whole sample, so if you want ±5% separately for each of four regions, you need 385 in each. Third, assuming the formula fits any design: it assumes simple random sampling, and stratified or clustered designs need the variation in each stratum or cluster taken into account. Fourth, using it to compare two groups or detect a difference: that is a power calculation, and the statistical power calculator is the right tool. Fifth, expecting a big sample to fix a biased one; a large convenience sample is still a convenience sample.
Sources: Israel, G. D. (1992), “Determining Sample Size”, University of Florida IFAS Extension fact sheet PEOD-6 (Cochran’s formula for proportions, finite population correction, adjustment for nonresponse); Cochran, W. G. (1963), Sampling Techniques, 2nd ed., as cited there. Related: margin of error calculator, confidence interval calculator, statistical power calculator, critical value calculator and two-proportion z-test.