Home / Articles / How to calculate margin of error

How to Calculate Margin of Error

Margin of error tells you how far off a survey result might be from the true population value, given the sample size and confidence level you chose.

Chris Terry
By Chris Terry, Founder & Editor
Updated June 17, 2026

Crunch your numbers

Paste your data set and get mean, variance, and standard deviation in seconds.

The margin of error is calculated as the critical z-value multiplied by the standard error of the proportion: MOE = z * sqrt(p * (1 - p) / n). For a 95% confidence level, z = 1.96. A smaller sample produces a larger margin of error.

The formula

MOE = z * sqrt( p * (1 - p) / n )

Where:

Worked example: finding the margin of error for 95% confidence

You survey 400 people; 52% say yes. What is the margin of error at 95% confidence?

StepCalculationValue
Identify z for 95%Standard table1.96
p = 0.52, n = 400p*(1-p) = 0.52 * 0.480.2496
Divide by n0.2496 / 4000.000624
Take square rootsqrt(0.000624)0.02498
Multiply by z1.96 * 0.024980.049 (4.9%)

The margin of error is plus or minus 4.9 percentage points. The true population proportion is likely between 47.1% and 56.9%.

What does a 2% margin of error mean?

A 2% margin of error means the survey result could be up to 2 percentage points above or below the true value. If 55% of respondents favor a policy, the actual figure in the full population is likely between 53% and 57% at whatever confidence level you chose.

What does 0.05 margin of error mean?

A margin of error of 0.05 (5 percentage points) is common in general-population surveys. To achieve a 5% margin at 95% confidence with p = 0.5, you need n = (1.96^2 * 0.25) / 0.05^2 = 384 people. Achieving a tighter margin requires a larger sample.

What is a good margin of error?

For national opinion polls, plus or minus 3% is standard. For internal business surveys, plus or minus 5% is usually acceptable. Scientific studies targeting real-world decisions often aim for 1% to 2%. The tighter the margin you need, the larger the sample you must collect. Cross-link your result with the confidence interval to understand the full range.

Crunch your numbers

Paste your data set and get mean, variance, and standard deviation in seconds.

Related reading

Good to know

FAQs

What is a 2% margin of error?

It means the survey result could differ from the true population value by up to 2 percentage points in either direction. If a poll shows 60% approval with a 2% MOE, the actual approval in the full population is likely between 58% and 62%.

What does 0.05 margin of error mean?

A margin of error of 0.05 means plus or minus 5 percentage points. At 95% confidence with an unknown proportion (p = 0.5), this corresponds to a sample of about 385 people.

How to find the margin of error for 95%?

Use z = 1.96 in the formula MOE = 1.96 * sqrt(p * (1 - p) / n). If you do not know the proportion in advance, substitute p = 0.5 to get the most conservative (widest) estimate. For a sample of 1,000 and p = 0.5, MOE = 1.96 * sqrt(0.25/1000) = approximately 3.1%.

What is a good margin of error?

It depends on the context. National opinion polling typically accepts plus or minus 3%. Internal business surveys often use 5%. Research requiring high precision may target 1% or less. A lower margin always requires a larger sample size.