How to Choose a Sample Size for a Study
By ToolzHive · · 4 min read
"How many people do I need?" is the first question in any survey or study, and it is usually answered too late — after the data is collected and someone realises the result is inconclusive. Choosing a sample size up front is not guesswork. It comes from four decisions you can make before you recruit a single participant.
The four things that set your sample size
Every sample-size calculation balances the same ingredients:
- What you are measuring — a single proportion (what percentage support a policy?), a single mean (average blood pressure), or a comparison between two groups.
- How precise you need to be — your margin of error, or the smallest difference worth detecting.
- How confident you want to be — usually 95%, meaning if you repeated the study many times, 95% of the intervals would contain the true value.
- For comparisons, the power — the chance of detecting a real effect if one exists, conventionally 80% or 90%.
Change any one of these and the required sample size moves. Tighter precision, higher confidence and higher power all cost more participants.
Surveys: estimating a single proportion
The most common case is a survey estimating a percentage — satisfaction, support, prevalence. The required size depends on the expected proportion and your margin of error. A useful quirk: the calculation needs the most participants when the true proportion is near 50%, so if you have no prior estimate, assume 50%. It gives the largest, safest sample.
As a rule of thumb, estimating a percentage to within ±5% at 95% confidence needs about 385 respondents — and that number barely changes whether your population is ten thousand or ten million, because for large populations the absolute size matters far more than the fraction you sample. Only for small, finite populations does the "finite population correction" meaningfully reduce the number.
Want a tighter ±3% margin? That pushes you past 1,000. Precision is expensive, and it scales with the square of the margin: halving the margin roughly quadruples the sample.
Comparing two groups: the role of power
When you are comparing two groups — a trial of A versus B, or two populations — precision alone is not enough. You also need power: the probability of detecting a difference that is really there.
Here the driver is the effect size — the smallest difference that would matter in practice. A small difference is hard to detect and needs a large sample; a large difference shows up with far fewer participants. This is why underpowered studies are so common: researchers hope for a big effect, design for it, and then miss the smaller-but-real effect that actually exists.
A practical sequence:
- Decide the smallest difference worth detecting (not the difference you hope to see).
- Estimate the variability (standard deviation) from pilot data or past studies.
- Set power at 80% as a minimum, 90% for anything confirmatory.
- Calculate — then add for dropout.
Always inflate for dropout
Your calculation gives the number of complete responses you need. People withdraw, skip questions, or never reply. If you expect 20% attrition, divide your target by 0.8 (not simply add 20%). For cluster samples — surveying by village, school or clinic rather than individuals — multiply by a design effect, often between 1.5 and 2, because people within a cluster tend to resemble each other.
Common mistakes
- Designing for the effect you hope for. Base the calculation on the smallest meaningful effect, or you will be underpowered for anything less.
- Confusing confidence with power. Confidence is about the precision of an estimate; power is about detecting a difference. Comparisons need both.
- Forgetting the denominator reality. A 10,000-person mailing list with a 3% response rate yields 300 responses — plan around what you can actually collect.
- Treating the number as exact. Sample-size formulas rest on assumptions. Round up, and build in a margin.
From decision to number
Once you have made the four decisions, the arithmetic is mechanical — and that is exactly what a sample-size calculator is for. Choose the design (proportion, mean, or two-group comparison), enter your margin or effect size, confidence and power, add your expected dropout, and read the number. The value of doing it before you start is not the number itself; it is being forced to state, in advance, how precise you need to be and how small an effect would still matter. That single act of honesty prevents most inconclusive studies.