Math

Confidence Interval Calculator

Calculate confidence intervals for means and proportions

Confidence level

95% Confidence Interval

72.228177.7719
±2.7719
Margin of Error
1.4142
Standard Error
1.960
Z-Score

What Is a Confidence Interval?

A confidence interval is a range of plausible values for an unknown population parameter — a mean, a proportion, a difference between groups — based on your sample data. Instead of saying "our survey found 54% support", a confidence interval says "our survey found 54% support, and we are 95% confident the true population support is between 50% and 58%".

Confidence Interval Formula for Means

When estimating a population mean from a sample:
CI = x̄ ± z × (σ / √n)

  • = sample mean
  • z = z-score for confidence level (1.96 for 95%)
  • σ = sample standard deviation
  • n = sample size

Example: 50 students scored an average of 75 points with a standard deviation of 10. At 95% confidence: SE = 10 / √50 ≈ 1.414. CI = 75 ± 1.96 × 1.414 = [72.23, 77.77].

Confidence Interval Formula for Proportions

When estimating a population proportion from a survey:
CI = p ± z × √(p(1 − p) / n)

  • p = sample proportion (e.g., 0.54 for 54%)
  • z = z-score for confidence level
  • n = sample size

Example: 400 people surveyed, 54% said yes. SE = √(0.54 × 0.46 / 400) = √(0.000621) ≈ 0.0249. CI at 95% = 0.54 ± 1.96 × 0.0249 = [49.1%, 58.9%].

How to Narrow a Confidence Interval

  • Increase sample size: SE ∝ 1/√n — quadrupling n halves the CI width.
  • Reduce confidence level: Going from 99% to 95% narrows the interval (but you accept more uncertainty).
  • Reduce variability: Tighter measurement instruments or more homogeneous study populations reduce σ.

Z vs. T: When Does It Matter?

For sample sizes of 30 or more, the z-distribution approximation is very close to the t-distribution result. For smaller samples estimating means, use a t-distribution with n − 1 degrees of freedom — the t-table value is larger than the z-value, producing a wider (more honest) confidence interval. For proportions, the z-approximation is always used.

Frequently Asked Questions

What is a confidence interval?
A confidence interval (CI) is a range of values that is likely to contain the true population parameter with a specified probability. For example, a 95% confidence interval of [48%, 56%] for a survey result means you are 95% confident the true population percentage is somewhere between 48% and 56%. The width of the interval reflects your uncertainty — wider intervals mean less precision.
What does "95% confident" actually mean?
It means that if you repeated the study 100 times with different random samples, approximately 95 of the resulting confidence intervals would contain the true population value. It does NOT mean there is a 95% probability the true value is in this specific interval — once computed, the interval either contains the true value or it does not. The probability refers to the long-run procedure, not the specific result.
What is the difference between CI for means vs. proportions?
For means (e.g., average test score, average height), the CI uses the sample mean and standard deviation: CI = mean ± z × (stdDev / √n). For proportions (e.g., 60% of respondents said yes), the CI uses the sample proportion: CI = p ± z × √(p(1-p)/n). This tool handles both modes.
What is the standard error?
The standard error (SE) is the standard deviation of the sampling distribution — it measures how much the sample mean or proportion is expected to vary across different samples. For means: SE = stdDev / √n. For proportions: SE = √(p(1-p)/n). The margin of error is z × SE. Larger sample sizes reduce the standard error.
When should I use a t-distribution instead of a z-distribution?
Use a t-distribution (t-score) instead of a z-score when you are working with means, have a small sample size (n < 30), and the population standard deviation is unknown. The t-distribution has heavier tails than the normal distribution, producing wider confidence intervals to account for additional uncertainty. This calculator uses z-scores, which are appropriate for large samples (n ≥ 30) or any sample when working with proportions.