Loona Calculators
Loona Calculators › Math › Confidence Interval Calculator

↔️ Confidence Interval Calculator

Build confidence intervals the textbook way: for a mean when the population SD is known (z method), for a mean from a sample SD (t method with exact t critical values), and for a proportion — at 90%, 95% or 99% confidence.

Quick answer: A 95% CI for a mean is x̄ ± 1.96 × σ ÷ √n when σ is known. Sample mean 100, σ = 15, n = 25: margin = 1.96 × 3 = 5.88, giving the interval 94.12 to 105.88.

How to use the Confidence Interval Calculator

  1. Choose the interval type: mean (σ known), mean (sample SD), or proportion.
  2. Enter the statistics and sample size.
  3. Choose the confidence level and read the interval and its margin of error.
Example: A poll finds 60% support in 100 voters: the 95% CI is 0.6 ± 1.96 × √(0.6×0.4÷100) = 0.6 ± 0.096 → 50.4% to 69.6% — which is why '± about 10 points' appears under such polls.

Frequently Asked Questions

What does '95% confidence' actually mean?

If the same sampling procedure were repeated many times, about 95% of the intervals built this way would contain the true value. It is a statement about the method's long-run reliability, not a 95% probability about this one interval in the strict frequentist reading.

When do I use t instead of z?

Use t when σ is unknown and estimated from the sample (the usual case). The t critical value is larger than z — especially for small samples — which honestly widens the interval. This calculator computes exact t critical values from the t distribution.

Why does a bigger sample narrow the interval?

The margin shrinks with √n: quadrupling the sample halves the margin. Going from n = 100 to n = 400 in the poll example cuts ±9.6 points to ±4.8 points.

Does the proportion interval work near 0% or 100%?

The standard (Wald) interval used here can misbehave for very small samples or extreme proportions; treat results cautiously when np or n(1−p) is under about 10.

Related Calculators

%

Percentage Calculator

Math

📊

Statistics Calculator

Math

½

Fraction Calculator

Math

🧮

Equation Solver

Math

🔬

Scientific Calculator

Math

📐

Average Calculator

Math

🔔

Z-Score Calculator

Math

🎲

Probability Calculator

Math

How it works — the formula

Mean, σ known: x̄ ± z* × σ ÷ √n. Mean, s known: x̄ ± t*(df = n − 1) × s ÷ √n, with t* found by inverting the t CDF numerically. Proportion: p̂ ± z* × √(p̂(1 − p̂) ÷ n). Critical values: z* = Φ⁻¹((1 + level) ÷ 2) — 1.645, 1.960, 2.576 for 90/95/99%.

Worked example

Inputs: mean type (σ known): x̄ = 100, σ = 15, n = 25, 95%.

Steps: Standard error = 15 ÷ √25 = 15 ÷ 5 = 3. Margin = 1.960 × 3 = 5.88. Interval = 100 ± 5.88.

Result: 94.12 to 105.88. T-method check: with s = 15 instead, t*(24 df) = 2.064, margin = 6.19, interval 93.81 to 106.19 — wider, as it should be.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.