Sample Size Calculator: How to Find the Right Sample Size
TL;DR: A sample size calculator turns four choices into one number: how many responses you need. You set a confidence level (usually 95%), a margin of error (usually 5%), an expected proportion (0.5 if you do not know it), and your population size if you know it. For a large population at 95% confidence and 5% margin of error, the answer is 384 responses.
Every survey starts with the same practical question: how many people do I need to ask? Ask too few and your results are too shaky to use. Ask too many and you waste time, money and goodwill. A sample size calculator answers the question in seconds — but only if you understand what you are putting into it. This guide explains what sample size means, what each input does, and how to work through a real example so you can trust the number you get.
The maths behind it is the standard formula for a proportion. You do not need to memorise it, but knowing what each input controls stops you accepting a wrong number. Try it as you read with our free Sample Size Calculator.
What is sample size?
Sample size is the number of people, items or observations included in a study. In a survey it is the number of completed responses you collect, usually written as n. If you survey 300 customers, your sample size is 300. If you test 50 products from a production line, your sample size is 50.
Sample size matters because surveys almost never reach everyone. You ask a slice of the population and use their answers to estimate what the whole population would say. That estimate is never exact — it carries sampling error, the gap between the sample result and the true result. A larger sample shrinks that gap, so your estimate gets closer to the truth. That is the whole point of calculating a sample size: to choose a sample big enough that the gap is small enough to live with.
But bigger is not always better: the error shrinks with the square root of the sample size, so going from 100 responses to 400 roughly halves the margin of error, while going from 400 to 1,600 only halves it again at four times the effort. And no sample size can fix a biased sample — asking only your happiest customers gives the wrong answer at any size.
The four inputs a sample size calculator needs
A standard sample size calculator asks for four things, and each one changes the answer — so understand what each means before you type in numbers.
| Input | What it means | Usual choice |
|---|---|---|
| Confidence level | How sure you want to be that the true value falls inside your margin of error | 95% |
| Margin of error | How far off the true value you are willing to be, in percentage points | 5% |
| Population size | How many people are in the whole group you are studying | Leave blank if unknown or very large |
| Expected proportion | Your best guess at the share of people who will give a particular answer | 0.5 (50%) if you do not know |
Confidence level: how sure do you need to be?
The confidence level says how often the method would capture the true value if you repeated the survey many times. At 95% confidence, about 95 out of 100 such surveys would produce an interval that contains the true value. In practice, 95% is the standard that most surveys, studies and assignments use.
Raising the confidence level raises the sample size: the z-score is 1.645 at 90%, 1.96 at 95% and 2.576 at 99%, and the sample size grows with its square. Moving from 95% to 99% confidence needs roughly 73% more responses for the same margin of error, so unless your decision is high-stakes — medical research, safety testing — 95% is usually the right balance. The guide on confidence level explained works through the trade-off in detail.
Margin of error: how precise must the answer be?
The margin of error is the range around your result. If 60% of your sample say they are satisfied and your margin of error is 5%, the true figure for the whole population is probably between 55% and 65%. A smaller margin of error means a tighter range and a more useful result — but it costs responses. Halving the margin of error, from 10% to 5%, quadruples the sample size, because the margin of error sits squared in the denominator of the formula.
Most surveys use 5%, which is precise enough for ordinary decisions without demanding an unmanageable number of responses. Use 3% when a decision turns on a small difference, and 10% only for a quick pilot or a rough sense of direction.
Population size: when it matters and when it does not
The population size is the total number of people your survey is about: every student in a school, every customer on a list, every resident of a town. If the population is very large, or you do not know it, you can leave it out — the calculator uses the formula for an unlimited population, and the answer barely changes once the population passes a few thousand.
Population size matters when it is small. If you are surveying 200 employees, you cannot need a sample of 384 — there are not that many people. The calculator applies a finite population correction, which shrinks the sample size to fit the population. For a population of 200 at 95% confidence and 5% margin of error, the corrected sample size is 132, not 384. If the population is small enough that the corrected sample is most of it, surveying everyone is often simpler. Slovin’s Formula Calculator is a quick alternative when the population is known and you only need a rough number.
Expected proportion: why 0.5 is the safe default
The expected proportion is your best guess at the share of people who will answer a particular way — for example, the proportion who will say yes. It matters because a close split needs more responses than a lopsided one: telling 50% from 55% is harder than telling 5% from 10%. The proportion enters the formula as p × (1 − p), which is largest when p = 0.5, so using 0.5 gives the largest — and therefore safest — sample size.
Use 0.5 whenever you do not have a good prior guess. If earlier research says about 20% of customers use a feature, you can enter 0.2 for a smaller sample, since 0.2 × 0.8 = 0.16 is less than 0.5 × 0.5 = 0.25 — but only if the earlier figure is solid, or an optimistic guess will leave you short.
Worked example: a customer survey
Suppose a shop with 2,000 customers wants to survey satisfaction at 95% confidence with a 5% margin of error, and has no prior guess about the result. The calculator works in two steps.
- Work out the sample size for an unlimited population. With z = 1.96, p = 0.5 and e = 0.05, the formula gives n₀ = 1.96² × 0.5 × 0.5 / 0.05² = 3.8416 × 0.25 / 0.0025 = 0.9604 / 0.0025 = 384.16.
- Apply the finite population correction. With N = 2,000, n = 384.16 / (1 + (384.16 − 1) / 2,000) = 384.16 / 1.19158 = 322.4, which rounds up to 323 customers.
Notice that the correction only trimmed the number from 384 to 323; with a population of 500 it would be 218, and with 200 it would be 132. The smaller the population, the more the correction matters.
Also remember that 323 is completed responses, not invitations. If only 30% of invited customers reply, the shop must invite about 1,077 people to get 323 answers (323 / 0.30 = 1,076.7). Always plan the invitations from the response rate you expect, not from the sample size alone.
Common mistakes when choosing a sample size
The most common mistake is confusing sample size with response rate: a calculator gives you the number of completed responses you need, and you still have to invite enough people to get them. A second mistake is copying a sample size from another survey without checking the settings — 384 is only right at 95% confidence and 5% margin of error, and a survey that needs 3% precision needs 1,068 responses, not 384.
A third mistake is treating the calculator’s answer as exact. The formula assumes simple random sampling, so if you survey whoever is easiest to reach, the number is not meaningful — a convenience sample of the calculated size is still a convenience sample. And a fourth mistake is rounding down: 322.4 responses is not a real number of people, and 322 falls just short, so always round up to 323.
Get the inputs right, round up, and plan for the response rate — and read the sample size formula explained for the step-by-step maths.
Frequently Asked Questions
What is sample size?
Sample size is the number of people, items or observations included in a study or survey. It is the number of completed responses you need before you can trust your results, and it is usually written as n.
What inputs does a sample size calculator need?
A standard sample size calculator needs a confidence level, a margin of error, and an expected proportion. If the population is small or known, it also needs the population size so it can apply the finite population correction.
What is a good sample size for a survey?
There is no single good number, because it depends on the population, the margin of error and the confidence level you want. A common starting point is 384 responses, which is the sample size for a very large population at 95% confidence and a 5% margin of error.
Does a bigger sample size always give better results?
A bigger sample reduces sampling error, but only up to a point. Going from 100 to 400 responses cuts the margin of error roughly in half, while going from 400 to 1,600 only halves it again at four times the cost. A random sample matters more than a huge one.
What happens if my sample size is too small?
A sample that is too small has a wide margin of error, so your results could be far from the true value and small differences between groups will not show up. If the margin of error is wider than the difference you need to detect, the survey cannot answer your question.