How the confidence interval is calculated
A confidence interval estimates a range likely to contain the true population mean, built from the sample mean plus and minus a margin that depends on how much the sample varies and how large it is.
- x̄ — sample mean
- s — sample standard deviation
- n — sample size
- z — critical value for the confidence level (90% → 1.645, 95% → 1.96, 99% → 2.576)
More detail
Why a higher confidence level widens the interval
A 99% confidence interval has to be wider than a 95% one to capture the true mean more often across repeated samples — there's a direct trade-off between how confident you are and how precise (narrow) the range can be. Confidence level is about the method's long-run reliability, not the probability that this one interval contains the true mean.
Sample size matters. The margin of error shrinks with √n, not n — quadrupling your sample size only halves the margin of error. If you need a much tighter interval, check whether a larger sample is actually feasible before assuming it will help as much as expected.
Frequently asked questions
What's the 95% confidence interval for a sample mean of 100, standard deviation 15, and n = 36?
Standard error = 15/√36 = 2.5, margin of error = 1.96 × 2.5 = 4.9, giving a 95% CI of [95.1, 104.9]. Enter these exact numbers above to confirm.
How does the 90% interval compare to the 95% interval for the same data?
For mean 100, s = 15, n = 9, the 90% interval uses z = 1.645: SE = 15/√9 = 5, margin = 1.645 × 5 = 8.225, giving [91.775, 108.225] — narrower than the 95% interval would be for the same data, since a lower confidence level allows a tighter range.
Why does the calculator warn me when n is small?
The z-based formula assumes the sample standard deviation closely approximates the true population standard deviation, which only holds well for larger samples. Below roughly n = 30, the t-distribution (which has heavier tails) gives a wider, more honest interval — this calculator flags that but still shows the z-based estimate.
Does a wider confidence interval mean the estimate is worse?
Not necessarily — it usually means either the sample is small, the data is more variable, or you chose a higher confidence level (e.g. 99% instead of 90%). A wider interval trades precision for a stronger guarantee that the method captures the true mean.