Confidence Interval Calculator

This free confidence interval calculator gives you a 90%, 95% or 99% interval for a mean. Enter the sample mean, standard deviation and sample size, and you get the interval, the margin of error, the steps and a chart that shades the range.

CI

Confidence Interval Calculator

90%, 95% or 99% interval for a mean, with a live chart

Or fill these boxes from raw data

How to Use the Confidence Interval Calculator

  1. Enter the sample mean, standard deviation and sample size. Only have raw numbers? Open Or fill these boxes from raw data.
  2. Pick a confidence level. 95% is the most common.
  3. Choose use t if the standard deviation came from your sample (almost always), or use z if you know the population σ.
  4. Press Calculate.

Confidence Interval Formula

CI = x̄ ± critical value × (s ÷ √n)
  • x̄ is the sample mean and s ÷ √n is the standard error.
  • The critical value comes from the t distribution (with n − 1 degrees of freedom) or the z distribution.
  • Critical value × standard error is the margin of error.
Confidence levelz* critical value
90%1.645
95%1.960
99%2.576

Worked Example

A sample of 40 has a mean of 50 and a standard deviation of 8. Find the 95% interval.

StepWorkingResult
1. Standard error8 ÷ √401.2649
2. t* (df = 39)95% two-sided2.0227
3. Margin of error2.0227 × 1.26492.5585
4. Interval50 ± 2.558547.44 to 52.56

How to Read Your Result

  • “95% confident” means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean.
  • A wider interval means less precision. Higher confidence or a smaller sample makes it wider.
  • A narrower interval needs a larger sample or less variable data.

Confidence intervals are a core part of inferential statistics. They depend on your sample and its standard deviation.

Frequently Asked Questions

Should I use t or z?

Use t when the standard deviation comes from your sample, which is nearly always the case. Use z only when the true population standard deviation is known. With large samples (over about 100), the two give almost the same answer.

Does a 95% interval mean there is a 95% chance the mean is inside it?

Not quite. The true mean is fixed; the interval is what changes from sample to sample. The 95% describes the method: about 95 out of 100 intervals built this way will capture the true mean.

Why is my 99% interval wider than my 95% interval?

To be more confident that you have captured the true mean, you need a wider net. Higher confidence always means a wider interval for the same data.

How can I make the interval narrower?

Collect a larger sample. Because the standard error divides by √n, quadrupling the sample size roughly halves the margin of error.

More Free Tools

Variance Calculator · Standard Error Calculator · Z-Score Calculator · P-Value Calculator · Correlation Coefficient Calculator · Linear Regression Calculator · Probability Calculator · Percentage Calculator · Grade Calculator · Flip a Coin · Random Number Generator

See every tool on our free statistics and math tools page.

This calculator is for learning and everyday use. Double-check important results, and follow your teacher’s or school’s method for graded work.