Confidence Interval Calculator

Confidence Interval Calculator – Mean (Z/t) & Proportion
Mode "Mean – σ unknown (t)" uses an accurate t critical approximation for any df. Proportion CI defaults to Wilson for better coverage.

Results

Enter values and click Calculate.

Confidence Interval Calculator

This free Confidence Interval Calculator helps you compute confidence intervals for a mean (Z or t distribution) and for a proportion. Simply enter your data (mean, standard deviation, sample size or successes/trials) and choose a confidence level (80%, 90%, 95%, 99%, or custom). The calculator instantly shows the margin of error and the lower and upper bounds of the interval.

What is a Confidence Interval?

  • In statistics, a confidence interval (CI) is a range of values that is likely to contain the true population parameter (mean or proportion).

    • A 95% CI means that if you repeated the study many times, about 95% of the calculated intervals would contain the true population value.
    • Wider intervals indicate more uncertainty; narrower intervals suggest more precision.

Confidence Interval Formula

For Mean (σ known, Z distribution)

$$ CI = \bar{x} \; \pm \; Z_{\alpha/2} \times \frac{\sigma}{\sqrt{n}} $$

For Mean (σ unknown, t distribution)

$$ CI = \bar{x} \; \pm \; t_{\alpha/2, df} \times \frac{s}{\sqrt{n}} $$

For Proportion (p̂)

$$ CI = \hat{p} \; \pm \; Z_{\alpha/2} \times \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}} $$

Where:

  • = sample mean
  • σ / s = population or sample standard deviation
  • n = sample size
  • = x / n = sample proportion (successes ÷ trials)
  • Z, t = critical values for chosen confidence level

Confidence Levels and Critical Values

  • 90% CI → Z ≈ 1.645
  • 95% CI → Z ≈ 1.96
  • 99% CI → Z ≈ 2.576

For smaller samples (n < 30), use the t-distribution instead of Z.

Real-World Applications

  • Medical research: estimating treatment effects.
  • Polling: reporting confidence intervals for survey percentages.
  • Quality control: testing if production meets standards.
  • Finance: estimating returns and risk.
  • Science: showing uncertainty in experimental results.

FAQs

Q: What does a 95% confidence interval mean?
A: It means we are 95% confident that the true population parameter lies within the calculated range.

Q: When do I use Z vs t distribution?
A: Use Z if population σ is known and n ≥ 30. Use t if σ is unknown or n is small.

Q: Can a confidence interval include negative values?
A: Yes, depending on the data — especially with means near zero.

Q: Why are Wilson intervals recommended for proportions?
A: They give more accurate coverage than the simple Wald method, especially for small n.

Was this calculator helpful?

Rate your experience to help us improve.

Thanks for rating! See the average and total ratings above.

Not rated yet—be the first to rate this calculator.