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
General calculation reads
Amazon affiliateAs an Amazon Associate we may earn from qualifying purchases. This does not add cost for you.
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.