Confidence Interval Calculator

Build a confidence interval for a population mean (using t, or z when σ is known) or for a proportion, from summary statistics or raw data. Every piece is shown: the critical value, the standard error and the margin of error.

95% confidence interval
(69.3754, 75.4246)
Margin of error
± 3.0246
t*
2.0452
Standard error
1.4789
df
29

Step-by-step working

  1. σ unknown → use t with df = n − 1 = 29t* = 2.0452 for 95% confidence
  2. Standard error of the meanSE = s ÷ √n = 8.1 ÷ √30 = 1.47885
  3. Margin of errorME = 2.0452 × 1.47885 = 3.02459
  4. Interval = x̄ ± ME72.4 ± 3.02459 → (69.3754, 75.4246)

Interpretation: we are 95% confident the true population mean lies between 69.3754 and 75.4246. “95% confident” describes the method: about 95% of intervals built this way capture the true value.

Formula mean: x̄ ± t* · s ÷ √n proportion: p̂ ± z* · √(p̂(1 − p̂) ÷ n)

Ask the tutor about your result

An AI tutor reads your inputs and results above and explains them in plain English. The numbers come from the calculator; the explanation is AI-written, so check it against your notes.

What “95% confident” really means

Here the true mean is known: μ = 50. Each line is a 95% interval from a fresh random sample of 10. Most capture 50; a few (red) miss. “95% confidence” means the method captures μ about 95% of the time.

μ = 50

Captured so far: 0 / 0 = —%

Bigger samples make the intervals narrower, not more likely to capture μ. Higher confidence makes them wider.

How to construct a confidence interval

  1. Compute the point estimate (x̄ or p̂).
  2. Find the critical value for your confidence level: z* (1.645, 1.960, 2.576 for 90/95/99%) or t* with n − 1 degrees of freedom.
  3. Compute the standard error.
  4. Margin of error = critical value × SE.
  5. Interval = estimate ± margin of error.

Interpreting it correctly

Say: “We are 95% confident the true mean is between A and B.” The 95% describes the method: if you repeated the study many times, about 95% of the intervals would contain the true value. It does not mean there is a 95% chance this particular interval contains it (the true value is fixed; the interval is what varies). The simulation above shows this happening.

Conditions: a random sample, independence (sample under 10% of the population), and a roughly normal sampling distribution: either normal data, n ≥ 30, or for proportions at least 10 successes and 10 failures.

Frequently asked questions

When do I use t instead of z?

For a mean, use t whenever you estimate σ from the sample, which is nearly always. Use z only when the population σ is genuinely known. For proportions, use z.

How can I make the interval narrower?

Increase the sample size (the width shrinks with √n) or accept a lower confidence level. The sample size calculator tells you the n needed for a target margin of error.