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.
Result
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ฬ ยฑ MarginThe 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
- Inputs:
- mean=100, sd=15, n=25, confidence=0.95
- Output:
- t*=2.064, ยฑ6.19 โ [93.81, 106.19]
- Inputs:
- mean=50, sd=8, n=100, confidence=0.95
- Output:
- ยฑ1.587 โ [48.41, 51.59]
- 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?+
Why use the t-distribution instead of the normal?+
How does sample size affect the interval?+
What is the margin of error?+
When is this interval valid?+
Can I get a wider interval for more confidence?+
Related calculators
More tools you might like
Hand-picked tools that pair well with this one โ same audience, same intent.
Compute sample and population standard deviation and variance from a pasted list of numbers, with the mean and formulas shown.
z = (x โ ฮผ) / ฯ โ how many standard deviations a value is above or below the mean.
Test whether two means differ. t = (xฬโ โ xฬโ) / โ(sโยฒ/nโ + sโยฒ/nโ).
CI = mean ยฑ z ร (ฯ/โn). 90 / 95 / 99 % standard intervals.
Compute sample (nโ1) and population (n) standard deviation from a list of numbers.
US federal income tax owed using the 2024, 2025, or 2026 IRS brackets โ by filing status (Single / MFJ / MFS / HoH). Shows marginal rate, effective rate, tax owed, take-home pay, and an optional auto-subtract of the standard deduction.