Skip to Content
Confidence Interval Calculator — Fast, Accurate & Free

Calculator

Choose to compute a CI for a mean or a proportion.

Common choices: 90, 95, 99.

Provide population σ if known; otherwise provide sample s.

Estimate

Margin of error

Confidence interval

Lower: — | Upper: —
Method: —
Tip: z critical is used when population σ is known or n is large; t critical is used when σ is unknown and n is small. For extreme proportions or small n, consider Wilson or exact intervals.

Confidence intervals: A complete guide

Confidence intervals provide a range of plausible values for a population parameter based on sample data. Instead of a single point estimate, a confidence interval expresses uncertainty by combining variability and a chosen confidence level. Wider intervals reflect higher confidence or more variability; narrower intervals reflect lower confidence or larger, more precise samples.

Confidence interval for a mean

For a mean with known population standard deviation, the \((1-\alpha)\times 100\%\) confidence interval is \[ \left[\,\bar{x} - z_{\alpha/2}\cdot \frac{\sigma}{\sqrt{n}},\ \bar{x} + z_{\alpha/2}\cdot \frac{\sigma}{\sqrt{n}}\,\right]. \] When \(\sigma\) is unknown and the sample size is small, use the t-distribution: \[ \left[\,\bar{x} - t_{\alpha/2,\,df}\cdot \frac{s}{\sqrt{n}},\ \bar{x} + t_{\alpha/2,\,df}\cdot \frac{s}{\sqrt{n}}\,\right], \] where \(df=n-1\) and \(s\) is the sample standard deviation.

Confidence interval for a proportion

For a proportion with \(\hat{p}=x/n\), a normal-approximation interval is \[ \left[\,\hat{p} - z_{\alpha/2}\cdot \sqrt{\frac{\hat{p}(1-\hat{p})}{n}},\ \hat{p} + z_{\alpha/2}\cdot \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}\,\right]. \] This works best for reasonably large \(n\) and \(\hat{p}\) not near 0 or 1; otherwise, consider Wilson or exact methods.

Choosing confidence levels

  • 90%: Narrower interval, more precision, less confidence.
  • 95%: Standard in research and reporting.
  • 99%: Wider interval, more conservative inference.

Best practices

  • Match method to assumptions: Use t for unknown \(\sigma\) with small samples; z for known \(\sigma\) or large \(n\).
  • Check sample size: Larger \(n\) reduces margin of error and tightens intervals.
  • Report clearly: Provide estimate, margin of error, bounds, and confidence level.

Worked examples

Mean (z): \(\bar{x}=52\), \(\sigma=10\), \(n=64\), \(CL=95\%\). \(z_{0.025}\approx1.96\). ME \(=1.96\cdot(10/\sqrt{64})=2.45\). CI \([49.55, 54.45]\).
Mean (t): \(\bar{x}=52\), \(s=12\), \(n=16\), \(CL=95\%\). \(df=15\), \(t_{0.025,15}\approx2.131\). ME \(=2.131\cdot(12/\sqrt{16})=6.39\). CI \([45.61, 58.39]\).
Proportion (z): \(x=48\), \(n=100\), \(\hat{p}=0.48\), \(CL=95\%\). SE \(=\sqrt{0.48\cdot0.52/100}=0.0499\). ME \(=1.96\cdot 0.0499=0.098\). CI \([0.382, 0.578]\).

Frequently asked questions

HOW TO decide between mean and proportion intervals?

Use mean CI for continuous measurements (e.g., time, weight). Use proportion CI for binary outcomes (success/failure) summarized by \(\hat{p}=x/n\).

HOW TO reduce margin of error?

Increase sample size, reduce variability, or choose a lower confidence level if appropriate.

HOW TO apply finite population correction?

When sampling without replacement from a finite population of size \(N\), multiply SE by \(\sqrt{(N-n)/(N-1)}\).

HOW TO report CI in papers?

Include estimate, confidence level, bounds, and method (z/t). Example: mean = 52 (95% CI: 49.6 to 54.4; z).

HOW TO handle small or skewed samples?

Use t-intervals for means and consider non-normal or exact interval methods for proportions when assumptions are strained.