This professional-grade confidence interval calculator helps researchers, students, data scientists, and engineers construct two-sided confidence intervals for population means and proportions. It supports both z- and t-based intervals for means and robust methods for proportions, with clear steps and accessible explanations.

Data Source and Methodology

Authoritative source: National Institute of Standards and Technology (NIST), Engineering Statistics Handbook, Section 8: Confidence Intervals (revision 2012). Direct link.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

The Formula Explained

Two-sided confidence interval for a mean with known σ (z):

$$ \bar{x} \pm z_{1-\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} $$

Two-sided confidence interval for a mean with unknown σ (t):

$$ \bar{x} \pm t_{1-\alpha/2,\;n-1} \cdot \frac{s}{\sqrt{n}} $$

Wald interval for a proportion p:

$$ \hat{p} \pm z_{1-\alpha/2} \cdot \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} $$

Wilson score interval for a proportion p:

$$ \frac{\hat{p} + \frac{z^2}{2n} \pm z \sqrt{\frac{\hat{p}(1-\hat{p})}{n} + \frac{z^2}{4n^2}}} {1 + \frac{z^2}{n}} $$

Agresti–Coull interval:

$$ \tilde{p} = \frac{x + \tfrac{z^2}{2}}{n + z^2}, \quad \text{CI} = \tilde{p} \pm z \sqrt{\frac{\tilde{p}(1-\tilde{p})}{\,n + z^2\,}} $$

Glossary of Variables

  • x̄ — sample mean.
  • σ — population standard deviation (known).
  • s — sample standard deviation (unknown σ case).
  • n — sample size; df = n − 1 for t.
  • z, t — critical values for the standard normal and Student’s t distributions.
  • x — number of successes; n — number of trials; p̂ = x/n.
  • SE — standard error; ME — margin of error; CI — confidence interval.

How It Works: A Step-by-Step Example

Scenario: A team measures the compression strength (MPa) of 25 samples: x̄ = 10.2, s = 3.1. Construct a 95% CI for the mean strength (σ unknown).

  1. df = 24; confidence level 95% ⇒ α = 0.05 ⇒ use t critical t0.975,24 ≈ 2.064.
  2. SE = s / √n = 3.1 / 5 = 0.62.
  3. ME = t × SE = 2.064 × 0.62 ≈ 1.2797.
  4. CI = x̄ ± ME = 10.2 ± 1.2797 ⇒ [8.9203, 11.4797].

Frequently Asked Questions (FAQ)

How do I choose the confidence level?

95% is standard; 90% yields narrower intervals, 99% wider. Choose based on risk tolerance and domain norms.

What if my data are skewed or have outliers?

For means with small n, t-intervals assume approximate normality of the sampling distribution. Consider transformations or robust methods if skew/outliers are extreme.

Is the Wilson interval always better than Wald?

Wilson has superior coverage, especially near boundaries or at small n. Wald is simple but can be unreliable when np or n(1−p) are small.

Can I paste raw data?

Yes. Use the “Paste raw data” panel. We compute x̄ and s, which replace manual entries for mean-based intervals.

Do results round values?

We compute with full precision and display to a sensible number of decimals. You can interpret or round per your reporting standards.

Are intervals one- or two-sided?

Currently two-sided. One-sided intervals will be added in a future update.

Tool developed by Ugo Candido. Content verified by CalcDomain Expert Team.
Last reviewed for accuracy on: .