Confidence Interval for a Mean

Excel Formulas › Statistics

All versionsCONFIDENCE

A sample mean is an estimate — a confidence interval puts a margin around it. CONFIDENCE gives the ± margin of error so you can report “the average is 50, give or take 3.”


Quick formula: for a 95% interval (alpha 0.05), stdev in B1, sample size in B2:
=CONFIDENCE(0.05, B1, B2)
This returns the margin of error. The interval is mean − margin to mean + margin.

Functions used (tap for the full reference guide):

The example

Sample mean 50, stdev 8, n = 40, at 95% confidence.

AB
1Mean50
2Std dev8
3n40
4Margin (±)2.48

The formula

The margin of error, then the interval bounds:

=CONFIDENCE(0.05, 8, 40) → 2.48 Lower = 50 - 2.48 = 47.52 Upper = 50 + 2.48 = 52.48 // 95% CI ≈ 47.5 to 52.5

How it works

CONFIDENCE returns the half-width of the interval:

  1. The first argument is alpha — 1 minus the confidence level. For 95% confidence, alpha = 0.05; for 99%, 0.01.
  2. Pass the standard deviation and the sample size n.
  3. The result is the margin of error. Build the interval as mean ± margin.
  4. Bigger samples shrink the margin (it scales with 1/√n), so quadrupling n halves the margin.

Small samples? CONFIDENCE (and its 365 sibling CONFIDENCE.NORM) assume a normal distribution and a known/large-sample standard deviation. For small samples using the sample standard deviation, the t-based CONFIDENCE.T is more accurate.

Try it: interactive demo

Live demo

Set the mean, stdev, n, and confidence.

Margin:   Interval:

Variations

99% confidence

Lower alpha, wider interval:

=CONFIDENCE(0.01, B1, B2)

Interval bounds

Mean ± margin:

=AVERAGE(data) - CONFIDENCE(0.05, STDEV(data), COUNT(data))

t-based (small sample)

More accurate for small n:

=CONFIDENCE.T(0.05, STDEV(data), COUNT(data))

Pitfalls & errors

Alpha is not the confidence level. Enter 0.05 for 95%, not 0.95. Mixing these up gives a nonsensically tiny or huge margin.

Normal vs t. CONFIDENCE/CONFIDENCE.NORM use the normal distribution; for small samples with an estimated stdev, CONFIDENCE.T is the right tool.

n must be ≥ 1. A zero or blank sample size errors. And remember the margin shrinks only with the square root of n.

Practice workbook

📊
Download the free Confidence Interval for a Mean practice workbook
A confidence-interval calculator with 95%/99%, full-bounds, and t-based variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I calculate a confidence interval in Excel?
Get the margin with =CONFIDENCE(alpha, stdev, n) — use alpha 0.05 for 95% — then report mean ± margin as the interval.
What value do I use for alpha?
Alpha is 1 minus the confidence level: 0.05 for 95%, 0.01 for 99%, 0.10 for 90%.
When should I use CONFIDENCE.T instead?
For small samples where you estimate the standard deviation from the data, CONFIDENCE.T (the t-distribution version) is more accurate than the normal-based CONFIDENCE.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Standard deviation · Coefficient of variation · Percentile & quartile

Function references: CONFIDENCE · AVERAGE