Confidence Intervals Explained Simply, With a Worked Example
October 21, 2026
When you measure a sample, you get an estimate of the true value for the whole population, but you know it is not exact. A confidence interval puts a range around your estimate to show the uncertainty. A statement like 'the average is 50, with a 95% confidence interval of 48.04 to 51.96' tells readers where the true average plausibly lies, given the data collected.
Confidence intervals are among the most useful and misunderstood ideas in statistics. This guide explains what they mean, how to calculate one, and how to avoid the usual interpretation errors.
Skip the math and get your answer instantly:
Open the Standard Deviation Calculator →The Formula for a Mean
For a sample mean with a reasonably large sample, the interval is: mean ± z × (standard deviation ÷ √n). The quantity s ÷ √n is called the standard error: it measures how much sample means vary from sample to sample. The multiplier z depends on the confidence level: 1.645 for 90%, 1.96 for 95%, and 2.576 for 99%.
For small samples (under about 30) with an unknown population standard deviation, replace z with a value from the t-distribution, which is slightly larger and widens the interval to reflect extra uncertainty.
A Worked Example
A survey of 100 customers finds an average spend of $50 with a sample standard deviation of $10. The standard error is 10 ÷ √100 = 1. The 95% interval is 50 ± 1.96 × 1 = 48.04 to 51.96. So the data are consistent with a true average somewhere between about $48 and $52.
At 99% confidence, the multiplier is 2.576 and the interval widens to 47.42 to 52.58. At 90% it narrows to 48.36 to 51.65. A higher confidence level always means a wider interval.
| Confidence level | Multiplier | Interval for mean 50, SD 10, n = 100 |
|---|---|---|
| 90% | 1.645 | 48.36 to 51.65 |
| 95% | 1.96 | 48.04 to 51.96 |
| 99% | 2.576 | 47.42 to 52.58 |
What Sample Size Does
The standard error shrinks with the square root of n. With n = 25, the standard error is 10 ÷ 5 = 2, and the 95% interval is 46.08 to 53.92, twice as wide as with n = 100. To halve the width of an interval, you need four times as many observations. With n = 400 the 95% interval is 49.02 to 50.98.
That is why precision gets expensive. The first few dozen observations make a big difference, and later ones help less and less.
What a 95% Interval Actually Means
The correct reading is about the procedure: if you repeated the study many times and built an interval each time with this method, about 95% of those intervals would contain the true value. For any single interval, the true value is either in it or not. Saying there is a 95% probability that the true mean lies in this specific interval is technically inaccurate, though it is a common shorthand.
It also does not mean that 95% of individual values fall in the interval. The range of individual customers' spending is much wider, roughly mean ± 2 standard deviations, or $30 to $70.
Common Pitfalls
Assuming a biased sample gives a trustworthy interval, since the formula only captures random sampling error, not bias from who responded; comparing two intervals by eye, since overlapping intervals can still reflect a real difference; and ignoring practical significance. A narrow interval around a trivial effect may be statistically clear and still unimportant.
Intervals for Proportions
For a proportion, the standard error is √(p(1 − p) ÷ n). If 60 of 100 respondents say yes, p = 0.6 and the standard error is √(0.24 ÷ 100) = 0.049. The 95% interval is 0.6 ± 1.96 × 0.049, or 50.4% to 69.6%. This is the same logic as polling margins of error.
Frequently Asked Questions
What does a 95% confidence interval mean?
A method that captures the true value in about 95% of repeated samples. It reflects uncertainty from sampling.
Why is a 99% interval wider than a 95% interval?
To be more confident of capturing the true value, you must allow a wider range.
How can I make my interval narrower?
Increase your sample size or reduce variability in the data.
Is a confidence interval the same as a margin of error?
The margin of error is the half-width of the interval, such as ±1.96 in the example.
What is the standard error?
The standard deviation of the sample mean, calculated as the sample standard deviation divided by the square root of n.