Developed by StatCalc.net Team Statistically reviewed by — Senior Statistician & Editor Last updated
Confidence Intervals

Mean Confidence Interval Calculator

Use this calculator to construct a confidence interval for a single population mean when the population standard deviation is known or unknown. Enter summary statistics or raw sample data to get the confidence interval, standard error, critical value, margin of error, and a complete step-by-step solution.

1. Choose data entry format

2. Is the population standard deviation known?

3. Enter the summary statistics

Enter the sample standard deviation.
Enter a whole number of 2 or greater.

3. Enter the data

If population variance σ² is given, use σ = √σ².
Enter values separated by commas, spaces, tabs, semicolons, or line breaks.
The calculator will find the sample mean, sample standard deviation, and sample size from the raw data.

4. Set the confidence level

Common confidence levels are 90%, 95%, and 99%.

How to Use the Mean Confidence Interval Calculator

This calculator constructs a confidence interval for a single population mean, μ, when the population standard deviation is known or unknown.

To use the calculator:

  1. Choose Summary Statistics if you already know the sample mean, standard deviation, and sample size, or choose Raw Data if you have the individual sample values.
  2. Select Unknown — use t interval if the population standard deviation, σ, is unknown, or Known — use z interval if σ is known.
  3. Enter the required summary statistics or raw sample data.
  4. Enter the confidence level, such as 90%, 95%, or 99%.
  5. Select the number of decimal places.
  6. Click Calculate.

The calculator returns the confidence interval, point estimate, standard error, critical value, margin of error, method used, and a complete step-by-step solution.

Want a single tool where you can find the confidence interval for a proportion, difference between two means, paired mean difference, or difference between two proportions? Use the Confidence Interval Calculator.

Confidence Interval Formula for a Single Population Mean

The formula used to construct a confidence interval for a single population mean depends on whether the population standard deviation, σ, is known or unknown.

When the population standard deviation (σ) is known, we use the z distribution. The confidence interval formula is:

CI=x‾±z1−α/2×(σn)\text{CI} = \bar{x} \pm z_{1-\alpha/2}\times \left(\frac{\sigma}{\sqrt{n}}\right)

where:

  • x̄ is the sample mean
  • σ is the population standard deviation
  • n is the sample size
  • z₁−α/2 is the z critical value
  • α = 1 − confidence level

In this case, the standard error is: SE=σnSE=\frac{\sigma}{\sqrt{n}}

However, when the population standard deviation, σ, is unknown, we estimate it using the sample standard deviation, s, and use Student’s t distribution. The confidence interval formula becomes:

CI=x‾±t1−α/2,n−1×(sn)\text{CI} = \bar{x} \pm t_{1-\alpha/2,\;n-1}\times \left(\frac{s}{\sqrt{n}}\right)

where:

  • x̄ is the sample mean
  • s is the sample standard deviation
  • n is the sample size
  • t₁−α/2, n−1 is the t critical value
  • n − 1 is the degrees of freedom
  • α = 1 − confidence level

In this case, the standard error is: SE=snSE=\frac{s}{\sqrt{n}}

Therefore, when the population standard deviation, σ, is known, we use the z confidence interval for the population mean. However, when σ is unknown, we use the sample standard deviation, s, and construct a t confidence interval for the population mean.

How to Find a Confidence Interval for the Mean by Hand

To calculate a confidence interval for a single population mean by hand, follow these steps:

  1. Determine whether the population standard deviation is known. If σ is known, use a z confidence interval. If σ is unknown, use the sample standard deviation, s, and a t confidence interval.
  2. Identify the required values. These are the sample mean, standard deviation, sample size, and confidence level.
  3. Find the appropriate critical value. Use the z critical value when σ is known or the t critical value with df = n − 1 when σ is unknown.
  4. Calculate the standard error. Use SE = σ / √n for a z confidence interval or SE = s / √n for a t confidence interval.
  5. Calculate the margin of error. Multiply the critical value by the standard error.
  6. Construct the confidence interval. Subtract and add the margin of error to the sample mean to obtain the lower and upper confidence limits.

Example 1: Z Confidence Interval (σ Known)

A statistics instructor at a U.S. community college wants to estimate the mean time students spend completing an online exam. A random sample of 64 students has a mean completion time of 84.6 minutes. From previous semesters, the population standard deviation is known to be 12 minutes. Find the 90% confidence interval for the population mean.

Solution

Since the population standard deviation is known, we use a z confidence interval and follow these steps:

Step 1: Identify the parameters

From the question, we know that:

  • Sample mean, x̄ = 84.6
  • Population standard deviation, σ = 12
  • Sample size, n = 64
  • Confidence level = 90%

Step 2: Find the critical value.

For a 90% confidence interval, α = 1 − 0.90

= 0.10

Since the confidence interval has two tails, α / 2 = 0.10 / 2

= 0.05

Therefore, the cumulative probability to the left of the positive critical value is 1 − 0.05 = 0.95

Using the z-score table, the corresponding z critical value is approximately zα/2 = 1.645. You can also use the Z Critical Value Calculator to find the critical value directly.

Step 3: Calculate the standard error.

Since the population standard deviation is known, the standard error, SE = σ / √n

Substituting the values, SE = 12 / √64

= 12 / 8

= 1.5

Step 4: Calculate the margin of error.

The margin of error, ME = Critical Value × Standard Error

Therefore, ME = 1.645 × 1.5

= 2.4675

Step 5: Apply the confidence interval formula

Recall, the confidence interval formula is: CI = x̄ ± ME

Substituting the values, CI = 84.6 ± 2.4675

Therefore:

  • Lower confidence limit: 84.6 − 2.4675 = 82.1325
  • Upper confidence limit: 84.6 + 2.4675 = 87.0675

Hence, the 90% confidence interval is (82.1325, 87.0675) or 82.1325 < μ < 87.0675. Therefore, we are 90% confident that the true mean exam completion time lies between approximately 82.13 and 87.07 minutes.

Example 2: T Confidence Interval (σ Unknown)

A researcher at a UK university wants to estimate the mean number of hours undergraduate students spend studying each week independently. A random sample of 20 students has a mean study time of 14.8 hours and a sample standard deviation of 3.6 hours. Find the 95% confidence interval for the population mean.

Solution

Since the population standard deviation is unknown, we use a t-confidence interval and follow these steps:

Step 1: Identify the parameters

From the question, we know that:

  • Sample mean, x̄ = 14.8
  • Sample standard deviation, s = 3.6
  • Sample size, n = 20
  • Confidence level = 95%

Step 2: Find the critical value

Since this involves calculating a t-confidence interval, we need to find the critical t-value.

For a 95% confidence interval, α = 1 − 0.95

= 0.05

Therefore, α / 2 = 0.05 / 2

= 0.025

For a one-sample t test, the degrees of freedom, df = n-1

= 20-1

= 19

Using a t table and looking up t0.025, 19, we get the critical t value = 2.093. Alternatively, you can use the T Critical Value Calculator to get a similar result.

Step 3: Calculate the standard error.

Since the population standard deviation is unknown, SE = s/√n

Substituting the values, SE = 3.6/√20

= 3.6 / 4.4721

= 0.805

Step 4: Calculate the margin of error.

By definition, the margin of error, ME = Critical Value × Standard Error

Hence, ME = 2.093 × 0.805

= 1.685

Step 5: Apply the confidence interval formula

Recall. The confidence interval formula is: CI = x̄ ± ME

Substituting the values, CI = 14.8 ± 1.685

Therefore:

  • Lower confidence limit: 14.8 − 1.685 = 13.115
  • Upper confidence limit: 14.8 + 1.685 = 16.485

Hence, the 95% confidence interval is (13.115, 16.485) or 13.115 < μ < 16.485. Therefore, we are 95% confident that the true mean weekly independent study time lies between approximately 13.12 and 16.49 hours.

90%, 95%, 99%, and Other Confidence Levels

The confidence level determines how confident we want to be in the interval used to estimate the population mean. Common confidence levels include 90%, 95%, and 99%, although other levels such as 80%, 85%, and 98% may also be used.

As the confidence level increases, the critical value also increases. This increases the margin of error and produces a wider confidence interval.

For example, if the sample mean, standard deviation, and sample size remain the same, a 99% confidence interval will be wider than a 95% confidence interval, while a 95% confidence interval will be wider than a 90% confidence interval.

The reason is simple. A higher confidence level requires a wider range of plausible values for the population mean.

When the population standard deviation, σ, is known, we use a z confidence interval. Each confidence level has a corresponding z critical value, as shown below.

Confidence Levelαα / 2Z Critical Value
80%0.200.101.282
85%0.150.0751.440
90%0.100.051.645
95%0.050.0251.960
98%0.020.012.326
99%0.010.0052.576
99.9%0.0010.00053.291

However, when the population standard deviation is unknown, we use a t confidence interval. In this case, there is no single t critical value for each confidence level because the t critical value depends on both the confidence level and the degrees of freedom.

For a confidence interval for a single population mean, df = n − 1

Therefore, two samples may both use a 95% confidence level but have different t critical values if their sample sizes are different.

You can use the T Critical Value Calculator to find the appropriate t critical value.

What Affects the Width of a Confidence Interval?

Three factors have an important effect on the width of a confidence interval.

  • Confidence Level. Increasing the confidence level increases the critical value, which further increases the margin of error. As a result, a 99% confidence interval is wider than a 95% interval calculated from the same sample.
  • Sample Size. The standard error contains √n in the denominator. As the sample size increases, the standard error decreases. Therefore, larger samples generally produce narrower and more precise confidence intervals.
  • Standard Deviation. Greater variability produces a larger standard error and therefore a wider confidence interval. So, all else being equal, a sample with less variability gives a more precise estimate of the population mean.

Frequently Asked Questions

What is a mean confidence interval calculator?

A mean confidence interval calculator estimates a confidence interval for a single population mean, μ. This calculator can use either summary statistics or raw sample data and automatically applies a z or t confidence interval depending on whether the population standard deviation is known.

When should I use a z confidence interval for the mean?

Use a z confidence interval when the population standard deviation, σ, is known. In this case, the calculator uses the z distribution and the standard error, SE = σ / √n.

When should I use a t confidence interval for the mean?

Use a t confidence interval when the population standard deviation, σ, is unknown. The calculator then uses the sample standard deviation, s, and a t critical value with df = n − 1.

Can I calculate a confidence interval for the mean from raw data?

Yes. Select Raw Data and enter or paste the individual sample values. If σ is unknown, the calculator automatically finds the sample mean, sample standard deviation, and sample size before constructing the t confidence interval. If σ is known, enter the population standard deviation separately, and the calculator will use a z confidence interval.

What information do I need to calculate a confidence interval for the mean?

For summary statistics, you need the sample mean, sample size, confidence level, and either the population standard deviation, σ, or the sample standard deviation, s. If you have raw data, you can enter the sample values directly instead.

What does the calculator return?

The calculator returns the lower and upper confidence limits, sample mean, standard error, critical value, and margin of error. It also provides a clear, step-by-step solution explaining how to construct the confidence interval manually.

Cite

Choose APA, MLA, Chicago, or Harvard. Citations credit StatCalc.net as the corporate author.

StatCalc.net. (2026, October 17). Mean Confidence Interval Calculator. Retrieved October 19, 2026, from https://statcalc.net/mean-confidence-interval-calculator/

About This Calculator

This calculator was developed by the StatCalc.net Team and statistically reviewed by , Senior Statistician & Editor.

Formulas, calculation logic, worked examples, and explanatory content are reviewed for statistical accuracy and clarity.