Survey statistics
Margin of error calculator
The margin of error of a survey percentage is z × √(p(1 − p) / n): about ±3.1 points for 1,000 interviews at 95% confidence and p = 50%. Weighting widens it (divide n by the design effect), sampling a large share of a small population narrows it (finite population correction), and for small samples or results near 0% or 100% a Wilson or exact Clopper–Pearson interval is more honest than ± one number.
How results are checked
Named statistical review pending. Selected automated reference cases are published on the validation page.Run this on your own data — free, no signup
Upload a CSV, Excel, SPSS, Stata, SAS, R, Parquet or JSON file. Everything runs in your browser; your file never leaves your device.
Open the workspace →Calculate the margin of error
Enter the sample size and the percentage (or the count), choose a confidence level, and optionally add the population size and a design effect. You can also open a survey file — it is read in this browser tab and never uploaded — pick a question and a weight column, and the calculator fills in n, the weighted percentage and the Kish design effect.
Completed interviews in the base, before weighting.
Use 50% when you don't know yet: it gives the largest (safest) margin.
Applies the finite population correction to the margin of error.
1.0 for a simple random sample. Weighting and clustering raise it.
Compute the design effect from weights
One per line, or separated by commas or spaces. Kish: deff = n·Σw² / (Σw)².
Or read it from a survey file
Pick the question and the answers that count, and optionally a weight column. The file stays in this tab.
CSV, Excel, SPSS, Stata, SAS, R, Parquet, SQLite or JSON. The file is read in this browser tab and never uploaded. For Triple-S, select the .sss or .xml metadata file and its data file together.
Margin of error at 95% confidence
± 3.1%
The estimate is 50.0% ± 3.1%: the Wald interval runs from 46.9% to 53.1%. For small samples or percentages near 0% or 100%, read the Wilson or exact interval below.
Base n = 1000 · effective n = 1000.0 (deff 1.00)
MOE = z · √(deff · p(1 − p) / n) · FPC = 1.960 × 0.01581 = 0.03099
Confidence intervals
All four use the effective sample size (n ÷ deff). The finite population correction is applied to the margin of error only.
| Method | Lower | Upper | Width | 0–100% |
|---|---|---|---|---|
| Wald (normal approximation)The textbook ± margin. Too narrow for small n or extreme p. | 46.90% | 53.10% | 6.20% | |
| Wilson scoreRecommended default: good coverage at every n and p. | 46.91% | 53.09% | 6.19% | |
| Clopper–Pearson exactGuaranteed coverage; conservative (a little wide). | 46.85% | 53.15% | 6.29% | |
| Agresti–CoullAdd z²/2 yes and no, then Wald. Simple and close to Wilson. | 46.91% | 53.09% | 6.19% |
Margin of error by sample size
± margin at p = 50%, design effect 1.00; computed live from the same formula. Your n is highlighted when it is in the list.
| n | ± 90% | ± 95% | ± 99% |
|---|---|---|---|
| 50 | 11.6% | 13.9% | 18.2% |
| 100 | 8.2% | 9.8% | 12.9% |
| 200 | 5.8% | 6.9% | 9.1% |
| 300 | 4.7% | 5.7% | 7.4% |
| 400 | 4.1% | 4.9% | 6.4% |
| 500 | 3.7% | 4.4% | 5.8% |
| 600 | 3.4% | 4.0% | 5.3% |
| 800 | 2.9% | 3.5% | 4.6% |
| 1,000 | 2.6% | 3.1% | 4.1% |
| 1,500 | 2.1% | 2.5% | 3.3% |
| 2,000 | 1.8% | 2.2% | 2.9% |
| 2,500 | 1.6% | 2.0% | 2.6% |
| 3,000 | 1.5% | 1.8% | 2.4% |
| 5,000 | 1.2% | 1.4% | 1.8% |
| 10,000 | 0.8% | 1.0% | 1.3% |
Planning a survey instead? The sample size calculator works backwards from a target margin of error.
Four intervals, one percentage
The familiar ± margin is the Wald interval. It is fine for large samples and mid-range percentages, but its real coverage drops well below the nominal 95% when n is small or p is near 0% or 100% — at p = 0 it even claims zero uncertainty. The Wilson score interval fixes this and is the usual recommendation; Clopper–Pearson inverts the exact binomial test and never under-covers, at the cost of being a little wide; Agresti–Coull adds z²/2 successes and failures and then uses the Wald formula, landing close to Wilson.
Planning a study rather than reporting one? The sample size calculator uses the same formula backwards to find the n for a target margin.
The method
Formula
MOE = z · √(deff · p(1 − p) / n) · √((N − n)/(N − 1))
where
- z
- critical value: 1.645 (90%), 1.960 (95%), 2.576 (99%)
- p
- observed proportion (use 0.5 when planning — it maximises the margin)
- n
- completed interviews in the base
- deff
- design effect; with weights only, Kish's deff = n·Σw² / (Σw)² and the effective sample size is n / deff
- N
- population size; the last factor is the finite population correction (omit for large N)
- Wilson
- (p + z²/2n ± z·√(p(1 − p)/n + z²/4n²)) / (1 + z²/n)
Worked example
In our synthetic snack-brand tracker (generated sample data, not real respondents), 149 of 596 respondents are promoters (9–10 on the likelihood-to-recommend scale): p = 25.0%.
At 95% confidence the margin of error is 1.960 × √(0.250 × 0.750 / 596) = ±3.5%. The Wilson interval is 21.7% to 28.6% and the exact Clopper–Pearson interval 21.6% to 28.7% — with this many interviews the methods agree closely.
If the data were weighted with a design effect of 1.5, the effective sample size falls to 397 and the margin widens to ±4.3%.
Using it well
When to use it
Use it when
- Use: Reporting the precision of a single survey percentage or poll result.
- Use: Explaining why a subgroup with a small base has a much wider margin than the total.
- Use: Checking how much weighting costs you in effective sample size.
Not the right tool when
- Avoid: Comparing two percentages — the margin of each is not the margin of the difference. Use the two-proportion z-test.
- Avoid: Opt-in or non-probability samples: the formula measures sampling error only, not coverage or self-selection bias.
- Avoid: Means, medians or rating-scale averages — they need the standard deviation, not p(1 − p).
How to interpret it
Rule of thumb
A 95% interval means that the procedure captures the true population percentage in about 95% of repeated samples. Two percentages from the same survey can differ by less than twice the margin and still be significantly different (or not) — test the difference directly.
Questions
Frequently asked questions
What is a good margin of error for a survey?
Many published polls aim for about ±3 points at 95% confidence (roughly 1,000 interviews), but the right target depends on the decision. Use the table on this page to see how the margin shrinks with the square root of n: quadrupling the sample only halves the margin.
Why use p = 50%?
p(1 − p) is largest at p = 0.5, so 50% gives the widest margin — the safe choice when you plan a survey before you know the result, or when one margin is quoted for every question.
Which confidence interval method should I report?
Wilson is the usual recommendation: it keeps close to the nominal coverage for every n and p. Clopper–Pearson is preferred when you must guarantee at least nominal coverage (for example in regulated settings). The plain Wald interval is acceptable for large samples and percentages well away from 0% and 100%.
How does weighting change the margin of error?
Unequal weights increase variance. Kish's design effect, deff = n·Σw²/(Σw)², measures by how much; divide n by deff to get the effective sample size and use that in the formula. A deff of 1.5 turns 1,000 interviews into an effective 667.
When should I use the finite population correction?
When the sample is a sizeable share of the population — a common rule of thumb is more than about 5%, such as surveying 300 of 2,000 employees. For national or other large populations the correction is essentially 1 and can be ignored.
Sources and next steps
References & further reading
- [1]Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22(158), 209–212.
- [2]Clopper, C. J., & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26(4), 404–413.
- [3]Agresti, A., & Coull, B. A. (1998). Approximate is better than "exact" for interval estimation of binomial proportions. The American Statistician, 52(2), 119–126.
- [4]Brown, L. D., Cai, T. T., & DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical Science, 16(2), 101–133.
- [5]Kish, L. (1965). Survey Sampling. New York: Wiley.
- [6]statsmodels — proportion_confintstatsmodels.org
Try it on your own data — free, no signup
Upload a CSV, Excel, SPSS, Stata, SAS, R, Parquet or JSON file. Everything runs in your browser; your file never leaves your device.
Open the workspace →