Skip to content
Statculator
Confidence Intervals

Mean Confidence Interval Calculator

Free mean confidence interval calculator. Get the 95% (or any level) CI for μ from raw data or x̄, s and n, using t or z, with margin of error and steps.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try
%

Usually 90, 95 or 99.

Data input

The SD of your sample (n − 1 divisor).

Leave unticked unless σ comes from outside this sample, such as a long-run process value. Unticked uses the t distribution.

Results

95% confidence interval for μ
(9.2221, 10.3779)
x̄ ± E = 9.8 ± 0.5779
Margin of error, E
0.5779
t* × SE = 2.0639 × 0.28
Lower bound
9.2221
Upper bound
10.3779
Point estimate, x̄
9.8
Standard error, s / √n
0.28
Critical value, t*
2.0639
Degrees of freedom
24
Sample size, n
25
Sample SD, s
1.4
Interval width
1.1558

Interpretation: We are 95% confident that the population mean μ lies between 9.2221 and 10.3779. The 95% describes the method, not this one interval: if you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain μ.

  • With n = 25 (under about 30) the t interval leans on the population being roughly normal. Check a histogram for strong skew or outliers before relying on it.
normal distribution curve with the shaded probability region, markers at L = 9.222, U = 10.378L = 9.222U = 10.3788.89.09.29.49.69.810.010.210.410.610.8Possible values of the sample mean
Illustrative only: a normal curve centred on x̄ = 9.8 with SD = SE = 0.28, standing in for the sampling distribution of the mean. Shaded: the 95% interval.

The same data at other confidence levels

ConfidenceCritical t*Margin of errorLowerUpperWidth
90%1.71090.4799.32110.2790.9581
95%2.06390.57799.222110.37791.1558
99%2.79690.78319.016910.58311.5663

Higher confidence needs a larger critical value, so the interval gets wider. The data and the standard error stay the same.

Step-by-step solution

  1. 1

    Find the standard error of the mean

    SE = s / √n = 1.4 / √25 = 0.28
  2. 2

    Find the critical value t*

    σ is unknown, so use the t distribution with df = n − 1 = 25 − 1 = 24. Each tail holds (1 − 0.95) / 2 = 0.025.

    t* = t(0.975, 24) = 2.0639
  3. 3

    Calculate the margin of error

    E = t* × SE = 2.0639 × 0.28 = 0.5779
  4. 4

    Build the interval

    x̄ − E = 9.8 − 0.5779 = 9.2221
    x̄ + E = 9.8 + 0.5779 = 10.3779
    95% CI for μ: (9.2221, 10.3779)

What is a Mean Confidence Interval Calculator?

A confidence interval for a mean is a range of plausible values for a population mean μ, built from one sample as x̄ ± critical value × standard error. When σ is unknown (the usual case) the critical value comes from the t distribution with n − 1 degrees of freedom; when σ is known it comes from the standard normal, where the z value for a 95% interval is 1.96. For example, x̄ = 9.8, s = 1.4 and n = 25 give a 95% CI of (9.2221, 10.3779).

What the Mean Confidence Interval Calculator does

This calculator builds a one-sample t interval (or a z interval when σ is known) for a population mean, from either raw data or the summary values x̄, s and n. It reports the lower and upper bounds, the margin of error, the standard error and the critical value, and repeats the interval at 90%, 95% and 99% so you can see how the confidence level changes the width.

The lower and upper limits are also called confidence bounds, so this works as a confidence bound calculator, and with σ unticked it is a t confidence interval calculator. Don’t have the standard deviation? Paste the raw values instead: the calculator works out x̄ and s for you, so you can get the interval without calculating the standard deviation first.

Use it whenever one numeric variable has been measured on a random sample and you want to state how precisely the sample mean pins down the population mean: average battery life, mean blood pressure, typical delivery time. For the difference between two groups use the Mean Difference Confidence Interval Calculator; for before-and-after data on the same subjects use the Paired t-Test Confidence Interval Calculator; for one or two proportions start from the all-in-one Confidence Interval Calculator.

How to use the Mean Confidence Interval Calculator

  1. Set the Confidence level (95% unless your course or field says otherwise).
  2. Choose Summary statistics and enter x̄, n and s, or choose Raw data and paste the observations.
  3. Tick The population standard deviation σ is known only if σ comes from an outside source, then enter σ. Otherwise leave it unticked so the t distribution is used.
  4. Read the interval and margin of error, then check the table to compare 90%, 95% and 99% intervals and the step-by-step solution for the working.

How to calculate a confidence interval for a mean by hand

A 95% confidence interval for a mean takes five steps. The worked example further down applies them to real numbers.

  1. Find the sample mean x̄ and the sample standard deviation s (with the n − 1 divisor). Skip this if you already have them.
  2. Find the standard error: SE = s / √n, or σ / √n when σ is known.
  3. Find the critical value: t* with n − 1 degrees of freedom when σ is estimated by s, or z* when σ is known. For 95% confidence, z* = 1.96.
  4. Multiply the critical value by the standard error to get the margin of error, E.
  5. Subtract and add E to x̄. The results are the lower and upper confidence limits.

Mean Confidence Interval formula

Both intervals have the form estimate ± critical value × standard error. They differ only in where the critical value comes from.

t interval (σ unknown)
x̄ ± t*₍α/2, n−1₎ · s / √n
z interval (σ known)
x̄ ± z*₍α/2₎ · σ / √n
Margin of error
E = critical value × SE
Formula symbols
SymbolMeaning
x̄sample mean (the point estimate)
s, σsample standard deviation, known population standard deviation
nsample size; df = n − 1 for the t interval
t*, z*critical value leaving α/2 in each tail, where α = 1 − confidence level

Look up t* in the t-table or with the T Critical Value Calculator. For 95% confidence z* = 1.96, for 90% z* = 1.645 and for 99% z* = 2.576.

The t interval goes back to Student (W. S. Gosset, 1908, Biometrika), who derived the t distribution for small samples where σ has to be estimated by s.

Worked example

Worked example: phone battery life

Problem. A reviewer tests 25 phones of one model and records a mean battery life of 9.8 hours with a standard deviation of 1.4 hours. Find a 95% confidence interval for the mean battery life of all phones of this model.

  1. 01σ is unknown, so use t with df = 25 − 1 = 24.
  2. 02Standard error: SE = 1.4 / √25 = 1.4 / 5 = 0.28 hours.
  3. 03Critical value: t*(0.975, 24) = 2.0639.
  4. 04Margin of error: E = 2.0639 × 0.28 = 0.5779 hours.
  5. 05Interval: 9.8 ± 0.5779 = (9.2221, 10.3779).

Answer. We are 95% confident that the true mean battery life is between about 9.22 and 10.38 hours. With the same data the 90% interval is (9.3210, 10.2790) and the 99% interval is (9.0169, 10.5831): higher confidence, wider range.

Critical values: the z value for a 95% confidence interval

A 95% interval leaves 5% outside, split as 0.025 in each tail. The z value with a cumulative area of 0.975 below it is 1.96, which is why a known-σ 95% interval is x̄ ± 1.96 σ / √n. With σ estimated by s the calculator uses t* instead, which is larger for small samples. The table shows both, with t* for samples of 10 and 25. For another level or df, use the Z Critical Value Calculator or the T Critical Value Calculator.

Confidence levelArea in each tailz*t* (n = 10, df = 9)t* (n = 25, df = 24)
80%0.101.28161.38301.3178
90%0.051.64491.83311.7109
95%0.0251.96002.26222.0639
98%0.012.32632.82142.4922
99%0.0052.57583.24982.7969
99.9%0.00053.29054.78093.7454

t or z: how much the critical value changes

The t distribution has heavier tails than the normal to account for the extra uncertainty of estimating σ with s. The penalty is large for small samples and fades as n grows, which is why the t and z intervals almost agree for big samples.

Sample size ndft* at 95%z* at 95%t interval is wider by
542.77641.9641.7%
1092.26221.9615.4%
20192.09301.966.8%
30292.04521.964.4%
100991.98421.961.2%

Common use cases

  • Reporting the average of a survey rating or test score together with its precision.
  • Estimating a mean lifetime, fill weight or cycle time in quality control.
  • Summarizing a clinical or lab measurement as mean with 95% CI in a paper. In APA style the battery example is written M = 9.80, 95% CI [9.22, 10.38].
  • Checking whether a target value (such as a label claim) is plausible: if it falls outside the interval, a two-sided one-sample t-test at the matching α would reject it.

Assumptions and limitations

  • Random sample: the interval only accounts for random sampling error. Bias from a convenience sample or non-response is not covered.
  • Independence: observations should not influence each other. Repeated measurements on the same subject violate this.
  • Normality: for small samples the population should be roughly normal. For n of about 30 or more, the central limit theorem makes the t interval reliable unless the data are very skewed or have extreme outliers.
  • The interval is about the mean, not individual values. Most individual observations will fall outside a narrow CI for the mean; use a prediction interval or the empirical rule for individual values.
  • To plan the sample size needed for a target margin of error, use the Margin of Error Calculator.

Frequently asked questions

What is the 95% confidence interval for the mean?

It is the range x̄ ± t* × s / √n, where t* is the 95% critical value with n − 1 degrees of freedom (or z* = 1.96 when σ is known). For a sample with x̄ = 9.8, s = 1.4 and n = 25, t* = 2.0639, so the 95% confidence interval for the mean is 9.8 ± 0.5779, or (9.2221, 10.3779).

How do you calculate a 95% confidence interval for a mean?

Divide the standard deviation by √n to get the standard error, multiply it by the 95% critical value (t* with n − 1 df, or 1.96 if σ is known) to get the margin of error, then subtract it from and add it to the sample mean. The calculator above does each step and shows the working.

What are the 68%, 95% and 99.7% confidence intervals for the sample mean?

These come from the empirical rule: x̄ ± 1 SE, x̄ ± 2 SE and x̄ ± 3 SE cover about 68.27%, 95.45% and 99.73% of a normal sampling distribution. They are rounded z intervals. The exact 95% interval uses 1.96 SE, and when σ is estimated from a small sample you should use t* rather than 1, 2 or 3.

Can I calculate a confidence interval without the standard deviation?

You need some measure of spread, but you do not have to calculate it yourself. Choose Raw data and paste the values: the calculator computes x̄ and the sample standard deviation s, then builds the t interval. With only a mean and n and no data, a confidence interval cannot be calculated.

Does a 95% confidence interval mean there is a 95% chance μ is inside it?

Not in the usual (frequentist) sense. μ is a fixed number, so a computed interval either contains it or not. The 95% is the long-run success rate of the procedure: about 95% of intervals built this way from repeated samples would contain μ.

Should I use a t interval or a z interval for a mean?

Use the t interval whenever σ is estimated from the sample, which is nearly always. Use the z interval only when the population standard deviation is known from outside the data, for example a long-established process SD. For large samples the two give nearly the same answer.

How can I make a confidence interval narrower?

Increase the sample size or lower the confidence level. The width shrinks in proportion to 1/√n, so quadrupling n roughly halves the margin of error. Reducing measurement noise, which lowers s, also helps.

What degrees of freedom does a one-sample t interval use?

It uses df = n − 1, one less than the sample size, because one degree of freedom is spent estimating the mean when computing s. With n = 25 the critical value comes from t with 24 df.

How does a confidence interval relate to a hypothesis test?

A two-sided test of H₀: μ = μ₀ at significance level α rejects H₀ exactly when μ₀ lies outside the (1 − α) confidence interval for the t procedure. So a 95% interval that excludes μ₀ matches p < 0.05 in a two-tailed one-sample t-test.

Why does Excel’s CONFIDENCE.NORM give a different margin of error?

CONFIDENCE.NORM uses the z critical value, while CONFIDENCE.T uses t with n − 1 df. If you entered s rather than a known σ, CONFIDENCE.T matches the t interval this calculator gives by default; CONFIDENCE.NORM matches it only when you tick σ known.

Cite this page

Statculator. (2026, November 14). Mean Confidence Interval Calculator. Retrieved November 14, 2026, from https://statculator.com/confidence-intervals/mean-confidence-interval-calculator/