Confidence Interval
A confidence interval is a range for the true value you're trying to estimate — your best guess, plus or minus a margin. The catch is what "95% confident" does and doesn't mean: it describes the procedure, not the single interval in front of you.
What it is
A sample gives you a single number — a sample mean, a difference between two groups, a regression slope. That number is your best estimate of an unknown population parameter, but it's almost certainly a little off, because a different sample would have given a slightly different value. A confidence interval wraps that point estimate in a range wide enough to express how much it could plausibly be off by.
So instead of reporting "the mean is 50," you report "the mean is 50, with a 95% confidence interval of 47 to 53." The width is the honest part: it says the data pin the true value down to roughly a six-unit window, no tighter.
The formula
Every confidence interval has the same shape — a point estimate, plus or minus a margin built from a critical value and a standard error:
interval = estimate ± (critical value) × (standard error)
For the mean of a single sample, the estimate is the sample mean x̄, the standard error is s/√n, and the critical value is the Student-t multiplier t*:
x̄ ± t* · ( s / √n )
Here t* is the Student-t critical value for your chosen confidence level and n − 1 degrees of freedom; s is the sample standard deviation and n the count. The 95% level is the common default. Two levers set the width: the interval shrinks as n grows (more data, more precision) and as s falls (less spread, more precision).
How to read it
| What you see | What it means |
|---|---|
| A wider interval | More uncertainty — the data pin the value down loosely |
| A narrower interval | More precision, usually from a larger sample or tighter data |
| A CI for a difference that excludes 0 | Consistent with significance at the matching level |
| A CI for a difference that includes 0 | Zero remains plausible — the difference may be nothing |
The crucial subtlety is what the percentage attaches to. A 95% confidence interval means: if you repeated the whole sampling-and-computing procedure many times, about 95% of the intervals it produces would contain the true parameter. It is not a 95% probability that this interval contains it. The true value is a fixed (unknown) number, and your one interval either covers it or doesn't — the 95% is a property of the method, not of the single result.
What a confidence interval is not
- Not a probability about this interval. "95%" describes the long-run hit rate of the procedure, not the chance that your one interval is right.
- Not the range of the data. It's a range for a parameter (like a mean), and it's far narrower than the spread of individual values.
- Not a guarantee. If the test's assumptions fail — biased sampling, the wrong distribution — the stated coverage no longer holds.
- Not a yes/no verdict. Whether it excludes a value is informative, but the width carries just as much of the story.
See also
- Related terms
- P-Value · Effect Size · Standard Deviation
- Try it free
- Sample-size calculator — see how n drives the width of an interval
- On the blog
- How to run a t-test
- In the app
- Run a two-sample comparison and read the interval for the difference
A point estimate tells you what the data say; a confidence interval tells you how far to trust it. Pair it with a p-value and an effect size and you've reported not just whether there's an effect, but how big it is and how precisely you've measured it.