Confidence Interval Calculator

Confidence Interval Calculator

Calculate CI for a population mean

A confidence interval gives you a range of plausible values for a population parameter, based on your sample data.

This calculator computes that range for a population mean, using either the Z-distribution (for large samples) or the T-distribution (for smaller samples with unknown population standard deviation).


What a Confidence Interval Actually Tells You

This is the most important thing to understand before using the results.

A 95% confidence interval does NOT mean "there is a 95% chance the true mean is in this range." The true mean is a fixed number — it either is or isn't in any given interval. Probability doesn't apply to fixed values.

What it actually means: if you repeated your study many times and built a 95% confidence interval each time, about 95% of those intervals would contain the true population mean.

Think of it like casting a net. Each individual net either catches the fish or it doesn't. But if you cast 100 nets using the same method, about 95 of them will catch the fish.

This sounds like a technicality, but it matters when you're reporting results. Say "we are 95% confident that…" rather than "there is a 95% chance that…"


How the Calculation Works

The formula for a confidence interval around a sample mean:

CI = x̄ ± (critical value × SE)

Where:

  • = sample mean
  • SE = standard error = s / √n
  • critical value = depends on your confidence level and distribution type

Standard Error

The standard error measures how much your sample mean is likely to vary from sample to sample. Larger samples have smaller standard errors.

SE = s / √n

Example: Sample mean = 82, standard deviation = 12, n = 36.

  • SE = 12 / √36 = 12 / 6 = 2.0

Z-Interval (Large Samples)

When n ≥ 30 or you know the population standard deviation, use Z critical values:

Confidence LevelZ critical value (z*)
90%1.6449
95%1.9600
99%2.5758

Continuing the example (95% CI):

  • Margin of Error = 1.96 × 2.0 = 3.92
  • Lower Bound = 82 - 3.92 = 78.08
  • Upper Bound = 82 + 3.92 = 85.92

So the 95% confidence interval is [78.08, 85.92].

T-Interval (Small Samples)

When n < 30 and you don't know the population standard deviation, use the T-distribution with df = n - 1. The T-distribution has heavier tails than the normal, which reflects the added uncertainty from a small sample.

The T critical value depends on both the confidence level and the degrees of freedom. With df = 15 and 95% confidence, t* ≈ 2.131 (compared to z* = 1.960). The larger critical value produces a wider, more conservative interval.


How to Interpret Your Results

Margin of Error tells you how far the interval extends in each direction from the mean. A margin of ±3.92 means the interval is 7.84 units wide.

Lower and Upper Bounds define the range. If your 95% CI is [78.08, 85.92] and a competitor claims their process averages 80, you can't rule that out — 80 falls within your interval.

Width of the interval reflects your precision:

  • Wider interval = less precise (small sample, high confidence level, large variability)
  • Narrower interval = more precise (large sample, lower confidence level, small variability)

To narrow a confidence interval, increase your sample size. Doubling n reduces the margin of error by a factor of √2 ≈ 1.41.


How to Calculate Confidence Intervals in Excel

Excel has two dedicated functions for this.

CONFIDENCE.NORM — for Z-intervals (large samples or known σ):

=CONFIDENCE.NORM(alpha, standard_dev, size)
  • alpha = 1 - confidence level (e.g., 0.05 for 95%)
  • Returns the margin of error only (not the full interval)

Then: Lower = mean - CONFIDENCE.NORM(0.05, sd, n) and Upper = mean + CONFIDENCE.NORM(0.05, sd, n).

CONFIDENCE.T — for T-intervals (small samples, unknown σ):

=CONFIDENCE.T(alpha, standard_dev, size)

Same structure as CONFIDENCE.NORM but uses the T-distribution with df = n - 1.

Gotcha: Both functions return only the margin of error, not the interval itself. You need to add and subtract from the mean separately.

Older Excel versions: CONFIDENCE.NORM and CONFIDENCE.T were introduced in Excel 2010. In Excel 2007 and earlier, use CONFIDENCE(alpha, sd, n), which uses the Z-distribution.

Building the full interval in a spreadsheet:

CellFormulaResult
B1Mean82
B2Std Dev12
B3Sample Size36
B4=CONFIDENCE.NORM(0.05, B2, B3)3.92 (margin of error)
B5=B1-B478.08 (lower bound)
B6=B1+B485.92 (upper bound)

Common Mistakes to Avoid

Using Z when you should use T. For small samples (n < 30) with an unknown population standard deviation, the Z-interval is overconfident — it produces intervals that are too narrow. Use CONFIDENCE.T or select the T-distribution in this calculator.

Misreading the margin of error. The margin of error is the distance from the mean to one bound. The total width of the interval is 2 × margin of error. A margin of ±5 means the interval is 10 units wide.

Interpreting the interval as a probability about the true mean. The true mean is fixed, not random. "95% confident" refers to the process that generated the interval, not the probability that any specific interval contains the mean.

Increasing confidence level without increasing sample size. Going from 95% to 99% confidence makes your interval wider (less useful), not more precise. If you want both higher confidence and a narrower interval, you need a larger sample.

Using the wrong alpha in Excel. CONFIDENCE.NORM takes alpha = 1 - confidence level. For a 95% CI, alpha = 0.05, not 0.95. Getting this backwards gives you a very wide or nonsensical interval.


FAQ

What confidence level should I use?
95% is the most common in research and business. Use 90% when you need a narrower interval and can accept slightly more uncertainty. Use 99% when the cost of being wrong is high (medical studies, safety standards).

How do I get a narrower confidence interval?
Increase your sample size. The margin of error is proportional to 1/√n. To cut the margin in half, you need 4× as many observations.

What is the difference between CONFIDENCE.NORM and CONFIDENCE.T in Excel?
CONFIDENCE.NORM uses the normal (Z) distribution — appropriate for large samples or known population standard deviation. CONFIDENCE.T uses the t-distribution and is better for small samples. In Excel, alpha is 1 minus your confidence level (0.05 for 95%).

Can I build a confidence interval for a proportion (like a survey percentage)?
Yes, but the formula is different. For a proportion p from n observations, the standard error is √(p(1-p)/n) and you use Z critical values. This calculator covers means only.

Why is my T-interval wider than the Z-interval for the same data?
Because the T-distribution has heavier tails to account for uncertainty about the true population standard deviation. As sample size increases, t* approaches z*, and the intervals converge.

What if my sample size is exactly 30?
The n ≥ 30 rule is a rough guideline. If your data is roughly symmetric and you have exactly 30 observations, Z works reasonably well. If there's notable skew, lean toward T. For critical decisions, T is always the safer choice when you don't know the true population standard deviation.

Related Articles / Calculators

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.