TSE.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Mathematics · Statistics · Inferential Statistics

Margin of Error Calculator

Calculate the margin of error for a survey or poll given a confidence level, sample size, and population proportion.

Calculator

Advertisement

Formula

MOE is the margin of error; z* is the critical z-value for the chosen confidence level; p is the sample proportion (default 0.5 for maximum MOE); n is the sample size.

Source: Cochran, W.G. (1977). Sampling Techniques, 3rd ed. Wiley.

How it works

The margin of error is calculated as the product of the critical z-value (determined by your chosen confidence level) and the standard error of the proportion. The standard error equals the square root of p(1−p)/n, where p is the observed proportion and n is the sample size. A wider confidence level (e.g., 99%) produces a larger z* and therefore a larger MOE.

Using p = 0.5 gives the maximum possible margin of error for a given sample size, which is why pollsters often use it as a conservative default. Increasing the sample size reduces the MOE proportionally to the square root of n — to halve the MOE, you must quadruple the sample size.

Worked example

Suppose a poll of n = 1,000 respondents finds that p = 0.52 (52%) support a candidate, and you want a 95% confidence level (z* = 1.96).

Standard error = √(0.52 × 0.48 / 1000) = √(0.0002496) ≈ 0.01580

MOE = 1.96 × 0.01580 ≈ 0.03097, or about ±3.10%.

The 95% confidence interval is therefore 48.90% to 55.10%. We are 95% confident the true population support lies within this range.

Limitations & notes

This formula assumes simple random sampling; cluster or stratified sampling designs require design-effect adjustments. It also assumes the population is much larger than the sample (finite population correction is ignored). Non-response bias and question wording effects are not captured by the margin of error.

Frequently asked questions

What confidence level should I use?

95% is the most common standard in social science and polling. Use 99% when the cost of a wrong conclusion is high, accepting a wider margin of error.

Why is p = 0.5 the default proportion?

p(1−p) is maximized at p = 0.5, giving the largest (most conservative) margin of error. If you have prior knowledge of p, using it will yield a tighter interval.

How do I reduce my margin of error?

Increase the sample size — MOE shrinks proportionally to 1/√n. Lowering your confidence level also reduces MOE, but at the cost of less certainty.

Does margin of error account for all survey error?

No — it only captures random sampling error. Systematic biases such as non-response, coverage error, and poorly worded questions are not reflected in the MOE.

What is the difference between margin of error and confidence interval?

The margin of error is the ± half-width of a confidence interval. The confidence interval itself is p ± MOE, giving an explicit range for the true parameter.

Last updated: 2025-01-15 · Formula verified against primary sources.