Confidence Interval Calculator

Find the confidence interval around a sample mean at 90%, 95%, or 99%.

How it is calculated

The interval is built around the sample mean:

SE = s / √n, margin = c × SE, interval = x̄ ± margin

x̄ is the sample mean, s the standard deviation and n the number of observations. The critical value c depends on the choice under “Standard deviation is”. With the default, a sample SD, the Student t value for n − 1 degrees of freedom is used (solved exactly, so n of at least 2 is needed); with a known population σ the normal z value is used: 1.282 for 80%, 1.440 for 85%, 1.645 for 90%, 1.960 for 95% and 2.576 for 99%. Only those five levels can be chosen; 97%, for example, gives no result. The tool shows the margin, the lower and upper bounds, the range and the critical value, with two decimals (three for the critical value). The standard deviation cannot be negative.

Worked example

Mean 72, sample standard deviation 12, sample of 36, 95% confidence.

  1. Standard error = 12 / √36 = 12 / 6 = 2
  2. Degrees of freedom = 36 − 1 = 35, and the Student t value for 95% is 2.030
  3. Margin = 2.030 × 2 = 4.06
  4. Interval = 72 ± 4.06 = 67.94 – 76.06

At 99% confidence (t = 2.724) the interval widens to 66.55 – 77.45. If 12 were a known population σ, z = 1.960 would give the narrower 68.08 – 75.92.

Try this example →

Common mistakes

  • Entering the standard error where the standard deviation belongs: the tool already divides by √n, so this shrinks the interval twice.
  • Reading the 95% interval as a 95% chance that each individual value lies inside it: it is about the mean, not about single observations.
  • Choosing “known population σ” when the number came from the sample itself: with an estimated SD the t interval is the right one, and it is wider for small samples.
  • Looking for a confidence level the form does not offer, such as 97%: only 80%, 85%, 90%, 95% and 99% can be selected, so pick the nearest one and say which you used.

Sources

About this calculator

This calculator finds the confidence interval for a sample mean using CI = x̄ ± t·(s/√n), where x̄ is the sample mean, s is the sample standard deviation, n is the sample size, and t is the Student t critical value for n − 1 degrees of freedom at the chosen confidence level (for n = 36: 2.030 for 95%). If you know the population standard deviation σ, choose that option and the z value is used instead (1.645 for 90%, 1.96 for 95%, 2.576 for 99%). The margin of error shrinks as the sample grows larger or the confidence level drops.

Researchers, market analysts, and statistics students use it to report how much uncertainty surrounds a sample estimate — for example, an average customer satisfaction score or a mean test result.

Was this helpful?

You can pick up to 3 reactions.

Note from the editors

Because the margin shrinks with the square root of n, quadrupling the sample roughly halves it: with a standard deviation of 10, a mean of 50 and 95 percent confidence, n = 25 gives plus or minus 4.13 and n = 100 gives 1.98. With a sample standard deviation the tool uses Student's t, so very small samples get a wider interval; the fixed z values are used only for a known population σ, and give 3.92 and 1.96. What sample sizes do you usually work with?

Comments

  • Be the first to comment.

Popular calculators

All Calculators