Statistics & Probability · Formula v1.0

Confidence Interval Calculator

Calculate a confidence interval around a sample mean.

A 95% interval means 95% of such intervals would contain the true mean, not a 95% chance this one does. At the worked-example inputs, the lower bound is 94.6. The interval gives a range likely to contain the true population mean. On the example, a mean of 100 with a deviation of 15 and 30 observations gives an interval of about 94.6 to 105.4 at 95% confidence. A wider interval means less precision: it grows with variability and shrinks with sample size, roughly by the square root. It does not mean 95% of the data lies in the range, but that the method captures the true mean 95% of the time. It returns lower bound, upper bound.

FreeNo sign-upInputs stay in-browserCSV exportReviewed August 28, 2026
LAST REVIEWEDAugust 28, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Lower bound94.6
Upper bound105.4
Sensitivity check

What if sample mean changes?

-10% input84.6
0% input94.6
+10% input104.6

Transparent method

The formula

Margin of error = z × (σ ÷ √n); interval = mean ± margin

Worked example

Lower bound94.6
Upper bound105.4

Example inputs

Sample mean100
Standard deviation15
Sample size30
Confidence level95%

How to interpret the result

A 95% confidence interval does not mean there's a 95% chance the true population mean falls inside this particular interval: the true mean either is or isn't in there, with no probability left to assign once the sample is drawn. What 95% actually describes is the method: run the same sampling process many times, and about 95% of the intervals it produces would contain the true mean.

Before you rely on it

What to check

State the interpretation carefully as being about the long-run reliability of the method, not the probability attached to this one specific interval.

The common error

Where people go wrong with confidence interval calculator

Reading a 95% interval as 95% likely to contain the true value. That statement describes a different, more casual idea than what the confidence level is actually a guarantee about.

Sensitivity evidence

How sample mean changes the lower bound

Confidence Interval Calculator: lower bound and upper bound across a range of sample mean, every other input held at the worked-example value.
Sample meanLower boundUpper bound
8074.685.4
9084.695.4
100worked example94.6105.4
110104.6115.4
120114.6125.4

Every input, tested

Which input moves the lower bound most

Confidence Interval Calculator: lower bound with each input moved on its own, every other input held at the worked-example value.
InputTested fromToLower bound at each endSwing
Sample mean9011084.6 to 104.620 (21%)
Confidence level90%99%95.5 to 92.92.5 (2.7%)
Standard deviation141795 to 93.91.1 (1.1%)
Sample size273394.3 to 94.90.54 (0.6%)

Two variables at once

Lower bound by sample mean and standard deviation

Confidence Interval Calculator: lower bound at each combination of sample mean (rows) and standard deviation (columns).
Sample mean \ Standard deviation121518
8075.774.673.6
9085.784.683.6
10095.794.693.6
110105.7104.6103.6
120115.7114.6113.6

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the confidence interval calculator.
InputValue usedWhat it means
Sample mean100
Standard deviation15
Sample size30
Confidence level95%How confident the interval should be.
Lower bound94.6
Upper bound105.4

Inputs, definitions and assumptions

Sample mean

Standard deviation

Sample size

Confidence level

How confident the interval should be.

Where the inputs come from

Enter the sample mean, the standard deviation, the sample size and the z value for your confidence level: 1.645 for 90%, 1.96 for 95% and 2.576 for 99%. The margin of error is z times the standard deviation divided by the square root of the sample size. Use the population standard deviation if known, or a large enough sample to use the sample deviation. Samples should be random and representative.

When the result stops applying

For small samples with an unknown standard deviation, the t distribution is more appropriate than z, and the interval would be wider. The method assumes random sampling and roughly normal means. Bias in the sample is not fixed by a larger sample. Confidence is about the procedure, not the probability that this particular interval is right.

What to compare it with

Plan how many observations you need on the sample size calculator, find the standard deviation on its page, and test claims on the z-score and p-value calculators. The mean and median page gives the sample mean, and the normal probability calculator handles areas under the curve.

People also ask

Frequently asked questions

What does a 95% confidence interval mean?

If you repeated the sampling many times, about 95% of the intervals built this way would contain the true population value.

How can I make an interval narrower?

Increase the sample size, reduce variability in the measurements or accept a lower confidence level, which trades certainty for precision.

When should I use the t distribution?

For small samples when the population standard deviation is unknown, since the t distribution accounts for the extra uncertainty.

Common statistics & probability questions

Sources and evidence