Margin of error calculator
Enter the sample size and result, get the margin of error.
How is the margin of error calculated?
For a proportion: z × √(p(1 − p) ÷ n). At 95% confidence z = 1.96, so a poll of 1,000 people with a 50% result has a margin of ±3.1 points. Written out: 1.96 × √(0.5 × 0.5 ÷ 1,000) = 1.96 × 0.0158 = 0.031. Add and subtract it from the result to get the interval: 50% ± 3.1 points is 46.9% to 53.1%.
Why use 50%?
p(1 − p) is largest at 50%, so it gives the most cautious (widest) margin when the result is not known yet. Once you have a result far from 50%, the margin narrows: with 1,000 people and a result of 10%, it is ±1.9 points rather than ±3.1. A result of 50% therefore gives the widest margin a given sample can have.
How does sample size change it?
The margin shrinks with the square root of n: quadrupling the sample halves it. 500 people give ±4.38 points; 1,000 give ±3.10. A poll of 1,067 people, the example Pew Research Center uses, has a margin of ±3.0 points, and to guarantee ±3 points the sample-size formula gives 1,068 completed responses.
What about 99% confidence?
A higher confidence level widens the margin: ±4.07 points for 1,000 people at 99%, because z rises from 1.96 to 2.58. “95% confidence” means that if the same survey were repeated many times, about 95 of every 100 intervals built this way would contain the true value (Pew Research Center).
Does the population size matter?
Only when the sample is a large fraction of it. For a sample of 400 out of a population of 1,000 the finite population correction multiplies the margin by √[(N − n) ÷ (N − 1)], cutting it from ±4.90 to ±3.80 points. For a national poll the population is so large that the correction is negligible, which is why a sample of about a thousand works for a country of millions.
What does the margin not cover?
Only random sampling error — not problems like question wording, who answers, or who was reachable. Pew Research Center lists coverage gaps (for example people without internet access in an online poll), unwilling or dishonest answers and likely-voter models among the errors that a margin of error leaves out.
Common mistakes with margins of error
First, applying the headline margin to a subgroup. If 160 of 1,067 respondents belong to a group, that subgroup’s margin is ±7.7 points, not ±3. Second, comparing two results from the same poll as if each margin applied to the gap between them: for two candidates near each other, the margin of the lead is roughly twice the margin of a single figure (Pew), so a 5-point lead in a ±3 poll is not clear-cut. Third, calling a result inside the margin “a tie” or one outside it “certain”; the margin describes a range of plausible values, not a pass–fail line. Fourth, using the margin for a share when you are estimating an average: this calculator is for proportions, and the margin for a mean depends on the standard deviation of the data (see the confidence interval calculator).
Sources: Pew Research Center, “Understanding the margin of error in election polls” (2016); Israel, G. D. (1992), “Determining Sample Size”, University of Florida IFAS Extension fact sheet PEOD-6 (Cochran’s formula for proportions and the finite population correction). Related: sample size calculator, confidence interval calculator, standard error calculator, critical value calculator and z-score calculator.