Margin of Error Calculator
The margin of error for a proportion is E = z × sqrt(p(1−p)/n), where p is the sample proportion (as a decimal), n is the sample size, and z is the standard-normal critical value for the chosen confidence level (1.96 for 95%).
Enter Values
Before you rely on this: First-pass guide only. Verify safety-critical or regulated work against the relevant standards, your project requirements and a qualified professional.
How to use this calculator
- Enter the confidence level you need (95 is the standard for polling; 80, 85, 90, 98 and 99 are also supported).
- Enter the sample proportion p as a percentage — use 50% if you don't know it, as that gives the largest, most conservative margin.
- Enter the sample size n (the number of people or items surveyed). Optionally add the total population N to apply a finite population correction for small populations.
How it works
The margin of error for a proportion is E = z × sqrt(p(1−p)/n), where p is the sample proportion (as a decimal), n is the sample size, and z is the standard-normal critical value for the chosen confidence level (1.96 for 95%). The confidence interval is simply p ± E.
When you supply a population size N, the standard error is multiplied by the finite population correction factor sqrt((N−n)/(N−1)). This shrinks the margin when the sample is a large fraction of the whole population; for large or unknown populations the factor is ≈1 and can be ignored, so leaving N blank is fine.
Worked example
Margin of error for a 1,000-person survey at 95% confidence. A poll surveys n = 1000 people and 50% support a proposal (p = 50%, the value that gives the widest, most conservative margin). At 95% confidence the z-score is 1.96. The standard error is sqrt(0.5 × 0.5 / 1000) = 0.015811, so the margin of error = 1.96 × 0.015811 = 0.03099 = ±3.099%. The 95% confidence interval is therefore 46.901% to 53.099% — you can be 95% confident the true level of support falls in that band.
Common mistakes
- Entering the proportion as a decimal (0.5) instead of a percentage (50) — this tool expects p in percent.
- Confusing confidence level with margin of error. A higher confidence level (99% vs 95%) uses a larger z-score and produces a WIDER margin, not a narrower one.
- Forgetting that p = 50% gives the maximum margin of error. If your true proportion is far from 50%, the actual margin is smaller than the worst-case figure.
Frequently asked questions
What is a margin of error in a survey?
It is the ± range around a sample result within which the true population value is expected to lie, at a stated confidence level. A poll reported as 50% ±3% at 95% confidence means the true value is very likely between 47% and 53%.
What sample size do I need for a 3% margin of error?
At 95% confidence with p = 50%, a margin of about 3% needs roughly n = 1,067 (E = 1.96 × sqrt(0.25/n)). Increasing the sample reduces the margin, but only with the square root of n, so halving the margin requires roughly four times the sample.
Why use 50% for the proportion if I don't know it?
The term p(1−p) is largest at p = 0.5, so using 50% produces the widest, most conservative margin of error. This guarantees your reported margin is never too small, whatever the real proportion turns out to be.
When should I enter a population size?
Only when your sample is a large fraction of a small, finite population (for example 500 out of 5,000). The finite population correction then narrows the margin. For large or effectively infinite populations, leave it blank.
Related tools
- Z-Score Calculator
- Standard Deviation Calculator
- Standard Error of the Mean Calculator
- Confidence Interval Calculator
- Normal Distribution Calculator
- Binomial Probability Calculator
Explore more in Maths, Education & Science.
Tip: Enter any known values to calculate the remaining results.
All calculations run in your browser. Your inputs are never saved or transmitted.



