Find the sample size needed for a target margin of error, with the finite population correction, rounded up.
Margin of Error Calculator
Find the margin of error for a survey proportion, and say when the normal approximation behind it has broken down.
- Free
- No sign-up
- Runs in your browser
Input
The percentage who answered one way. Enter 50 or 0.5.
Enter 95 or 0.95 - both are read correctly.
How many digits to show when the answer is irrational. An exact answer ignores this.
Ready
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Enter the proportion observed and the sample size.
- 2
The interval is reported along with the margin; read the notes if the sample is small or the proportion extreme.
Questions about Margin of Error Calculator
Does this cover all the error in a survey?
No, only sampling error - the variation from having asked a sample rather than everyone. It says nothing about a sampling frame that missed people, a leading question, an interviewer effect, or non-response bias. In practice those are usually larger than the figure quoted here, which is why a poll inside its margin of error can still be badly wrong.
Why is the margin widest at 50%?
Because the variance of a proportion is p(1-p), which peaks at p = 0.5. A result near 0% or 100% is more precisely known from the same sample size, which is why survey planning assumes 50% - it gives the safest requirement.
Why does my interval go below zero?
Because the normal approximation has broken down. It needs roughly five expected successes and five expected failures; with 2% of 100 people there are only two expected successes, and the symmetric interval runs past 0, which a proportion cannot be. The tool says so. A Wilson or Clopper-Pearson interval handles that case properly.
Is my data sent anywhere?
No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.
Does the Margin of Error Calculator work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Margin of Error Calculator keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Compute a confidence interval for a mean using Student's t by default, which is the correct basis when the deviation came from the sample.
Evaluate an expression with exact fraction arithmetic, trigonometry, logarithms and factorials, reporting whether the result is exact.
Reduce a fraction to lowest terms, with its mixed number and exact decimal form including any repeating block.
Add two fractions exactly, showing the common denominator step and reducing the result.
Subtract one fraction from another exactly, showing the common denominator step.
Multiply two fractions exactly, multiplying across and reducing the result.
Divide one fraction by another exactly, by multiplying by the reciprocal.