The formula
Standard error: SE = √(p(1 − p) ÷ n)
Finite population correction: FPC = √((N − n) ÷ (N − 1))
Margin of error = z × SE × FPC
Confidence interval = p ± margin of error
Worked example
- A poll of 1,000 people finds 52% support. At 95% confidence (z = 1.96):
- SE = √(0.52 × 0.48 ÷ 1,000) = 0.0158.
- Margin of error = 1.96 × 0.0158 = 0.031, or ±3.1 percentage points.
- Confidence interval: 48.9% to 55.1%. Since it includes 50%, the poll can't say for certain that a majority supports the idea.
What the margin of error means
The margin of error tells you how far a survey result could reasonably be from the true value for the whole population, purely because of random sampling. If a poll of 1,000 people finds 52% support with a ±3.1% margin at 95% confidence, the true level of support is probably between 48.9% and 55.1%. "Probably" has a precise meaning: if the poll were repeated many times with different random samples, about 95% of the intervals calculated this way would contain the true value.
Sample size and precision
The margin of error shrinks with the square root of the sample size, so quadrupling the sample only halves the margin. At 95% confidence and a 50% result, 100 responses give about ±9.8%, 400 give ±4.9%, 1,000 give ±3.1% and 2,500 give ±2.0%. That's why most national opinion polls survey 1,000–2,000 people: beyond that, extra responses cost a lot for little gain in precision. Use the sample size calculator to plan a survey for a target margin.
Subgroups have larger margins
The headline margin of error applies to the whole sample. Results for subgroups, such as young voters or one region, are based on fewer people and have larger margins. If 200 of the 1,000 respondents are under 30, their results have a margin of about ±6.9%, so apparent differences between subgroups often aren't meaningful. Reputable pollsters publish the subgroup sample sizes so you can check.
Comparing two numbers in the same poll
News reports often describe a race as a "statistical tie" when the gap between two candidates is within the margin of error. The margin for the difference between two answers in the same poll is larger than the margin for each one, close to twice as large when the two shares add up to nearly 100%. So a 52–48 lead in a poll with a ±3.1% margin isn't conclusive. Comparing results between two separate polls also needs care, since both carry their own error.
What the margin of error doesn't cover
The margin of error only accounts for random sampling variation. It doesn't cover other sources of error, which are often larger: people who don't respond may differ from those who do, the questions may be worded in a leading way, people may not answer honestly, and online panels may not represent everyone. Pollsters use weighting to correct known imbalances, such as age and education, but this adds uncertainty too. Treat the margin as a minimum estimate of the uncertainty.
Margins for averages and means
For a numeric result such as average income or average time spent, the margin of error is z × s ÷ √n, where s is the sample standard deviation. A survey of 400 people with a mean commute of 28 minutes and a standard deviation of 15 minutes has a 95% margin of 1.96 × 15 ÷ 20 = 1.5 minutes, so the true average is probably between 26.5 and 29.5 minutes. For small samples, under about 30, statisticians use the t-distribution instead of z, which gives a slightly wider interval.
Confidence levels and other tools
Higher confidence levels give wider margins: for the same poll, the 99% margin is about 31% larger than the 95% margin, and the 90% margin about 16% smaller. For numeric data rather than proportions, the margin is z × standard deviation ÷ √n; our standard deviation calculator gives the standard error of the mean directly. For comparing conversion rates between two groups, use the A/B test significance calculator.