Confidence Interval Calculator

Calculate confidence intervals for a population mean (known or unknown σ) and for proportions. Supports 90%, 95% and 99% confidence levels.

What is a Confidence Interval?

A confidence interval is a range of values, computed from sample data, that is likely to contain the true population parameter. A 95% confidence interval means that, if you repeated the sampling many times, about 95% of such intervals would capture the true value.

The width of the interval depends on three things: the confidence level (higher level → wider interval), the variability of the data (larger spread → wider interval), and the sample size (larger n → narrower interval).

It is a common misconception that a 95% confidence interval has a 95% chance of containing the population mean. The probability statement applies to the method, not to any single computed interval.

Confidence Interval Formulas

For a mean with known σ use z*, with unknown σ use t* with n − 1 degrees of freedom:

CI = x̄ ± z*·(σ/√n)
CI = x̄ ± t*·(s/√n)

How to Use This Calculator

Follow these steps:

  1. Choose the mean or proportion tab depending on your statistic.
  2. Enter your sample statistics and pick the confidence level (90%, 95% or 99%).
  3. For a mean, choose whether the population standard deviation is known (Z) or unknown (t). The result shows the interval and margin of error.

Worked Example

A sample of 25 students has a mean score of 78 with a standard deviation of 10. What is the 95% confidence interval (σ unknown)?

df = 25 − 1 = 24, t* = 2.064 Margin of error = 2.064 × (10 / √25) = 4.128 95% CI = 78 ± 4.13 = [73.87, 82.13]

Frequently Asked Questions

Have another question? Let us know.

What does 95% confidence mean?

It means that if you repeated the same sampling procedure many times, approximately 95% of the computed confidence intervals would contain the true population parameter.

When should I use t instead of z?

Use the t-distribution when the population standard deviation is unknown and estimated from the sample, which is common with small samples (n < 30). Use z when σ is known or the sample is large (n ≥ 30), where the two converge.

How can I make a confidence interval narrower?

Increase the sample size, reduce the variability of your measurements, or accept a lower confidence level (e.g. 90% instead of 95%).

What is the margin of error?

It is half the width of the confidence interval — the critical value times the standard error. It expresses the maximum expected difference between the sample estimate and the true parameter at the chosen confidence level.

Buy me a coffee