Free margin of error calculator
Enter your sample size and confidence level. Add a population size to apply the finite population correction. See each step. No signup. All processing is in your browser.
The number of responses in your survey.
95% is the most common confidence level.
The number of people in the full group. If you leave this empty, the calculator does not apply the correction.
The percentage of responses that gave an answer. If you leave this empty, the calculator uses 50%.
Correct this input, then calculate again:
Your margin of error
Calculation steps
What is the margin of error?
You survey a sample of people, not the full group, so your result can be different from the result for the full group. The margin of error tells you the size of this difference. For example, 50% of a sample of 400 people select an answer. At 95% confidence, the margin of error is ±4.9%, so the estimate for the full group is 45.1% to 54.9%.
This calculator gives the margin of error for a percentage from a survey, and it shows each step. Your numbers stay in your browser.
Margin of error formula
For a percentage from a random sample, the formula is:
Margin of error = z × √(p × (1 − p) ÷ n)
In this formula:
- z is the z-score for your confidence level.
- p is the proportion, as a decimal. For example, 50% is 0.5.
- n is the sample size.
This calculator uses these z-scores:
| Confidence level | z-score |
|---|---|
| 80% | 1.282 |
| 85% | 1.440 |
| 90% | 1.645 |
| 95% | 1.960 |
| 99% | 2.576 |
Finite population correction
The first formula assumes that the full group is very large. If you know the size of the full group, and your sample is a large part of it, multiply by the finite population correction:
Finite population correction = √((N − n) ÷ (N − 1))
Margin of error = z × √(p × (1 − p) ÷ n) × √((N − n) ÷ (N − 1))
N is the population size. When you enter a population size, this calculator always applies the correction and shows it as a step.
Worked example
Sample size 400, 95% confidence, proportion 50%:
- Standard error: √(0.5 × 0.5 ÷ 400) = 0.025
- Margin of error: 1.96 × 0.025 = 0.049, which is 4.9%
The same input, with a population size of 1,000:
- Finite population correction: √((1,000 − 400) ÷ (1,000 − 1)) = 0.775
- Margin of error: 0.049 × 0.775 = 0.038, which is 3.8%
How to use the calculator
- Enter the sample size. This is the number of responses.
- Select the confidence level.
- If you know the size of the full group, enter the population size. If you have a result, enter the proportion as a percentage.
- Select Calculate margin of error. Read the result and the calculation steps. If an entry is not valid, a message tells you what to correct.
Margin of error FAQ
What is a good margin of error?
This page does not give a fixed limit, because the correct margin depends on the decision that you must make. For reference, at 95% confidence and a proportion of 50%, with no correction, ±5% needs 385 responses and ±3% needs 1,068 responses.
Why is the default proportion 50%?
The value of p × (1 − p) is largest at 50%, so the margin of error is also largest. If you do not have a result yet, 50% gives the highest margin of error that your sample can have.
When does the population size change the result?
It changes the result by a large amount only when your sample is a large part of the population. With a sample of 400, a population of 1,000 gives 3.8%, but a population of 1,000,000 gives 4.9%. Analysts often apply the correction when the sample is more than 5% of the population.
How many more responses do I need to make the margin of error smaller?
To make the margin of error half its size, you need four times the responses. At 95% confidence and a proportion of 50%, 100 responses give 9.8% and 400 responses give 4.9%.
What does the margin of error not include?
It includes only the error that comes from asking a random sample. It does not include errors from unclear questions or from people who did not respond. If people chose to take part, for example from a link on a website, the sample is not random, and the formula can make the result seem more accurate than it is.
Is my data sent to a server?
No. The calculation runs in your browser, and this page does not send or save your numbers. The site uses Plausible analytics to count page visits. Plausible does not receive what you enter.
Do I need an account?
No. The calculator is free and needs no signup.
Method source: Margin of error, Wikipedia.