How the sample size is calculated
For a proportion — the share of people who answer "yes", prefer a product, or have a condition — the calculator uses Cochran's formula:
n₀ = z² · p(1 − p) ÷ E²
- z is the two-sided critical value of the standard normal distribution for your confidence level (1.645 for 90%, 1.960 for 95%, 2.576 for 99%).
- p is the proportion you expect. If you have no idea, use 50%: p(1 − p) is largest there, so the sample is big enough whatever the true value turns out to be.
- E is the margin of error, written as a decimal (5% = 0.05).
For a mean (average spend, blood pressure, test score) the formula is n₀ = (z · σ ÷ E)², where σ is the standard deviation of the measurement and E the margin of error in the same units.
The result is always rounded up — rounding down would leave the margin of error slightly larger than you asked for.
Finite population correction
The formula above assumes the population is very large compared with the sample. When you survey a noticeable share of a small, known population — the 500 employees of a company, the 2,000 students of a school — fewer responses are needed. The calculator applies Cochran's correction:
n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
where N is the population size. The correction matters only when n₀ is more than about 5% of N; for a population of a million the answer barely changes, which is why national polls of 1,000 people work as well for a large country as for a small one.
In margin-of-error mode the same idea appears as the factor √((N − n) ÷ (N − 1)), which shrinks the margin toward zero as the sample approaches the whole population.
Worked example
You want a survey result within ±5% at 95% confidence and you have no prior estimate, so p = 50%.
- z for 95% = 1.959964
- n₀ = 1.959964² × 0.5 × 0.5 ÷ 0.05² = 384.15
- Round up: 385 responses.
If the whole population is only 10,000 people: n = 384.15 ÷ (1 + 383.15 ÷ 10,000) = 369.97 → 370. If you expect 25% of invitations to be answered, send 370 ÷ 0.25 = 1,480 invitations.
The table under the calculator shows how quickly the requirement grows: ±3% needs 1,068 responses and ±1% needs 9,604 at the same confidence level.
What sample size cannot fix
The margin of error covers only random sampling error. It assumes a simple random sample in which every member of the population had the same chance of being chosen. Non-response, leading questions, self-selected online panels and coverage gaps create bias that no sample size removes. Cluster or stratified designs also change the required n through the design effect. Treat the number here as the minimum for a well-run random sample, and plan for subgroups separately: if you need ±5% for each of four regions, each region needs its own 385 responses.
Frequently asked questions
Why is 385 the standard survey sample size?
It is what Cochran's formula gives for a ±5% margin of error at 95% confidence with p = 50% and a large population: 1.96² × 0.25 ÷ 0.05² = 384.15, rounded up to 385.
Does a bigger population need a bigger sample?
Only up to a point. Once the population is more than about 20 times the sample, its size has almost no effect: 10,000 people need 370 responses and 10 million need 385 for ±5% at 95%.
What value of p should I use?
Use an estimate from a previous survey or pilot if you have one. Otherwise use 50%, which gives the most conservative (largest) sample size.
How do I estimate σ for a mean?
Use the standard deviation from a pilot study or similar past data. Without data, the range of plausible values divided by 4 is a common rough guess.
Is the margin of error the same as the confidence interval?
The margin of error is half the width of the confidence interval. A result of 52% ± 3% gives the interval 49% to 55%. Use the confidence interval calculator once you have data.
Sources & references
Last reviewed: