Skip to main content

Confidence Interval Calculator

Find a confidence interval for a population mean using the Z or t distribution, with the margin of error and standard error shown.

Confidence Interval Calculator

Estimate a confidence interval for a population mean.

About Confidence Intervals

How This Calculator Works

The interval is built from your sample mean plus or minus a margin of error: x̄ ± (critical value × SE), where the standard error is SE = s / √n. Use the Z tab when the population standard deviation is known, and the t tab for small samples where only the sample standard deviation is available.

Interpreting the Result

  • Confidence level: A 95% interval means that 95% of such intervals would contain the true mean over repeated sampling.
  • Wider intervals: Higher confidence levels and smaller samples produce wider intervals.
  • Z vs t: The t-distribution has fatter tails for small samples, giving a slightly wider, more conservative interval.

How a Confidence Interval Calculator Works

A confidence interval gives a range of plausible values for a population mean based on a sample. This calculator builds that interval from your sample mean, standard deviation, and sample size, then applies the critical value for your chosen confidence level to find the margin of error.

Use the Z tab when the population standard deviation is known (or your sample is large), and the t tab for smaller samples where you only have the sample standard deviation. The t-distribution accounts for the extra uncertainty in small samples by using a slightly larger critical value.

The Formula

  • Standard Error (SE) = s / √n
  • Margin of Error (E) = critical value × SE
  • Confidence Interval = x̄ − E to x̄ + E

Z Distribution vs t Distribution

Choosing between Z and t depends on what you know about the population and how large your sample is.

  • Use Z when the population standard deviation (σ) is known — common in textbook problems and quality control.
  • Use t when you only have the sample standard deviation, especially for samples smaller than about 30.
  • As the sample size grows, the t-distribution converges to the Z-distribution, so the two give nearly identical results for large n.
  • A higher confidence level (such as 99%) uses a larger critical value, producing a wider interval.

Frequently Asked Questions

What does a 95% confidence interval actually mean?

It means that if you repeated the sampling process many times and built an interval each time, about 95% of those intervals would contain the true population mean. It does not mean there is a 95% chance the true mean lies in this particular interval.

When should I use the t-distribution instead of Z?

Use the t-distribution when the population standard deviation is unknown and you are relying on the sample standard deviation, which is the usual situation in real-world data. The t-distribution is especially important for small samples; for very large samples it is essentially the same as Z.

Why does a higher confidence level give a wider interval?

To be more confident that the interval captures the true mean, you must widen the range. A 99% interval uses a larger critical value than a 95% interval, so it covers more ground and is therefore wider.

Related Calculators

Combinations & Permutations

Quadratic Equation Solver

Linear Regression Calculator