Confidence Interval Calculator

0 to 0

Margin of Error
Critical Value
Standard Error
Degrees of Freedom
StepValue

How the Confidence Interval Is Calculated

A confidence interval estimates a range of plausible values for a population mean, based on a sample. The general formula is sample mean ± (critical value × standard error), where the standard error equals the standard deviation divided by the square root of the sample size (σ / √n). The critical value comes from either the standard normal (Z) distribution, when the population standard deviation is known or the sample is large (n ≥ 30), or Student's t-distribution, which has heavier tails to account for the extra uncertainty of estimating the standard deviation from a small sample. As sample size grows, the t-distribution converges to the Z-distribution.

Z vs. T: Which Should You Use?

Use the Z-distribution when you know the true population standard deviation, or your sample size is large enough (conventionally n ≥ 30) that the sample standard deviation is a reliable stand-in. Use the t-distribution — which depends on degrees of freedom (n − 1) — whenever your sample is small and you're estimating the standard deviation from the data itself; it produces a wider, more conservative interval. This calculator computes t critical values with a numerical approximation of the inverse Student's t CDF, which is accurate to within about 0.001 for standard confidence levels.

Related Tools

If you need to compute the standard deviation from a raw list of numbers first, use the standard deviation calculator. To work out how large a sample you need to hit a target margin of error before you collect data, try the sample size calculator. For broader summary statistics on a data set, see the statistics calculator.

Frequently Asked Questions

Should I use the Z-distribution or the T-distribution?

Use the Z-distribution when the population standard deviation is known, or your sample size is large (conventionally n >= 30), since the sample standard deviation is then a reliable estimate. Use the T-distribution whenever you're estimating the standard deviation from a small sample - it has heavier tails to reflect that extra uncertainty, producing a wider (more honest) interval. This calculator lets you pick either.

What does a 95% confidence interval actually mean?

It means that if you repeated the same sampling process many times and built an interval the same way each time, about 95% of those intervals would contain the true population mean. It does not mean there's a 95% probability the true mean falls in this one specific interval - the true mean is fixed, only the interval varies from sample to sample.