Confidence Interval Calculator (Mean)

Build a confidence interval for a population mean from the sample mean, standard deviation, size, and confidence level using the t-distribution.

Inputs

Average of your sample.

Standard deviation of your sample.

Number of observations.

How confident the interval should be.

Result

Loading calculatorโ€ฆ
โ€”

How to use this calculator

  • Enter the sample mean and sample standard deviation.
  • Enter the sample size and choose a confidence level (90/95/99%).
  • Read the interval and the margin of error.
  • Report the interval as "mean ยฑ margin," noting the confidence level.

About this calculator

A confidence interval gives a plausible range for an unknown population mean, based on a sample. This calculator builds the interval the standard way: take the sample mean and add and subtract a margin of error equal to a critical t-value times the standard error of the mean (the sample standard deviation divided by the square root of the sample size). It uses the t-distribution rather than the normal distribution because, in practice, the population standard deviation is unknown and estimated from the sample โ€” the t-distribution's heavier tails account for that extra uncertainty, especially at small sample sizes, and converge to the normal curve as the sample grows. A 95% confidence interval means that if you repeated the sampling many times, about 95% of the intervals constructed this way would contain the true mean.

How it works โ€” the formula

SE = s รท โˆšn Margin = t*(df = nโˆ’1) ร— SE CI = xฬ„ ยฑ Margin

The standard error scales the sample spread by sample size; the t critical value sets how many standard errors wide the interval must be for the chosen confidence.

Worked examples

Example 1
mean 100, s 15, n 25, 95%
Inputs:
mean=100, sd=15, n=25, confidence=0.95
Output:
t*=2.064, ยฑ6.19 โ†’ [93.81, 106.19]
Example 2
mean 50, s 8, n 100, 95%
Inputs:
mean=50, sd=8, n=100, confidence=0.95
Output:
ยฑ1.587 โ†’ [48.41, 51.59]
Example 3
mean 100, s 15, n 25, 99%
Inputs:
mean=100, sd=15, n=25, confidence=0.99
Output:
t*=2.797, ยฑ8.39 โ†’ [91.61, 108.39]

Limitations

  • Assumes a random sample from a roughly normal population (or large n).
  • For proportions or other parameters, a different interval is needed.
  • Critical t-values are computed numerically (accurate to ~3 decimals).

Inferential result; validity depends on the sample being representative.

Frequently asked

What does a 95% confidence interval mean?+
It means the procedure that produced the interval would capture the true population mean about 95% of the time across many repeated samples. It does not mean there is a 95% probability the true mean lies in this particular interval โ€” the mean is fixed; it is the interval that varies from sample to sample.
Why use the t-distribution instead of the normal?+
Because the population standard deviation is unknown and estimated from the sample, which adds uncertainty. The t-distribution has heavier tails to reflect that, giving a slightly wider, more honest interval for small samples. For large n the t and normal critical values nearly coincide.
How does sample size affect the interval?+
Larger samples shrink the interval two ways: the standard error (s/โˆšn) falls as n grows, and the critical t-value decreases toward the normal value. So quadrupling the sample size roughly halves the margin of error.
What is the margin of error?+
It is the half-width of the interval: t* ร— standard error. The interval is the sample mean plus or minus this margin. A bigger margin means a wider, less precise interval.
When is this interval valid?+
When the sample is random and the data is approximately normal, or the sample is large enough for the Central Limit Theorem to make the sampling distribution of the mean roughly normal. Strong skew or outliers at small n can undermine it.
Can I get a wider interval for more confidence?+
Yes. Higher confidence (e.g. 99% vs 95%) uses a larger critical t-value, widening the interval. There is a trade-off: more confidence means less precision for the same data.

Related calculators

More tools you might like

Hand-picked tools that pair well with this one โ€” same audience, same intent.