Margin Of Error Calculator
Estimate margin of error for a proportion with confidence level, sample size, and population size. Great for surveys and quick planning checks.
Enter the Details
Result will appear here...
What the margin of error calculator does
The margin of error is the "plus or minus" attached to a survey result, the amount the true value might differ from what your sample found. This calculator works it out from your confidence level, sample size, sample proportion, and the size of the population you drew from.
It is the single number that tells you how much to trust a percentage from a sample, and it is central to planning a survey and reading its results. Below is how it works and what pushes it up or down.
How to use it
- Choose a confidence level from the list, from 70 percent up to 99.99 percent.
- Enter the sample size, the sample proportion as a percentage, and the population size.
- Press Calculate for the margin of error, or Reset to clear it.
How the margin of error is worked out
The margin combines a confidence multiplier with the spread of a proportion. The confidence level you pick sets a z-score, the multiplier, and the rest measures how much a sample proportion naturally varies:
Margin of error = z × √(p × (1 minus p) ÷ n), adjusted for the population size
Here p is your proportion and n is the sample size. A higher confidence level means a larger z-score and so a wider margin. The proportion matters too: the spread is largest when p is near 50 percent, which is the most cautious case, and smaller as it moves toward 0 or 100 percent.
What drives the margin
Three things set the size of the margin. Sample size is the big one: more responses give a smaller margin, because the estimate settles down as data piles up. But it improves with the square root of the sample size, so quartering the margin takes sixteen times the sample, which is why very small margins are expensive.
Confidence level is the second: demanding more confidence widens the margin. The third is the proportion itself, at its widest near 50 percent. If you do not yet know the proportion, using 50 percent gives the largest, safest margin, which is exactly why survey planners assume it when working out how many people to ask.
The population correction
This calculator asks for the population size because it applies a finite population correction. When your sample is a large slice of a small population, the margin of error is genuinely smaller than the basic formula suggests, since you have already surveyed much of the group there is to survey.
For a huge population, sampling a few thousand from millions, the correction barely changes anything, and the margin behaves as if the population were infinite. But for a small population, sampling 500 from 2,000, it makes a real, shrinking difference. Feeding in the population size lets the calculator account for this rather than overstating the margin.
A worked example
Suppose you survey 1,000 people from a large population, find a proportion of 50 percent, and want 95 percent confidence, which sets the z-score at 1.96.
The margin works out to about 3.1 percentage points, so a result of 50 percent really means somewhere around 47 to 53 percent. This is the classic "plus or minus 3 points" you hear with national polls, which is no accident, since a sample near a thousand at 50 percent is where that figure comes from. Had the population been small, say 2,000 rather than millions, the correction would have pulled the margin below 3 points.
Entering your values
Pick a confidence level, and enter the sample size, the sample proportion as a percentage between 1 and 100, and the population size, which must be at least as large as the sample. The margin of error is shown as a percentage to three decimal places.
Questions people ask
What is the margin of error?
The amount a sample result might differ from the true population value, at a given confidence level. It is the "plus or minus" reported with survey figures.
How do I make the margin smaller?
Survey more people, or accept a lower confidence level. Because the margin falls with the square root of the sample size, big reductions need much larger samples.
Why is 50 percent the worst case?
Because the spread of a proportion is largest at 50 percent. Planners assume it when they do not know the true proportion, since it gives the widest, safest margin.
Why does the population size matter?
When the sample is a large share of a small population, the margin is truly smaller, and the calculator applies a correction for that. For very large populations, the correction has almost no effect.
References
A quick note on where the methods here come from. The margin of error for a proportion, and the finite population correction, are set out in the NIST/SEMATECH e-Handbook of Statistical Methods, the US government's public statistics reference. OpenStax Introductory Statistics is a free, widely used textbook covering margins of error and sampling.
- NIST/SEMATECH e-Handbook of Statistical Methods (proportions and survey sampling). https://www.itl.nist.gov/div898/handbook/
- OpenStax, Introductory Statistics (confidence intervals and margins of error). https://openstax.org/details/books/introductory-statistics-2e
Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.
Other Tools
- Absolute Uncertainty Calculator
- Chi Square Calculator
- Chi-Square To P-Value Calculator
- Cohen'S D Calculator
- Confidence Interval Calculator
- Degrees Of Freedom Calculator
- P Value Calculator
- P-Value To Z-Score Calculator
- Relative Error Calculator
- Sensitivity And Specificity Calculator
- Standard Error Calculator
- T Statistic Calculator
- T Test Calculator
- Z Score Calculator
- Z-Score To P-Value Calculator