Margin of Error Calculator

Calculate the margin of error and confidence interval of a poll or survey result from its sample size, proportion and confidence level.

Updated · Free · Runs in your browser

%

Leave at 0 for a very large population.

Margin of error (±) —
Confidence interval —
Standard error —
Finite population correction —
Z-score —
Smallest clear lead (approx.) —
    Was this calculator helpful?

    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

    1. A poll of 1,000 people finds 52% support. At 95% confidence (z = 1.96):
    2. SE = √(0.52 × 0.48 ÷ 1,000) = 0.0158.
    3. Margin of error = 1.96 × 0.0158 = 0.031, or ±3.1 percentage points.
    4. 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.

    Frequently asked questions

    What is a good margin of error?
    For general surveys, ±5% at 95% confidence is common. National polls usually aim for ±3% or less. Anything above ±10% gives only a rough picture.
    How do I calculate the margin of error?
    Multiply the z-score for your confidence level (1.96 for 95%) by √(p × (1 − p) ÷ n), where p is the proportion as a decimal and n is the sample size.
    Why does a 50% result have the largest margin?
    The variability of a yes/no answer, p × (1 − p), is greatest when the split is even. Results near 0% or 100% have smaller margins for the same sample size.
    What happens to the margin with a small population?
    If the sample is a large share of the population, the finite population correction shrinks the margin. Surveying 500 out of 1,000 people gives a margin about 30% smaller than for an unlimited population.
    Does a larger population need a larger sample?
    Not much. Precision depends on the number of responses, not the share of the population surveyed. A 1,000-person poll is about as precise for a whole country as for a city.

    ↑↓ to navigate · Enter to open