Confidence Interval Calculator

Calculate confidence intervals for means and proportions. Find the range of values likely to contain the true population parameter at 90%, 95%, or 99% confidence level.

📊 Statistics📐 CI = x̄ ± z* × (s/√n)🔢 Math
Confidence level
Sample mean x̄
Standard deviation s
Sample size n
Please enter valid values.

Formula & Reference

VariableSymbolFormulaUnits
Confidence Interval CalculatorCI = x̄ ± z* × (s/√n)same as data units

Step-by-Step Examples

Example 1
Heights Survey

Sample of 100 adults: mean = 175 cm, s = 12 cm. Construct 95% CI.

  • SE = 12/sqrt(100) = 1.2 cm
  • MOE = 1.96 × 1.2 = 2.352 cm
  • 95% CI: 175 ± 2.352 = (172.6, 177.4)
  • We're 95% confident true mean height is 172.6-177.4 cm
✓ 95% CI: (172.6, 177.4) cm
Example 2
Election Poll

Poll of 1000 voters: 52% favor candidate A. Find 95% CI for proportion.

  • p = 0.52, SE = sqrt(0.52×0.48/1000) = 0.0158
  • MOE = 1.96 × 0.0158 = 0.031
  • 95% CI: 52% ± 3.1% = (48.9%, 55.1%)
  • Includes 50%: cannot conclude A will win
✓ 95% CI: (48.9%, 55.1%)
Example 3
99% CI (wider)

Same data: mean=175, s=12, n=100. Now 99% CI.

  • z* = 2.576 for 99%
  • MOE = 2.576 × 1.2 = 3.091
  • 99% CI: (171.9, 178.1) cm
  • Wider interval = more confidence, less precision
✓ 99% CI: (171.9, 178.1) — wider than 95%

Real-World Applications

Common Mistakes to Avoid

⚠️
Interpreting CI as probability

A 95% CI does NOT mean 95% probability that the true parameter is inside this specific interval. Once calculated, the interval either contains the true value or it doesn't.

⚠️
Wider CI ≠ bad

A wider CI reflects more uncertainty (smaller n or larger variability). It's honest. Artificially narrow CIs from biased samples are worse than wide CIs from honest samples.

⚠️
Using z instead of t for small samples

For n < 30, use t* (from t-distribution with n-1 df) instead of z*. Using z underestimates the CI width and overstates precision.

Frequently Asked Questions

What does 95% confidence mean?
If you repeated the study many times and calculated a CI each time, 95% of those intervals would contain the true population parameter. It is a statement about the procedure, not this specific interval.
What is margin of error?
Half the width of the CI: MOE = z* × SE. The ± number reported in polls. Depends on sample size (bigger n → smaller MOE), variability (smaller SD → smaller MOE), and confidence level (lower CL → smaller MOE).
How do I get a smaller (more precise) CI?
Increase sample size n (MOE ∝ 1/√n). Reduce measurement variability. Lower confidence level (less confident but more precise). Typically, 4× larger sample → ½ the MOE.
When should I use z* vs t*?
z*: known population SD or large n (>100). t*: unknown SD (typical in practice) and smaller n. With n=30+ and one mean, the difference is small. For small samples, always use t*.
What is a one-sided CI?
A one-sided CI only provides an upper or lower bound, not both. Used when you only care about one direction (e.g., drug is no worse than placebo). One-sided 95% CI uses z*=1.645 (not 1.96).

Related Math Calculators

Formula Explorer connections

Interpretation: This formula summarizes data, models uncertainty or supports inference about a population or random process. Assumption: The sampling design and distribution assumptions must match the data. Independence, sample size, outliers and measurement quality can materially affect interpretation.

Correlation Coefficient Calculator →Expected Value Calculator →Hypothesis Testing Calculator →Math Formula Explorer →