Confidence Interval Calculator
Calculate confidence intervals for means and proportions
Confidence level
95% Confidence Interval
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)
- x̄ = 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.