graphingcalculator.org

Confidence Interval Calculator

Free confidence interval calculator for a mean (using z or t automatically) or a proportion, with the standard error, critical value, and every step of the calculation shown.

No raw data to compute a standard deviation from? Try the standard deviation calculator.
4045505560Value44.671455.3286

The 95% confidence interval is (44.6714, 55.3286)

Confidence interval, step by step

Point estimate = 50.

Standard error = 2.5.

Critical value (t (df = 15)) = 2.1314.

Margin of error = 2.1314 × 2.5 = 5.3286.

Interval = 50 ± 5.3286 = (44.6714, 55.3286).

What a confidence interval means

A confidence interval is a range of values, built from your sample, that is likely to contain the true population value — a mean or a proportion — along with a stated confidence level such as 95%. It has two parts: a point estimate (your sample's own mean or proportion) and a margin of error that widens or narrows the range around it. "95% confident" does not mean there is a 95% chance the true value falls in this one specific interval — it describes the method: if you repeated the sampling process many times and built an interval the same way each time, about 95% of those intervals would contain the true value. This calculator builds the interval for a mean or a proportion from your sample's numbers and shows every step.

z or t — which one?

The critical value that sets the width of a mean's confidence interval comes from one of two distributions, and the choice isn't a preference — it's decided by what you actually know. If you know the population's true standard deviation (rare in practice), the interval uses the normal distribution's z critical value. If you only know your sample's standard deviation — the common case — the interval uses the t-distribution instead, with degrees of freedom equal to your sample size minus one. The t-distribution is wider than the normal distribution, especially at small sample sizes, which correctly reflects the extra uncertainty of estimating the spread from the same sample you're using for the mean; as the sample size grows past a few hundred, t and z converge and the difference becomes negligible. This calculator picks automatically based on which standard deviation you say you have. A proportion's confidence interval always uses z — that's the standard convention for the interval this tool builds (the Wald interval).

Worked example

Say a sample of 16 items has a mean of 50 and a sample standard deviation of 10, and you want a 95% confidence interval. Because it's the sample's own standard deviation (not the population's), this uses the t-distribution with df = 16 − 1 = 15, whose 95% critical value is t ≈ 2.1314. The standard error is 10 / √16 = 2.5, so the margin of error is 2.1314 × 2.5 ≈ 5.329, giving a 95% confidence interval of about (44.67, 55.33). For a proportion: say 340 of 500 survey respondents said yes (p̂ = 0.68) and you want 95% confidence. The standard error is √(0.68 × 0.32 / 500) ≈ 0.0209, the z critical value is 1.96, and the margin of error is about 0.0409 — a 95% confidence interval of about (0.639, 0.721), or 63.9% to 72.1%.

When to be cautious

This calculator's proportion interval is the standard Wald interval taught in most intro statistics courses — simple, and the one "confidence interval calculator" searches expect. It relies on the normal distribution approximating the true binomial sampling distribution, which works well when there are enough successes and failures in the sample; the usual guideline is at least 5 of each. When your sample falls short of that (a small sample, or a proportion very close to 0% or 100%), this calculator still computes the interval but flags it — treat a flagged interval as a rough approximation rather than a precise bound. A wide interval on either a mean or a proportion is not a flaw in the math; it is an honest signal that your sample doesn't pin the true value down very tightly, and the fix is a larger sample, not a different formula.

How to use it

  1. Choose whether you're estimating a mean (an average) or a proportion (a percentage).
  2. Set your confidence level (95% is standard).
  3. For a mean, enter your sample mean, sample size, and standard deviation — and say whether that standard deviation is the population's (rare) or your sample's (the common case).
  4. For a proportion, enter the number of successes and the sample size.
  5. Read the interval and the step-by-step working, and download the chart or a CSV report of the calculation.

FAQ

What does "95% confidence" actually mean?
It describes the method, not this one interval: if you drew many samples and built an interval the same way each time, about 95% of those intervals would contain the true population value. It is not a 95% probability that the true value falls in this specific interval — the true value either is or isn't in it; the 95% describes how often the method succeeds over repeated sampling.
When do I use t instead of z?
Use t whenever you only know your sample's standard deviation, not the population's — which is almost always. The t-distribution has degrees of freedom equal to your sample size minus one and is a bit wider than the normal distribution at small samples, which correctly accounts for the extra uncertainty of estimating spread and center from the same data. This calculator picks t or z automatically based on which standard deviation you say you have.
What's the difference between a confidence interval and margin of error?
The margin of error is the "plus or minus" — the half-width of the interval around your point estimate. The confidence interval is the full range: point estimate minus the margin of error to point estimate plus the margin of error. A smaller margin of error means a narrower, more precise interval, and it shrinks as your sample size grows.
Why is my interval so wide?
A wide interval usually means a small sample size, a high confidence level (99% is wider than 95%), or — for a mean — a lot of natural variability in the data. It is not a sign of a calculation error; it is an honest reflection of how much (or little) your sample actually pins down the true value. Increasing the sample size is the most direct way to narrow it.