Skip to main content
HSCalculadora

Confidence Interval Calculator

Find the confidence interval for a sample mean.

Results update as you type.

Margin of error (±)
—
Lower bound—
Upper bound—

How it works

A confidence interval expresses the uncertainty around an estimate by giving a range of plausible values rather than a single number. This confidence interval calculator builds the interval for a population mean from a sample: you supply the sample mean, the standard deviation, the sample size, and a confidence level of 90, 95, or 99 percent, and it returns the margin of error together with the lower and upper bounds. The width of the interval reflects two things: how spread out the data are, captured by the standard deviation, and how much data you collected, captured by the sample size. A ninety-five percent confidence interval is the most commonly reported, and it means that if you repeated the sampling process many times, about ninety-five percent of the intervals constructed this way would contain the true mean. Raising the confidence level widens the interval because you demand greater certainty, while gathering a larger sample narrows it because the estimate becomes more precise. Researchers, pollsters, quality engineers, and analysts use confidence intervals to report results honestly, showing not just a best guess but how reliable that guess is given the evidence.

Formula

CI = x̄ ± z · (σ / √n)

A confidence interval for a mean is the sample mean plus and minus a margin of error. The margin is the critical z value for the chosen confidence level, roughly 1.645 for ninety percent, 1.96 for ninety-five, and 2.576 for ninety-nine, multiplied by the standard error, which is the standard deviation divided by the square root of the sample size. Larger samples shrink the standard error and therefore narrow the interval.

Source:Inferential statistics (normal-based interval)

We review all our tools from time to time to ensure accuracy.

Worked example

Sample mean:100Standard deviation:15Sample size (n):25Confidence level:95
Margin = 1.96 × (15 / √25) = 5.88, so the 95% CI is 94.12 to 105.88.

How to use this calculator

  1. 1

    Enter your values

    Enter sample mean, standard deviation, sample size (n) and confidence level.

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Margin of error (±) updates instantly as you type — no button to press.

Frequently asked questions

What does a confidence interval tell you?

A confidence interval gives a range of values that is likely to contain the true population parameter, along with a stated confidence level. A ninety-five percent interval means the method used to build it captures the true value about ninety-five percent of the time across repeated samples. It communicates the precision of an estimate rather than pretending a single sample figure is exact.

Why is 95% the standard confidence level?

Ninety-five percent is a long-standing convention that balances confidence against interval width. It corresponds to a critical value of about 1.96 standard errors on either side of the mean. Choosing ninety-nine percent gives more assurance but a wider, less precise interval, while ninety percent gives a tighter interval with a greater chance of missing the true value. The best choice depends on your tolerance for risk.

How does sample size affect the interval?

A larger sample produces a narrower, more precise confidence interval. Because the margin of error divides the standard deviation by the square root of the sample size, quadrupling the sample roughly halves the margin. This is why studies invest in larger samples: more data reduces the standard error and tightens the range of plausible values around the estimate.

What is the margin of error?

The margin of error is the distance from the sample mean to each end of the confidence interval. It equals the critical z value times the standard error, and the full interval is the mean plus and minus this margin. A margin of error of five means the interval extends five units below and five units above the sample mean.

When should I use z instead of t?

The z-based interval this calculator uses is appropriate when the sample is reasonably large, roughly thirty or more, or when the population standard deviation is known. For small samples with an estimated standard deviation, statisticians use the t-distribution instead, which produces slightly wider intervals to account for the extra uncertainty. For large samples the two approaches give nearly identical results.