Statistics 2026-07-08 12 min read Calculator Trust Team

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples

Learn what confidence intervals mean, how margin of error is calculated, why sample size matters, and how to interpret uncertainty without overstating results.

Calculator Trust editorial cover for a confidence interval guide with analytics chart photo, sample size labels, and margin of error notes
Cover design by Calculator Trust

Statistics becomes more useful when it admits uncertainty. A single number can look precise even when it comes from a small sample, noisy measurement, or changing population. A confidence interval adds context by showing a range of plausible values. It helps readers understand not only what the sample found, but also how much sampling uncertainty may be attached to that finding.

This guide explains confidence intervals, margin of error, standard error, sample size, and common interpretation mistakes. It pairs well with the standard deviation calculator because spread is one of the inputs that affects uncertainty.

What a Confidence Interval Represents

A confidence interval is a range built around a sample estimate. If a survey estimates that 52% of voters support an option with a margin of error of 3 percentage points, the interval is roughly 49% to 55%. The center is the sample estimate. The width reflects uncertainty.

Confidence intervals are used for means, proportions, rates, differences, regression coefficients, and many other statistics. The exact formula changes by situation, but the logic is similar: estimate plus or minus a margin of error.

The Basic Formula

A common confidence interval structure is:

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples formula snapshot illustration

Formula Snapshot

The core equation and the variables that control the answer.

Estimate +/- Critical Value x Standard Error

The estimate is the sample result. The critical value comes from the chosen confidence level and distribution. The standard error measures how much the estimate would vary from sample to sample.

For a Mean

For a mean, standard error is often estimated as standard deviation divided by the square root of sample size:

SE = s / sqrt(n)

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples input checklist illustration

Input Checklist

The values to collect before trusting the calculation.

If the sample standard deviation is 12 and the sample size is 100, standard error is 12 / sqrt(100) = 1.2.

Worked Example: Average Study Time

Suppose a sample of 100 students reports an average study time of 14.6 hours per week. The sample standard deviation is 6 hours. Standard error is 6 / sqrt(100) = 0.6 hours.

For a rough 95% interval with a critical value near 1.96, margin of error is 1.96 x 0.6 = 1.176 hours. The confidence interval is 14.6 +/- 1.176, or about 13.4 to 15.8 hours.

The interval does not say every student studies between 13.4 and 15.8 hours. It estimates the plausible range for the population average.

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples worked example flow illustration

Worked Example Flow

A step-by-step flow for checking the math against real numbers.

Margin of Error

Margin of error is the distance from the estimate to one side of the confidence interval. If a poll shows 52% +/- 3%, the margin of error is 3 percentage points. The full interval is 49% to 55%, which has a total width of 6 percentage points.

What Makes Margin of Error Larger?

  • Smaller sample size
  • Greater variability in the data
  • Higher confidence level
  • Complex sampling design
  • Measurement error or nonresponse issues

Many simple calculators only account for random sampling variation. Real studies can have other error sources that are not captured by the formula.

Confidence Level: 90%, 95%, and 99%

A higher confidence level creates a wider interval because it asks for a method that captures the true value more often across repeated samples. A 99% interval is wider than a 95% interval using the same data. A 90% interval is narrower but has less coverage.

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples real-world scenario illustration

Real-World Scenario

How the calculation changes when real-life assumptions are included.

There is no universally best confidence level. Many fields use 95% as a convention, but the right choice depends on the decision, cost of being wrong, and reporting standard.

Sample Size and the Square-Root Rule

Increasing sample size reduces standard error, but not linearly. Because standard error includes the square root of n, doubling sample size does not cut uncertainty in half. To roughly cut standard error in half, you need about four times the sample size.

Why This Matters

A survey with 400 people has much less uncertainty than a survey with 100 people. But a survey with 1,600 people is not four times as precise as one with 400. It is about twice as precise, assuming similar sampling quality. This helps explain why very large sample sizes can become expensive for smaller improvements.

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples comparison map illustration

Comparison Map

A visual way to compare options, ranges, or outcomes.

Planning Sample Size Before Collecting Data

Confidence intervals are not only for reporting after the fact. They also help plan how much data to collect. Start with the decision you need to make. How small a difference would matter? How much uncertainty is acceptable? What confidence level is required by the audience or field? Those answers help determine the target margin of error.

For surveys, many planners start with the conservative assumption that the proportion is near 50% because that produces the largest standard error for a given sample size. For means, planners need an estimate of standard deviation from prior data, a pilot study, or a reasonable domain estimate. Poor planning here can lead to intervals that are too wide to answer the original question.

Precision vs Practical Cost

More data is not automatically better if the extra precision does not change the decision. A margin of error of 2 percentage points may be worth the cost for a national poll. It may be unnecessary for an internal directional survey. The best sample size is tied to the decision, not to a desire for the biggest possible number.

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples mistake checklist illustration

Mistake Checklist

Common errors that can make a correct formula produce a misleading result.

Confidence Intervals for Proportions

For proportions, such as survey percentages, uncertainty depends on both sample size and the proportion itself. Results near 50% have more variability than results near 5% or 95%. A common standard error formula for a proportion is:

SE = sqrt(p(1-p) / n)

If p = 0.52 and n = 1,000, standard error is sqrt(0.52 x 0.48 / 1000), or about 0.0158. A rough 95% margin of error is 1.96 x 0.0158 = 0.031, or 3.1 percentage points.

Common Interpretation Mistakes

  1. Thinking the interval contains individual values. A confidence interval for a mean estimates the mean, not every observation.
  2. Ignoring sampling method. A large biased sample can still produce a misleading interval.
  3. Comparing overlapping intervals too casually. Overlap does not always mean there is no meaningful difference.
  4. Calling the result exact. The interval is an uncertainty estimate, not a guarantee.
  5. Forgetting practical significance. A tiny difference can be statistically precise but not useful.
Confidence Intervals Explained: Margin of Error, Sample Size, and Examples quality check illustration

Quality Check

Simple checks for spotting a result that looks too high, low, or incomplete.

Confidence Interval vs Prediction Interval

A confidence interval estimates an average, proportion, or parameter. A prediction interval estimates where a future individual observation may fall. Prediction intervals are usually wider because individual outcomes vary more than averages.

For example, a confidence interval might estimate the average delivery time for a service. A prediction interval would estimate the likely range for one future delivery. Those are different questions.

How to Report a Confidence Interval Clearly

Good reporting includes the estimate, interval, confidence level, sample size, data source, and a plain-language interpretation. For example:

Confidence Intervals Explained: Margin of Error, Sample Size, and Examples quick reference illustration

Quick Reference

A compact checklist for using the guide and calculator together.

In a sample of 1,000 respondents, 52% supported the option. The approximate 95% confidence interval is 49% to 55%.

If the data came from a nonrandom sample, say so. If the interval excludes important error sources, say so. Transparent limitations make the result more trustworthy.

Use Intervals to Think, Not to Decorate

A confidence interval should change how you interpret the estimate. A narrow interval may support a more precise decision. A wide interval may suggest more data is needed. If two options are close and intervals are wide, the honest answer may be that the data is not strong enough to choose confidently.

Statistics is not only about calculating a number. It is about matching the number to the decision. Confidence intervals help keep that connection honest.

Frequently Asked Questions

What is a confidence interval in simple terms?
A confidence interval is a range of plausible values for a population measure, based on a sample. It combines the sample estimate with uncertainty from sampling variation.
Does a 95% confidence interval mean there is a 95% chance the true value is inside this exact interval?
That wording is a common shortcut but not technically precise in frequentist statistics. A 95% method means that if the same sampling method were repeated many times, about 95% of the resulting intervals would contain the true value.
How is margin of error calculated?
Margin of error is commonly calculated as critical value x standard error. For a mean, standard error is often standard deviation divided by the square root of sample size. For a proportion, it depends on p(1-p) and sample size.
Why does larger sample size reduce margin of error?
Larger samples reduce standard error because random sampling variation tends to average out. The improvement follows a square-root pattern, so quadrupling sample size roughly cuts standard error in half.
Can a confidence interval prove cause and effect?
No. A confidence interval describes uncertainty around an estimate. Cause and effect depends on study design, measurement quality, confounding, and other evidence.

Try These Calculators

More Articles