📊 Sample Size Calculator
Sample Size Calculator
Margin of Error from a Sample
Running a survey and wondering how many replies make the results believable? This calculator uses Cochran's formula — the standard method pollsters rely on — to turn your margin of error and confidence level into a concrete respondent count.
If your audience is small, the finite population correction shrinks the required sample fairly: surveying 370 people out of 10,000 gives the same ±5% precision at 95% confidence as surveying 384 out of ten million.
How to use this calculator
Enter your population size, the margin of error you can live with, and your confidence level. The calculator returns the number of completed survey responses you need.
- Type the total size of the population you are studying, for example 10000 customers.
- Enter your margin of error as a percent, such as 5 for plus or minus 5 percent.
- Pick the confidence level: 90, 95 or 99 percent.
- Press Calculate and read the required sample size, rounded up to a whole respondent.
Worked example: a survey of a town of 10,000
You want a margin of error of 5% at 95% confidence, with no idea how the town splits — so the proportion is left at its safest value, 50%.
Step 1 — the raw size (Cochran’s formula): n₀ = z² × p(1 − p) ⁄ e² = 1.96² × 0.5 × 0.5 ⁄ 0.05² = 3.8416 × 0.25 ⁄ 0.0025 = 384.16 → 385 people. The 50% proportion gives the largest sample the question could need, which is why it is the safe default.
Step 2 — the finite population correction: sampling 385 out of only 10,000 is a real bite of the town, so the correction trims it: n = 384.16 ⁄ (1 + 383.16 ⁄ 10,000) ≈ 370 people. When the population is huge this step changes almost nothing; when it is small it can save you a lot of knocking on doors.
Step 3 — the reverse question: already have permission for 400 responses? At 95% confidence with the same 50% assumption, your margin is 1.96 × √(0.25 ⁄ 400) = 4.9% — the reverse mode answers this direction too.
What does this sample size calculator compute?
It computes how many survey responses you need so your results fall within your chosen margin of error at your chosen confidence level. It uses Cochran's formula with the most conservative 50 percent response split, then applies the finite population correction for your audience size.
How many answers are enough?
Survey too few people and the result bounces around by luck; survey everyone and you did not need a survey. Sample-size calculation finds the middle: the smallest sample whose result you can trust to within a margin of error you choose, at a confidence level you choose. Two honest admissions before the arithmetic: a smaller margin costs a much bigger sample (halving the margin roughly quadruples the size), and 95% confidence is a convention, not a law of nature — it means the method lands within the margin about 95 times in 100.
The z-values behind the confidence levels
| Confidence level | z-value | What it buys you |
|---|---|---|
| 90% | 1.645 | A smaller sample; 1 survey in 10 misses the margin |
| 95% | 1.96 | The standard reporting choice |
| 99% | 2.576 | Stronger assurance; at a 5% margin the raw size jumps to about 664 |
Why the proportion you expect changes everything
The formula’s p(1 − p) term peaks at p = 50%. If you genuinely expect a landslide — say a 90/10 split — then p(1 − p) falls to 0.09 and the required sample falls with it. Enter your expected proportion if you have a defensible one from a previous survey or a pilot; leave it at 50% if you are guessing, because a guess that is wrong in the optimistic direction leaves the finished survey weaker than promised.
Frequently asked questions
How many people do I need to survey in a town of 10,000 for a ±5% margin?
At 95% confidence with the safe 50% proportion, Cochran’s formula gives 384.16, so 385 — and the finite population correction for a town of only 10,000 brings it down to about 370. Both steps are shown in the worked example above.
Why does everyone default to a 50% proportion?
Because p(1 − p) — the part of the formula driven by how the answers split — is largest at 50/50. Using 50% guarantees the sample is big enough whatever the real split turns out to be. It is the cautious choice, and this calculator now lets you replace it with an expected proportion when you truly have one.
I can only get 400 responses. How accurate will my survey be?
Use the reverse mode. At 95% confidence and the 50% assumption, 400 responses give a margin of error of about 4.9%. Accuracy from a fixed sample is a perfectly reasonable way to plan — you just report the margin you actually achieved.
Does a bigger population need a proportionally bigger sample?
Barely, and that surprises people. The raw formula does not use population size at all — a country of millions needs roughly the same sample as a city for the same margin. Population only enters through the finite population correction, which matters when the sample is a noticeable fraction of the whole group.
What happens if I demand 99% confidence instead of 95%?
The z-value rises from 1.96 to 2.576, and the raw sample size at a 5% margin rises from about 385 to about 664. Higher confidence is bought with interviews — there is no free version of certainty.







































