Confidence Interval vs Margin of Error: The Short Answer
A confidence interval (CI) is a range of values computed from sample data that likely contains the true population parameter at a stated level of certainty (e.g., 95%). The margin of error (MOE) is the half-width of that range—the maximum expected difference between the sample estimate and the population value in either direction. The relationship is: CI = point estimate ± margin of error. The two terms describe the same statistical uncertainty from different angles: the CI shows the full plausible range, while the MOE summarizes that range as a single ± figure.
Consider a poll that finds 52% support with a 95% CI of (49%, 55%). The margin of error is ±3 percentage points—the distance from the sample estimate (52%) to either bound. If you know the MOE, you can reconstruct the CI. If you know the CI, you can calculate the MOE. The two values contain identical information.
Definitions: Confidence Interval and Margin of Error
What Is a Confidence Interval?
The term was introduced by the statistician Jerzy Neyman in a landmark 1937 paper and formalized alongside the decision-theoretic framework developed with Egon Pearson. Unlike a single point estimate—which gives one number for a population parameter—a confidence interval acknowledges that any single sample will differ from the true population value by some amount of sampling error. The interval captures that uncertainty explicitly.
A 95% confidence interval does not mean there is a 95% probability that the true parameter lies within the computed range. The true parameter either is or is not inside any specific interval you calculate—probability no longer applies to it once the data are observed. The correct interpretation: if you repeated the study 100 times under identical conditions, roughly 95 of the resulting confidence intervals would contain the true population value. This interpretation, though subtle, matters for how you communicate uncertainty in research and reporting. The American Statistical Association provides formal guidance on this distinction in its statements on statistical inference.
What Is the Margin of Error?
The margin of error appears most often in news reports of opinion polls. When a media outlet writes "±3 percentage points," they typically mean the margin of error at the 95% confidence level. Organizations like Gallup and the Pew Research Center publish their methodology alongside reported margins of error, including the confidence level used and the effective sample size after weighting.
The margin of error accounts only for random sampling error. It does not capture non-sampling errors like question wording bias, non-response bias, or coverage errors—errors that arise from how the survey was designed or conducted rather than from the randomness of who was selected. This is a common misconception worth addressing directly: a small margin of error does not guarantee an accurate poll.
The Mathematical Relationship Between CI and Margin of Error
The connection is direct and algebraic. Any symmetric confidence interval can be written as:
x̄ = sample point estimate
MOE = z* × SE
Width of CI = 2 × MOE
This means: if you see a confidence interval reported as (L, U), you can always recover the margin of error as MOE = (U − L) / 2. If you see a margin of error, the confidence interval is simply (point estimate − MOE, point estimate + MOE).
The margin of error itself is built from two pieces: the critical value (z* for proportions and large samples, t* for means with small samples) and the standard error (SE), which measures how much a sample statistic varies from sample to sample.
σ = population SD (or s when estimated)
n = sample size
p̂ = sample proportion
The critical value z* comes from the standard normal distribution and depends on your chosen confidence level. The three most common values are well established:
| Confidence Level | α (Significance) | Critical Value z* | Meaning |
|---|---|---|---|
| 90% | 0.10 | 1.645 | Wider intervals, lower certainty |
| 95% | 0.05 | 1.960 | Standard in most published research |
| 99% | 0.01 | 2.576 | Narrower risk of missing the parameter |
Confidence Interval and Margin of Error Formulas
Formula for a Population Mean
x̄ = sample mean
σ = population standard deviation
n = sample size
MOE = 1.96 × σ/√n
When σ is unknown (the usual case in practice), replace σ with the sample standard deviation s and replace the z* critical value with the t* critical value at n−1 degrees of freedom. See the confidence interval for a mean guide for the full derivation using the t-distribution.
Formula for a Population Proportion
p̂ = sample proportion
n = sample size
MOE = 1.96 × √[p̂(1−p̂)/n]
This is the formula used by virtually all election pollsters. A common approximation when p̂ is unknown or close to 0.5 is MOE ≈ 1/√n (at 95% confidence), which gives a quick upper bound. With n = 1,000, this yields MOE ≈ 3.16%—close to the ±3% figure you see in most major national polls. You can compute the exact value for your dataset with the confidence interval calculator.
For proportions near 0 or 1 where the normal approximation breaks down, statisticians prefer the Wilson score interval, which is documented on the Wilson score interval page. See also the confidence interval for proportion full guide.
Confidence Interval vs Margin of Error: Full Comparison
| Feature | Confidence Interval | Margin of Error |
|---|---|---|
| What it is | A range: (lower bound, upper bound) | A single ± number |
| Formula (means) | x̄ ± z* × σ/√n | z* × σ/√n |
| Formula (proportions) | p̂ ± z* × √[p̂(1−p̂)/n] | z* × √[p̂(1−p̂)/n] |
| Relation | CI = estimate ± MOE | MOE = width of CI ÷ 2 |
| Typical reporting context | Academic papers, clinical trials, research reports | News polls, surveys, public-facing data |
| Gives both bounds? | Yes — upper and lower | No — symmetric around estimate |
| Requires confidence level? | Yes — must be stated | Yes — usually 95%, often implied |
| Effect of larger n | Narrower interval | Smaller MOE |
| Effect of higher confidence | Wider interval | Larger MOE |
| Can it be zero? | No — always has positive width | Only if n → ∞ |
Confidence Interval vs Confidence Level
The confidence level (e.g., 95%) is the input to the calculation. The confidence interval is the output. Raising the confidence level from 95% to 99% makes the resulting interval wider, because you need to capture a higher proportion of all possible sample outcomes. The two are often confused in casual conversation but refer to distinct things: one is a probability, the other is a range.
| Term | Definition | Example |
|---|---|---|
| Confidence Level | Probability input (90%, 95%, 99%) | "We use 95% confidence" |
| Confidence Interval | The computed range | "(49.1%, 55.3%)" |
| Margin of Error | Half-width of the CI | "±3.1 percentage points" |
| Critical Value (z*) | z-score linking level to width | z* = 1.96 at 95% |
| Standard Error | Variability of the sample statistic | SE = σ/√n |
Margin of Error vs Standard Error
Standard error and margin of error are related but not the same. The standard error is the standard deviation of the sampling distribution of the statistic—a measure of how much the statistic would vary across repeated samples. The margin of error scales the standard error by the critical value: MOE = z* × SE. With a 95% CI (z* = 1.96), the margin of error is roughly twice the standard error.
Free CI & Margin of Error Calculator
Confidence Interval + Margin of Error Calculator
5 Fully Worked Examples
Example 1 — Election Poll (Proportion)
Problem: A polling firm surveys 1,067 registered voters. 54% say they plan to vote for Candidate A. Calculate the 95% confidence interval and margin of error.
Identify values: p̂ = 0.54, n = 1,067, z* = 1.96 (95% confidence)
Calculate Standard Error: SE = √[0.54 × 0.46 / 1,067] = √[0.2484/1067] = √0.0002328 = 0.01526
Calculate Margin of Error: MOE = 1.96 × 0.01526 = 0.0299 ≈ ±3.0 percentage points
Construct the Confidence Interval:
Lower: 0.54 − 0.030 = 0.510 (51.0%)
Upper: 0.54 + 0.030 = 0.570 (57.0%)
✅ Result: 95% CI = (51.0%, 57.0%) | Margin of Error = ±3.0 pp. The poll reports: "54% support Candidate A (±3 percentage points, 95% confidence)." The CI shows support almost certainly clears 50%.
Example 2 — Clinical Trial (Mean)
Problem: A clinical trial measures blood pressure reduction (mmHg) in 64 patients given a new drug. The sample mean is x̄ = 8.5 mmHg with sample standard deviation s = 6.4 mmHg. Compute the 95% CI and margin of error.
Identify values: x̄ = 8.5, s = 6.4, n = 64. Since σ is unknown, use t* at df = 63. At 95%, t* ≈ 2.000.
Standard Error: SE = s/√n = 6.4/√64 = 6.4/8 = 0.800 mmHg
Margin of Error: MOE = t* × SE = 2.000 × 0.800 = ±1.6 mmHg
95% CI: (8.5 − 1.6, 8.5 + 1.6) = (6.9 mmHg, 10.1 mmHg)
✅ Result: Researchers can report that the drug reduces blood pressure by an estimated 8.5 mmHg (95% CI: 6.9 to 10.1 mmHg). The CI excluding 0 provides evidence the drug effect is real. The MOE of ±1.6 mmHg tells clinicians the precision of this estimate. This is the standard reporting format required by journals including JAMA and The Lancet.
Example 3 — Student Test Scores
Problem: A standardized test is given to a random sample of 400 students. The mean score is x̄ = 72.3 points with a known population standard deviation of σ = 15 points. Build a 99% CI and report the margin of error.
Values: x̄ = 72.3, σ = 15, n = 400, z* = 2.576 (99%)
SE: σ/√n = 15/√400 = 15/20 = 0.75 points
MOE: 2.576 × 0.75 = ±1.93 points
99% CI: (72.3 − 1.93, 72.3 + 1.93) = (70.37, 74.23)
✅ Result: 99% CI = (70.4, 74.2) | MOE = ±1.9 points. Note how the 99% CI is wider than a 95% CI would be for the same data (which would give MOE ≈ ±1.47 points). The higher confidence level requires a wider interval to maintain that certainty.
Example 4 — Customer Satisfaction Survey
Problem: A company surveys 250 customers. 73% rate their experience "excellent." Build the 95% CI and margin of error for this proportion.
Values: p̂ = 0.73, n = 250, z* = 1.96
SE: √[0.73 × 0.27 / 250] = √[0.1971/250] = √0.000788 = 0.02808
MOE: 1.96 × 0.02808 = ±5.50 percentage points
95% CI: (73% − 5.5%, 73% + 5.5%) = (67.5%, 78.5%)
✅ Result: 73% satisfaction (95% CI: 67.5% to 78.5%, MOE ±5.5 pp). Compare this to the polling example: the smaller sample (n=250 vs. n=1,067) produces a larger margin of error. This is why market research teams run sample size calculations before fielding a survey.
Example 5 — Product Quality Control
Problem: A manufacturer samples 36 bolts and measures their diameter. x̄ = 10.02 mm, s = 0.12 mm. Build the 90% CI and margin of error for the true mean diameter.
Values: x̄ = 10.02, s = 0.12, n = 36. At df = 35, t* (90%) ≈ 1.690.
SE: 0.12/√36 = 0.12/6 = 0.020 mm
MOE: 1.690 × 0.020 = ±0.034 mm
90% CI: (10.02 − 0.034, 10.02 + 0.034) = (9.986 mm, 10.054 mm)
✅ Result: 90% CI = (9.986, 10.054) mm | MOE = ±0.034 mm. If the specification requires bolts within 10.00 ± 0.10 mm, this CI falls well within tolerance. Engineers use this to decide whether the manufacturing process is in control. Note: using 90% instead of 95% produces a narrower, more precise interval but with greater risk of missing the true mean.
How Sample Size Affects the Margin of Error
The relationship between sample size and margin of error follows a square-root law. Because SE = σ/√n, the margin of error is proportional to 1/√n. Doubling the sample size multiplies the MOE by 1/√2 ≈ 0.707, reducing it by about 29%. To cut the MOE in half, you must quadruple the sample size.
| Sample Size (n) | SE (σ=10) | MOE at 95% | MOE at 99% |
|---|---|---|---|
| 50 | 1.414 | ±2.77 | ±3.64 |
| 100 | 1.000 | ±1.96 | ±2.58 |
| 200 | 0.707 | ±1.39 | ±1.82 |
| 400 | 0.500 | ±0.98 | ±1.29 |
| 1,000 | 0.316 | ±0.62 | ±0.81 |
| 4,000 | 0.158 | ±0.31 | ±0.41 |
Because MOE decreases as 1/√n, each doubling of sample size brings smaller and smaller gains in precision. Going from n=100 to n=400 cuts the MOE in half. Going from n=4,000 to n=16,000 would do the same thing—but costs four times as much to collect. This is why most national polls use roughly n=1,000, which gives a 95% MOE of about ±3%.
You can plan your study's sample size in advance using the sample size calculator. For a desired MOE of E at confidence level z*, you need at minimum n = (z* × σ / E)² observations.
The CLEAR Framework: Building Any Confidence Interval
Constructing and reporting a confidence interval correctly involves five decisions, each one feeding into the next. The CLEAR framework captures this sequence:
CLEAR: 5 Steps from Data to Reported Interval
Choose the confidence level
Select 90%, 95%, or 99% based on your field's standards and the cost of error. Medical and safety research typically requires 99%; social science surveys commonly use 95%.
Locate the sample statistic
Compute your point estimate from the data: the sample mean x̄ for continuous measurements or the sample proportion p̂ for categorical outcomes. This becomes the center of your interval.
Estimate the standard error
Calculate SE = σ/√n (means, known σ), SE = s/√n (means, unknown σ), or SE = √[p̂(1−p̂)/n] (proportions). If σ is unknown and n < 30, you will use a t-distribution rather than z.
Apply the critical value
Multiply SE by the critical value: z* (1.645, 1.960, or 2.576) or t* from the t-distribution table. The result is the margin of error.
Report the CI and margin of error
State: "We are [confidence level]% confident that the true [parameter] lies between [lower bound] and [upper bound], with a margin of error of ±[MOE]." Always include the confidence level—a CI without it is uninterpretable.
Real-World Applications
Election Polling
National polls report a margin of error (usually ±2–4%) to acknowledge sampling uncertainty. A candidate leading by less than the MOE is described as statistically tied, because the CI for each candidate overlaps the other's estimate.
Clinical Trials
Drug trials report confidence intervals for treatment effects. A 95% CI for blood pressure reduction of (2.1, 8.7 mmHg) tells clinicians both statistical significance (CI excludes zero) and clinical significance (lower bound of 2.1 mmHg).
A/B Testing
Web conversion rates are measured with CIs. If Version A gives a conversion rate CI of (4.1%, 5.9%) and Version B gives (5.8%, 7.6%), the overlapping boundaries suggest the difference may not be real. See the A/B test calculator.
Quality Control
Manufacturing lines use CIs around process means to decide whether a batch meets specification limits. If the CI falls entirely within the tolerance band, the batch passes. See the NIST quality control handbook chapter.
Business Analytics
Customer satisfaction surveys, NPS scores, and financial forecasts all use CIs to communicate the range of plausible outcomes rather than a single point estimate that overstates precision.
Public Health Research
Epidemiologists report CIs for disease prevalence, risk ratios, and odds ratios. A relative risk CI of (1.2, 3.8) means an exposure is associated with 1.2–3.8× the baseline risk—which is what guides public health recommendations.
Common Misconceptions
| Misconception | What People Say (Wrong) | What It Actually Means (Correct) |
|---|---|---|
| 95% CI interpretation | "There is a 95% chance the true value is in this interval" | "95% of intervals built this way would contain the true value" |
| MOE covers all errors | "±3% accounts for all poll uncertainty" | "±3% covers random sampling error only—not wording bias, non-response, or coverage errors" |
| CI and MOE are different things | "The confidence interval and margin of error are separate concepts" | "MOE is exactly half the CI width—they contain identical information" |
| Overlapping CIs | "If two CIs overlap, the difference is not significant" | "Overlapping CIs do not guarantee non-significance—significance depends on the CI for the difference itself" |
| Wider CI = worse study | "A wide confidence interval means the study failed" | "Width reflects sample size and variability. A wide CI may still answer a research question; a narrow CI from a biased study is worse" |
| Confidence level = probability | "The 95% is the probability this specific interval is correct" | "The 95% is a property of the procedure, not any specific interval. The true parameter is either in the interval or it isn't—there's no probability left once you compute the bounds" |
When to Report a CI vs a Margin of Error
Decision Guide: CI or Margin of Error?
Entity and Formula Glossary
| Term | Symbol/Formula | Definition |
|---|---|---|
| Confidence Interval | x̄ ± z* × σ/√n | A range that contains the true population parameter with probability equal to the confidence level across many repeated samples |
| Margin of Error | z* × SE | Half the width of the confidence interval; the maximum expected sampling error at the stated confidence level |
| Confidence Level | 1 − α | The long-run proportion of CIs that will contain the true parameter; typically 90%, 95%, or 99% |
| Point Estimate | x̄ or p̂ | A single-number estimate of the population parameter from the sample data; the center of the CI |
| Standard Error | SE = σ/√n | The standard deviation of the sampling distribution of the estimator; measures how much the statistic varies across samples |
| Critical Value | z* or t* | The z- or t-score that defines the boundaries of the middle (1−α)% of the sampling distribution |
| Z-Score | z = (x̄ − μ) / SE | The number of standard errors a sample statistic is from the hypothesized population value |
| Sample Size | n | The number of observations in the sample; larger n → smaller SE → smaller MOE → narrower CI |
| Population Parameter | μ or p | The true but unknown value for the entire population; what the CI estimates |
| Sample Statistic | x̄ or p̂ | The computed value from the sample that estimates the population parameter |
| Sampling Distribution | N(μ, σ²/n) | The distribution of a sample statistic across all possible samples of size n; described by the central limit theorem |
| Central Limit Theorem | x̄ ~ N(μ, σ²/n) | States that the sampling distribution of the mean is approximately normal for large n, regardless of the population distribution |
| Normal Distribution | N(μ, σ²) | The bell-shaped probability distribution that underlies z-based confidence intervals |
| Standard Deviation | σ (population), s (sample) | Measures spread in the raw data; feeds into SE via σ/√n |
| Statistical Inference | — | Using sample data to make conclusions about a population; CIs are a primary tool of statistical inference |
| Random Sampling | — | A selection process where every member of the population has a known probability of being chosen; required for valid CI interpretation |
| Sampling Error | x̄ − μ | The difference between the sample statistic and the true population parameter; random and quantified by the CI |
| p-value | P(data | H₀) | Used in hypothesis testing; a CI that excludes the null value corresponds to a p-value less than α |
| Alpha (α) | 1 − confidence level | The probability of a Type I error; α = 0.05 for a 95% CI |
Related Concepts: Prediction and Tolerance Intervals
Confidence intervals are sometimes confused with prediction intervals and tolerance intervals. They answer different questions:
| Interval Type | Question Answered | Width |
|---|---|---|
| Confidence Interval | "Where does the population mean likely fall?" | Narrow — about the mean |
| Prediction Interval | "Where will the next single observation fall?" | Wider — accounts for individual variability |
| Tolerance Interval | "What range covers at least X% of the population?" | Widest — covers population, not just mean |
| Credible Interval | Bayesian analog: "Where does parameter likely fall given prior + data?" (see credible intervals) | Depends on prior |
For simple linear regression, a similar distinction arises between the CI for the mean response and the prediction interval for a new observation. See simple linear regression for the full treatment of regression intervals.
Calculating CI and MOE in R, Python, and Excel
Python (SciPy)
import scipy.stats as stats
import numpy as np
data = np.array([12.3, 14.1, 13.7, 11.9, 15.2, 13.4])
n = len(data)
xbar = np.mean(data)
se = stats.sem(data)
# 95% CI using t-distribution
ci = stats.t.interval(0.95, df=n-1, loc=xbar, scale=se)
moe = (ci[1] - ci[0]) / 2
print(f"Mean: {xbar:.3f}")
print(f"MOE: ±{moe:.3f}")
print(f"95% CI: ({ci[0]:.3f}, {ci[1]:.3f})")
R
# Proportion CI (exact binomial)
prop.test(x = 540, n = 1000, conf.level = 0.95)
# Or manually:
p_hat <- 0.54
n <- 1000
z_star <- qnorm(0.975) # 1.96
se <- sqrt(p_hat * (1 - p_hat) / n)
moe <- z_star * se
ci_lower <- p_hat - moe
ci_upper <- p_hat + moe
cat("MOE:", round(moe, 4), "\n")
cat("95% CI: (", round(ci_lower, 4), ", ", round(ci_upper, 4), ")\n")
Microsoft Excel
In Excel, use =CONFIDENCE.NORM(alpha, std_dev, n) for large samples (returns the MOE directly) or =CONFIDENCE.T(alpha, std_dev, n) when σ is unknown. The confidence interval is then =AVERAGE(range) ± CONFIDENCE.NORM(0.05, STDEV(range), COUNT(range)).
Frequently Asked Questions
Confidence Interval = Point Estimate ± Margin of Error. The MOE summarizes precision with a single value, whereas the confidence interval shows the complete range of plausible population values.
Further Reading and Resources
- Confidence Intervals — complete topic hub
- Confidence Interval for a Mean — full derivation
- Confidence Interval for a Proportion
- Margin of Error — dedicated guide
- T-Interval vs Z-Interval: When to use each
- Central Limit Theorem — the foundation of CI theory
- Sampling Distributions
- Z-Score — how critical values are derived
- Sample Size Calculator
- Standard Deviation — feeds into the standard error
- Hypothesis Testing — the dual framework
- Normal Distribution — basis for z-based intervals
- T-Distribution Table — for small-sample CIs
- Z-Table — for large-sample CIs
- Confidence Interval Visualizer
The NIST Engineering Statistics Handbook's chapter on confidence limits is the primary technical reference for the formulas on this page. The OpenStax Introductory Statistics textbook covers confidence intervals in Chapter 8 with free access. For polling methodology, Pew Research's survey sampling methodology page documents how margins of error are calculated and reported.