Home/Calculators/Statistics/Margin of Error Calculator

Margin of Error Calculator

Find the margin of error for a survey proportion from your sample, instant and free.

margin-of-error-calculator
Result
—
In summary: The margin of error for a proportion is z × √(p(1 − p) ÷ n). With p = 0.5, n = 1000 and z = 1.96, that is 1.96 × √(0.25 ÷ 1000) = 0.0310, so the margin of error is ±3.10%.

How to calculate the margin of error

For a survey proportion, the margin of error is z × √(p(1 − p) ÷ n), where p is the sample proportion, n the sample size, and z the confidence z-score. With p = 0.5, n = 1000 and z = 1.96, the result is 1.96 × √(0.25 ÷ 1000) = 0.0310, or ±3.10%. The figure is a critical value times the standard error, so that is the quantity to get right first.

How to use this calculator

Enter the sample proportion as a decimal between 0 and 1, the sample size, and the z-score for your confidence level. Using p = 0.5 gives the most conservative (largest) margin. To plan a sample for a target margin, use the sample size calculator.

  • Enter p as a decimal, not a percentage: 45% is 0.45, and typing 45 will be rejected.
  • Report the margin as ±, so a poll at 45% with ±3.10% spans roughly 41.9% to 48.1%.
  • Sampling error only. This says nothing about biased questions, poor coverage or people refusing to answer.

What affects the margin of error

The margin shrinks as the sample size grows (it depends on √n) and is widest when p = 0.5. A higher confidence level raises z and widens the margin. To turn a margin into a range around a mean, see the confidence interval calculator.

Frequently asked questions

How do I calculate the margin of error?
Use z × √(p(1 − p) ÷ n). With p = 0.5, n = 1000, z = 1.96 the margin is ±3.10%.
Why use p = 0.5?
p = 0.5 maximizes p(1 − p), giving the largest, most conservative margin of error.
How do I reduce the margin of error?
Increase the sample size. Because it depends on √n, quartering the margin requires roughly 16 times the sample.
Which z-score should I use?
Use 1.645 for 90%, 1.96 for 95%, or 2.576 for 99% confidence.
Can I use this for a mean instead of a proportion?
No — this formula is only for proportions. For a sample mean the margin is z × s ÷ √n, where s is the sample standard deviation, so you need the spread of your data rather than a percentage.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: July 27, 2026 · Calculations run in your browser. Estimates for information only.