AIWalay Tools

Margin of Error Calculator

Calculate the margin of error for a survey mean or proportion. Free tool showing the critical value, standard error and confidence interval.

About the Margin of Error Calculator

The margin of error is the ± range around a survey result that reflects sampling uncertainty. This free margin of error calculator computes it for a proportion or a mean, given your sample size and confidence level, and shows the resulting confidence interval so you can report results honestly.

For a proportion the margin is z × √(p̂(1 − p̂) ÷ n); for a mean it is z × (s ÷ √n). The z value comes from the confidence level — 1.645 for 90%, 1.96 for 95%, 2.576 for 99%. Because the margin shrinks with the square root of the sample size, precision improves slowly: to halve the margin you must quadruple the sample.

Pollsters, market researchers, students and anyone reporting survey data use this to state how reliable a result is. Everything runs privately in your browser with no signup.

How to Use the Margin of Error Calculator

  1. 1Choose whether your result is a proportion or a mean.
  2. 2Enter the sample size and the confidence level.
  3. 3For a proportion enter the observed percentage; for a mean enter the standard deviation.
  4. 4Read the margin of error and the full confidence interval.

Frequently Asked Questions

How do I calculate the margin of error for a poll?

Use z × √(p̂(1 − p̂) ÷ n). For a 50% result from 1,000 people at 95% confidence: 1.96 × √(0.25 ÷ 1000) = 0.031, or about ±3.1 percentage points. That is why national polls of around 1,000 people quote a ±3% margin.

Why is the margin of error largest at 50%?

The term p̂(1 − p̂) is maximised at p̂ = 0.5, so a result near 50/50 has the widest margin. Pollsters often report the 50% figure as a conservative worst case, since any other proportion gives a slightly smaller margin.

How does sample size affect the margin of error?

The margin falls with the square root of n. Going from 1,000 to 4,000 respondents (four times as many) only halves the margin, from about ±3.1% to ±1.55%. This diminishing return is why huge samples are rarely worth the cost.

What confidence level should I use?

95% is the standard for most surveys and research, balancing precision against certainty. Use 99% when being wrong is costly, accepting a wider margin, or 90% when a rougher estimate is acceptable and you want a tighter range.

Does the margin of error account for bad sampling?

No. It only reflects random sampling error. Bias from a non-representative sample, leading questions or low response rates is not captured, so a small margin of error does not guarantee an accurate poll.

Related Tools