CalcDuck

Confidence Interval Calculator

Confidence Interval Calculator

Uses the z (normal) critical value, not the t-distribution.
Lower bound
94.12
Upper bound
105.88
Margin of error
5.88
z-critical value used
1.96

A confidence interval is a range likely to contain the true population mean, built from a sample mean plus or minus a margin of error. With a sample mean of 100, a standard deviation of 15, and a sample size of 25, the 95% confidence interval is 100 ± 5.88, or 94.12 to 105.88, using the z-critical value 1.96.

Tip: “Copy with settings” shares a link that opens this calculator with your numbers already filled in.

How this calculator works

This calculator builds a confidence interval for a population mean from a sample mean, a sample standard deviation, and a sample size. It reports the margin of error and the lower and upper bounds of the interval at your chosen confidence level.

A confidence interval does not mean 'there is a 95% chance the true mean is in this range' for one specific interval. It means that if you repeated the same sampling process many times and built an interval each time, about 95% of those intervals would contain the true population mean.

The formula

Margin of error: E = z × (s ÷ √n)Confidence interval: mean ± E

This calculator always uses the z (normal-distribution) critical value, not the t-distribution. Using z is the standard textbook shortcut for large samples or when the population standard deviation is treated as known. For small samples (roughly n < 30), the t-distribution is technically more correct because its heavier tails widen the interval to account for the extra uncertainty in estimating the standard deviation from a small sample — but the z-values here (1.6449 at 90%, 1.9600 at 95%, 2.5758 at 99%) are the values used by this calculator at every sample size.

Worked example: mean 100, sd 15, n 25, 95% confidence

  1. Standard error = s ÷ √n = 15 ÷ √25 = 15 ÷ 5 = 3.
  2. Margin of error = z × standard error = 1.96 × 3 = 5.88.
  3. Lower bound = 100 − 5.88 = 94.12. Upper bound = 100 + 5.88 = 105.88.
  4. The 95% confidence interval is [94.12, 105.88].

Frequently asked questions

Why does this calculator use z instead of t?

The z (normal) critical value is the standard simplification used in most introductory treatments and is accurate whenever the sample size is reasonably large (a common rule of thumb is n ≥ 30) or the population standard deviation is known. For small samples, the t-distribution is more correct because it has heavier tails that widen the interval to reflect the added uncertainty of estimating the standard deviation from limited data.

What does a 95% confidence level actually mean?

It describes the long-run reliability of the method, not the probability that this particular interval contains the true mean. If you drew many samples and built a 95% confidence interval from each, about 95% of those intervals would contain the true population mean.

Why does a higher confidence level give a wider interval?

To be more confident that the interval captures the true mean, the interval has to cover a wider range. Moving from 90% to 99% confidence increases the z-critical value from 1.6449 to 2.5758, which widens the margin of error by roughly 57% for the same data.

How does sample size affect the interval?

The margin of error shrinks with the square root of the sample size, not the sample size itself. Quadrupling n only cuts the margin of error in half, because standard error = s ÷ √n.

Does this calculator expect the sample or population standard deviation as input?

Enter the sample standard deviation (the version dividing by n − 1) unless your data genuinely is the entire population rather than a sample drawn from it. A confidence interval exists specifically to estimate an unknown population mean from a sample, so the standard deviation you enter should match that same sample-based assumption.

Sources

Related calculators