A confidence interval is the range around a survey result where the true figure for the whole population plausibly lies. This confidence interval calculator takes a percentage or an average with its sample size and returns the interval and the margin of error, at the confidence level you choose.
By the Wavefield Research team · Published Nov 13, 2026
Use this for a share of respondents: 52% approve, 7% had a problem. The result is the margin of error and the interval around that percentage.
A survey asks some people and reports on everyone. If 52% of 400 respondents approve of something, the figure for the full population is probably close to 52%, and a second sample of 400 would give a slightly different answer. A confidence interval puts numbers on “close to”. For this example it runs from 47.1% to 56.9%.
The confidence level describes the method. At 95%, the method produces a range that contains the true figure in about 95 of every 100 samples. The other five times the sample was unlucky and the range misses. You never learn which kind of sample you have, which is why a single result that matters gets confirmed with a second study.
Three things set the width. More respondents make the interval narrower. A percentage near 50% has a wider interval than one near 10% or 90%. And a higher confidence level costs width: being right more often requires claiming less.
For a percentage from a simple random sample, the textbook formula is short:
Here p is the percentage written as a proportion, n is the number of people who answered the question, and z depends on the confidence level. By hand it takes four steps:
52% of 400 respondents approve, so p = 0.52 and n = 400.
The square root of p x (1 - p) / n: 0.52 x 0.48 / 400 = 0.000624, and its square root is 0.025, or 2.5 points.
For a 95 confidence interval the multiplier is 1.96. So 1.96 x 2.5 = 4.9 points. That figure is the margin of error.
52 minus 4.9 and 52 plus 4.9 give an interval of 47.1% to 56.9%.
The multiplier is the only part that changes with the confidence level. The table shows the usual values and what each does to the same result, 52% of 400.
| Confidence level | Multiplier (z) | Margin for 52% of 400 |
|---|---|---|
| 80% | 1.28 | ± 3.2 points |
| 90% | 1.645 | ± 4.1 points |
| 95% | 1.96 | ± 4.9 points |
| 99% | 2.576 | ± 6.4 points |
The margin of error is half the width of the confidence interval. A poll that reports “plus or minus 3 points” is giving the half-width, and the interval is the result with that amount added and subtracted. So a margin of error calculator and a confidence interval calculator are one tool, and the percentage mode above prints both.
The margin depends on the sample size and on the percentage itself. This table gives it at 95% confidence for three percentages.
| Sample size | Result near 50% | Near 30% or 70% | Near 10% or 90% |
|---|---|---|---|
| 100 | ± 9.8 | ± 9.0 | ± 5.9 |
| 200 | ± 6.9 | ± 6.4 | ± 4.2 |
| 400 | ± 4.9 | ± 4.5 | ± 2.9 |
| 600 | ± 4.0 | ± 3.7 | ± 2.4 |
| 1,000 | ± 3.1 | ± 2.8 | ± 1.9 |
| 1,500 | ± 2.5 | ± 2.3 | ± 1.5 |
| 2,000 | ± 2.2 | ± 2.0 | ± 1.3 |
Two patterns are worth knowing by heart. The margin is widest at 50%, which is why polls quote the 50% figure as the margin for the whole survey: it is the worst case. And precision gets expensive quickly. Going from 400 to 1,000 responses takes the margin from 4.9 to 3.1 points. Going from 1,000 to 2,000 buys only 0.9 more. To plan a sample for a margin you have in mind, use the sample size calculator, which runs the same formula backward.
The simple formula works well for a result near the middle on a decent sample. It fails at the edges, and surveys produce edge cases all the time: a rare complaint, a small segment, a question nearly everyone agrees with.
Take 3 respondents out of 40 who report a billing error, 7.5%. The simple formula gives a margin of 8.2 points, so the interval runs from minus 0.7% to 15.7%. A negative share of customers is not a finding. Now take 0 out of 30. The simple formula returns a margin of exactly zero and an interval from 0% to 0%, which claims, on the strength of 30 interviews, that nobody in the whole population has the problem.
The fix has been known since 1927. The Wilson interval asks a slightly different question (which true percentages would make this result unsurprising?) and its answer never leaves the 0 to 100 range. For 3 of 40 it gives 2.6% to 19.9%. For 0 of 30 it gives 0% to 11.4%: the problem could affect up to about one customer in nine, and 30 interviews cannot rule that out.
The NIST engineering statistics handbook describes the Wilson method as recommended for virtually all combinations of sample size and percentage, and notes that its lower limit cannot be negative, which is not true of the formula most often used. The calculator on this page always reports the Wilson interval. It prints the simple plus-or-minus margin beside it, because that is the figure reports quote, and it tells you when the two disagree. Many online calculators offer only the simple formula.
For an average, such as a mean rating or a mean spend, the interval needs one more input: the standard deviation, which says how spread out the individual answers are. Survey tools and spreadsheets report it next to the mean.
The multiplier here is t in place of z. The standard deviation is itself an estimate from the sample, and t is a slightly larger multiplier that allows for it. On 150 responses the difference is trivial. On 25 it is not.
Example: a satisfaction rating averages 7.2 out of 10 with a standard deviation of 2.1. From 150 responses the interval is 6.86 to 7.54, a margin of 0.34. From 25 responses the same average has an interval of 6.33 to 8.07, a margin of 0.87, using t = 2.06. With 1.96 the margin would have come out as 0.82, a little narrower than the data supports.
One caution about averages of rating scales. A mean of 7.2 on a 0 to 10 scale hides whether respondents cluster in the middle or split between the two ends. When the shape matters, report a percentage (those who gave 9 or 10, say) and put the interval around that. Net Promoter Score works this way, and the NPS calculator has the margin for it.
The formula assumes every response counts equally and that the population is effectively unlimited. Real surveys often break one assumption or the other. The two optional fields in the calculator handle them, and they push in opposite directions.
Weighting widens the interval. When a sample is weighted to match the population, some respondents count for more than one person and others for less. The result is less biased and less precise. The loss is summarized by the design effect. Divide the sample size by it to get the effective base, the number that belongs in the formula. A result of 52% from 400 respondents has a margin of 4.9 points unweighted. With a design effect of 1.5 the effective base is 267 and the margin is 6.0. Reporting 4.9 there overstates what the survey knows. How weights are built, and where the design effect comes from, is in the survey weighting guide.
A small population narrows it. If you survey 400 of your 1,000 customers, you have heard from 40% of everyone, and there is less left to be wrong about. The finite population correction accounts for this: the margin for the same 52% drops from 4.9 points to 3.8. The correction only matters when the sample is a noticeable share of the population. At 400 out of 100,000 it changes nothing you could see.
Our own reports apply the first adjustment automatically. Toplines print the margin of error on the effective base, for the survey and for each question, and the design effect is shown beside it.
The interval measures the luck of the draw and nothing else. If satisfied customers answer more readily than unhappy ones, the estimate is off by an amount no formula on this page can see, and a larger sample makes that wrong number look more certain.
The arithmetic assumes a random sample. Most online surveys use quota samples or opt-in panels, where the interval is a convention borrowed from random sampling. It is still worth reporting. Say plainly that it is an approximation.
The margin quoted for the whole survey does not apply to its parts. A survey of 1,000 has a margin of 3.1 points. The 150 respondents under 30 inside it have a margin of 8.0. Run each subgroup through the calculator with its own base.
An interval describes one number. Whether two numbers differ is a separate test with its own arithmetic, and two overlapping intervals do not settle it.
For that last case, comparing two percentages, use the statistical significance calculator. Who answers and who does not is the subject of the guide to survey response rates.
It is a range around a survey result, built by a method that captures the true population figure in about 95 of every 100 samples. If 52% of 400 respondents approve, the 95% confidence interval runs from about 47% to 57%. The 95% describes how reliable the method is over many samples. It does not mean there is a 95% chance that this particular range holds the truth, although in practice people use it as a reasonable range of plausible values.
Take the percentage as a proportion p and the sample size n. The standard error is the square root of p x (1 - p) / n. Multiply it by 1.96 for 95% confidence to get the margin of error, then add and subtract that from the percentage. For 52% of 400: the standard error is 2.5 points, the margin is 4.9 points, and the interval is 47.1% to 56.9%. The calculator on this page does this and also corrects the cases where that simple formula fails.
They are two ways of writing the same thing. The margin of error is the half-width: plus or minus 4.9 points. The confidence interval is the full range that results: 47.1% to 56.9%. News reports usually quote one margin for the whole poll, calculated at 50% because that is where it is widest. An interval belongs to one specific result and is narrower for percentages far from 50%.
Use 95% unless you have a reason not to. It is the convention in polling and academic work, so readers assume it. Market research sometimes reports at 90%, which gives a narrower interval and a higher chance of being wrong. Use 99% when a wrong call is expensive. Whatever you choose, state it next to the result, because a margin of error without its confidence level cannot be interpreted.
Collect more responses, and expect diminishing returns. The margin shrinks with the square root of the sample size, so halving it takes four times as many completes: 400 responses give 4.9 points and 1,600 give about 2.5. A lower confidence level also narrows the interval, at the cost of being wrong more often. Heavy weighting widens it, so a sample that needs less correction is worth more than its size suggests.
Use z (1.96 at 95%) for percentages. Use t for averages, because the standard deviation is itself estimated from the sample and t allows for that. The difference matters on small bases: with 25 responses the t value is 2.06, and with 150 it is 1.98. Beyond a few hundred responses the two are the same to two decimals. The calculator applies t automatically in the average mode.
Strictly, the formula describes a random sample, and an opt-in online panel is not one. In practice researchers still report a margin for panel surveys as a guide to precision, because the alternative is reporting nothing. The honest version says what it is: an approximation that covers sampling variation under the assumption of a random sample, and that does not cover the possibility that panel members differ from everyone else.
Related: sample size calculator · statistical significance calculator · NPS calculator · survey weighting · how to analyze survey results
Wavefield reports show the margin of error on the effective base for the survey and for each question, weighting included. Building and previewing is free; fielding starts at $99 per study.
Start a study