Confidence Interval Calculator

Calculate confidence intervals for sample means or proportions.

Result

95% CI: [48.0400, 51.9600]
Margin of Error
± 1.9600
Standard Error
1.0000
Visual Representation
48.0450.0051.96

What Is a Confidence Interval?

A confidence interval provides a range of values that likely contains the true population parameter. For example, a 95% confidence interval means that if you repeated your study 100 times, approximately 95 of those intervals would contain the true value.

CI = Point Estimate ± Margin of Error

Formulas

CI for Mean

CI = x̄ ± z × (σ / √n)

CI for Proportion

CI = p̂ ± z × √(p̂(1-p̂) / n)

Z-Scores for Common Confidence Levels

Confidence LevelZ-ScoreAlpha (α)
90%1.6450.10
95%1.960.05
99%2.5760.01
99.9%3.2910.001

How Sample Size Affects Confidence Intervals

The margin of error shrinks as sample size increases. Specifically, doubling precision requires quadrupling the sample size — a classic trade-off in research design and polling.

Sample Size (n)Margin of Error (σ=10, 95%)CI Width
25±3.927.84
100±1.963.92
400±0.981.96
1,600±0.490.98

To halve the margin of error, you need 4× the sample size. This is why large clinical trials are expensive — achieving narrow confidence intervals requires very large enrollment.

Step-by-Step Examples

CI for Mean: Average test score

Sample mean x̄ = 75, σ = 12, n = 64, 95% CI (z = 1.96)

  1. Standard Error (SE) = σ/√n = 12/√64 = 12/8 = 1.5
  2. Margin of Error = z × SE = 1.96 × 1.5 = 2.94
  3. Lower bound = 75 − 2.94 = 72.06
  4. Upper bound = 75 + 2.94 = 77.94
  5. Result: 95% CI: [72.06, 77.94]

CI for Proportion: Election poll

Sample proportion p̂ = 0.52 (52%), n = 1000, 95% CI

  1. SE = √(p̂(1−p̂)/n) = √(0.52 × 0.48 / 1000) = √(0.0002496) ≈ 0.0158
  2. MOE = 1.96 × 0.0158 ≈ 0.031 (±3.1%)
  3. Lower = 0.52 − 0.031 = 48.9%
  4. Upper = 0.52 + 0.031 = 55.1%
  5. This poll cannot declare a winner — both >50% and <50% are in the interval

Common Misconceptions About Confidence Intervals

❌ Myth: "There's a 95% chance the true value is in this interval"

The true value either IS or IS NOT in your specific interval — there's no probability for a fixed interval. The 95% refers to the procedure: 95% of intervals constructed this way will contain the true value.

❌ Myth: A wider CI means something went wrong

A wider CI just means less precision — often due to small sample size or high variability. It's honest uncertainty. It's more trustworthy than a falsely narrow CI from an underpowered study.

✅ Reality: Use CIs alongside p-values

A 95% CI that doesn't contain zero is equivalent to a two-tailed p < 0.05 test. But CIs provide richer information — they show the plausible range of the effect size, not just a binary significant/not-significant verdict.

Frequently Asked Questions

Related Calculators