Sample Size Calculator
Calculate the survey sample size needed for a chosen margin of error and confidence level, with a finite-population correction for smaller populations.
Comment utiliser cette calculatrice
- 1Choose your confidence level — 95% is standard for surveys.
- 2Enter the margin of error you can tolerate, such as ±5%.
- 3Set the expected proportion, or leave it at 50% for the safest estimate.
- 4Enter the population size for a small group, or leave it at 0 for a large one.
Comment ça marche
Sample size for a proportion
n₀ = z² × p(1 − p) ÷ E² finite population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N) z = critical value, E = margin of error, p = proportion p = 0.5 maximises n (most conservative)
Sample size determines how precisely a survey can estimate a proportion, and the formula works backward from the precision you want. The margin of error you are willing to accept, the confidence level, and the expected proportion together fix the sample size needed. A tighter margin of error or higher confidence demands a larger sample, since precision and certainty both cost data. The expected proportion enters through the term p(1 − p), which measures the variability of a yes/no outcome and is largest at 50% — so assuming a 50-50 split gives the biggest, most conservative sample size, guaranteeing the margin whatever the real answer turns out to be. For a small population, a correction reduces the required sample, because sampling a meaningful fraction of a finite group provides extra information; but for large populations this correction barely matters, which is why national and local polls need similar sample sizes.
Exemple détaillé
For a 95% confidence level and a ±5% margin of error, assuming a 50% proportion, the sample size is 1.96² × 0.5 × 0.5 ÷ 0.05² ≈ 384, so about 385 responses. This is why so many polls survey around 1,000 people (for ±3%) — the number is set by the desired precision, not the population.
Sample Size Calculator : le guide complet
Why sample size is set by precision, not population
The most counterintuitive fact about sampling is that the size of the population barely affects how many people you need to survey. To estimate the views of a city of 300,000 or a country of 300 million to the same precision requires roughly the same sample — around 1,000 people for a ±3% margin of error. This strikes most people as impossible; surely a bigger population needs a bigger sample? But it does not, once the population is large. What determines the sample size is the precision you demand, not the size of the group you are studying.
The intuition behind this is that a well-drawn random sample captures the variability of the population regardless of how big that population is. A spoonful of well-stirred soup tells you how the whole pot tastes whether the pot holds a litre or a swimming pool. Beyond a certain point, adding more people to the population you are sampling from adds essentially no new information for a fixed sample. This is why professional polls of entire nations survey only around a thousand people and still achieve a few percentage points of accuracy — the number comes from the margin of error, and the population size drops out of the arithmetic for anything large.
The levers: margin of error and confidence
Two choices drive the required sample size, and both involve trade-offs. The margin of error is how much wiggle room you accept around your estimate — a ±5% margin means a poll result of 52% could reflect anything from 47% to 57%. Tightening the margin makes the survey more precise but costs data steeply, because the sample size grows with the inverse square of the margin: halving the margin of error quadruples the required sample. This is why very precise polls are so expensive, and why most settle for ±3% or so.
The confidence level is how sure you want to be that the true value falls within your margin of error. Ninety-five percent is the near-universal default, but higher confidence, like 99%, requires a larger sample because it uses a bigger critical value. Together, these two settings encode how much risk of being wrong, and how much imprecision, you are willing to tolerate. Deciding them is a practical judgement about the stakes of the survey and the budget available, and the calculator turns that judgement directly into the number of responses you need to collect.
The proportion, and the limits of the number
The expected proportion — the split you anticipate in the answers — affects the sample size through how variable the outcome is. A near-unanimous result (say 95-5) is easy to estimate precisely with a small sample, because there is little disagreement to capture. A close split (50-50) is the hardest and needs the most data. Since you usually do not know the true split in advance, the safe move is to assume 50%, which produces the largest sample and guarantees your target margin of error no matter what the real answer turns out to be. This is why 50% is the default and the conservative choice.
It is worth remembering what the sample size formula does and does not guarantee. It ensures that, if your sample is truly random and representative, your estimate will fall within the margin of error at the stated confidence. It says nothing about bias. A sample that systematically over- or under-represents part of the population — through how it is recruited, who responds, or how questions are asked — can be precisely wrong, with a tight margin of error around a distorted figure. The calculated sample size is necessary for a reliable survey but not sufficient; achieving a genuinely representative sample is the harder, and more important, challenge.
Questions fréquentes
How many people do I need to survey?
It depends on your margin of error and confidence level, not the population size. For 95% confidence and a ±5% margin, you need about 385 responses; for ±3%, around 1,067. Assume a 50% proportion if unsure, which gives the safest, largest sample.
Why doesn't a bigger population need a bigger sample?
Because a random sample captures the population's variability regardless of its size, once the population is large. A city and a whole country need roughly the same sample for the same precision — the number is set by the margin of error, and population size drops out of the formula for large groups.
What margin of error should I use?
±5% is common for general surveys; professional polls often aim for ±3%. Tighter margins cost data steeply — halving the margin quadruples the sample needed. Choose based on how precise your results must be and your budget for collecting responses.
Why assume a 50% proportion?
Because it maximises the variability term p(1−p), giving the largest, most conservative sample size. Using 50% guarantees your target margin of error whatever the true split turns out to be, which is the safe choice when you can't estimate the real proportion in advance.