Sample Size Calculator
Enter a confidence level, an expected proportion, and a margin of error to get the sample size you need — plus the whole number of respondents to recruit.
Use decimals
Enter the proportion and margin of error as decimals between 0 and 1 — 0.5 for a 50% split, 0.05 for a ±5% margin.
What is a sample size calculator?
How many people you need to survey
A sample size calculator tells you how many responses a survey or poll needs so that its result stays within a chosen margin of error at a chosen confidence level. Survey too few people and the estimate is too uncertain to act on; survey too many and you waste time and money. The calculation turns three inputs — the z-score for your confidence level, the expected response proportion, and the acceptable margin of error — into the required number of respondents. It is the number behind every "±3 percentage points" you see quoted under an opinion poll.
Enter a z-score, a proportion, and a margin of error as decimals to get the exact sample size and the recommended whole number of respondents instantly.
The required sample size is the squared z-score times the proportion times one minus the proportion, all divided by the squared margin of error.
n = (z² × p × (1 − p)) / E²Take the classic opinion poll: 95% confidence (z = 1.96), an unknown split so p = 0.5, and a ±5% margin (E = 0.05). The squared z-score is 3.8416, multiplied by 0.5 × 0.5 = 0.25 gives 0.9604, and dividing by 0.05² = 0.0025 gives 384.16. Because you cannot survey a fraction of a person, you round up to the recommended 385 respondents. Using p = 0.5 is deliberate: p × (1 − p) is largest there, so it produces the safest, largest sample whenever the true proportion is unknown.
The formula is exact, but a few practical points are worth keeping in mind.
Infinite population and consistent decimals
This is the standard formula for an infinite or very large population. For a small, finite group you can apply a finite population correction afterwards, which slightly lowers the sample size when your sample exceeds about 5% of the whole population. Enter the proportion and margin of error as decimals between 0 and 1 — 0.05, not 5 — or the result will be far too small, and remember that halving the margin of error roughly quadruples the sample you need.