Guides / confidence interval
Confidence intervals: a complete guide
A confidence interval tells you what your data can and cannot rule out — which is almost always more useful than a p-value. This guide explains what the interval genuinely means (and the interpretation that costs marks), calculates one by hand for a mean and for a proportion, shows how sample size drives precision, and sets out how to report intervals in APA style.
A confidence interval is a range of plausible values for an unknown population parameter, calculated from sample data. A 95% confidence interval is constructed by a procedure that captures the true population value in 95% of repeated samples. It expresses the precision of an estimate: a narrow interval means the data pin the value down closely, a wide interval means they do not.
Definition
What a confidence interval is
A confidence interval is a range of plausible values for something you cannot observe directly. You measured a sample; you want to say something about the population. The sample mean is your best single guess, but it is certainly a little wrong. The interval quantifies how wrong it might plausibly be.
Reporting a mean of 24.8 says nothing about precision. Reporting 24.8, 95% CI [22.1, 27.5] says the data are consistent with a population mean anywhere from about 22 to about 27.5 — and are not consistent with 30. That second sentence is a finding. The first is a number.
A 95% CI of [22.1, 27.5] does not mean 95% of your participants scored between 22.1 and 27.5. That would be a reference range, and it is far wider. The confidence interval describes how precisely you have located the average.
Why examiners care about it
A p-value answers one narrow question: could this result have arisen by chance if the null were true? A confidence interval answers the question you actually had — how big is the effect, and how sure are we? Journals in medicine, psychology and education increasingly require intervals precisely because a p-value alone hides the difference between a precisely estimated null result and a study that was simply too small to tell.
Interpretation
What 95% confidence actually means
This is the part that is most often stated incorrectly, including in published work. The confidence is a property of the procedure, not of any single interval you happen to have calculated.
Imagine repeating your study 100 times, each time drawing a fresh sample and computing a 95% interval. About 95 of those intervals would contain the true population value and about 5 would not. Your study produced one of them. You cannot tell which.
Correct interpretations
- “We are 95% confident the population mean lies between 22.1 and 27.5”
- “Values outside this range are relatively implausible given our data”
- “The procedure used captures the true value 95% of the time”
- “Our data cannot rule out an effect as small as 22.1 or as large as 27.5”
Incorrect interpretations
- “There is a 95% probability the true mean is in this interval” — the true mean is fixed, not random
- “95% of participants scored in this range” — that is a reference range
- “95% of future sample means will land in this interval” — that is a prediction interval
- “The interval excludes zero, so the effect is important” — significance is not importance
Once you have calculated a specific interval, the true value either is or is not inside it — there is no probability left. This is why careful writing says “we are 95% confident” rather than “there is a 95% probability”. Examiners in statistics-literate departments do check this sentence.
Calculation
The formula, and where each piece comes from
Almost every confidence interval has the same three-part shape: an estimate, plus and minus a critical value multiplied by a standard error.
CI = estimate ± (critical value × standard error)
| Piece | What it is | Where it comes from |
|---|---|---|
| Estimate | Your best single guess | The sample mean, proportion, difference or coefficient |
| Critical value | How many standard errors wide to go | The t or z distribution, set by your confidence level |
| Standard error | How much the estimate bounces between samples | The sample SD divided by √n |
Choosing the critical value
| Confidence level | z (large samples) | Interpretation |
|---|---|---|
| 90% | 1.645 | Narrower, but wrong 1 time in 10 |
| 95% | 1.96 | The convention in most fields |
| 99% | 2.576 | Wider, but wrong only 1 time in 100 |
There is a genuine trade-off here and it is not free. A 99% interval is more likely to contain the true value, but it is wider — so it rules out less. Raising your confidence level buys certainty with precision. Use 95% unless your field or your registered protocol says otherwise.
Use t when you estimated the standard deviation from your sample, which is nearly always. Use z only when the population SD is genuinely known. With n above about 100 the two are close enough not to matter; below n = 30 the difference is substantial, and using z will make your interval too narrow.
Send the summary statistics you already have. A named statistician confirms the right interval, computes it, and writes the reporting sentence you can paste into your results chapter.
Get a fixed quoteWorked example
Worked example: a confidence interval for a mean
A study measures wellbeing scores in 50 participants. The sample mean is 24.8 and the sample standard deviation is 9.6. We want a 95% confidence interval for the population mean.
Step 1 — the standard error
SE = s / √n = 9.6 / √50 = 9.6 / 7.071 = 1.358
The standard error is the standard deviation of the sample mean across hypothetical repeated samples. It is much smaller than the SD of the raw scores, because averaging cancels out individual variation.
Step 2 — the critical value
We estimated the SD from the sample, so we use t with df = n − 1 = 49. For a 95% interval, t = 2.010.
Step 3 — the margin of error
margin = t × SE = 2.010 × 1.358 = 2.73
Step 4 — the interval
CI = 24.8 ± 2.73 = [22.07, 27.53]
| Quantity | Value |
|---|---|
| Sample mean | 24.8 |
| Sample SD | 9.6 |
| n | 50 |
| Standard error | 1.358 |
| t (df = 49) | 2.010 |
| Margin of error | 2.73 |
| 95% CI | [22.07, 27.53] |
“Mean wellbeing was 24.8 (SD = 9.6, 95% CI [22.07, 27.53]).” If a benchmark value of 30 had been proposed, this interval excludes it, so the data are inconsistent with that benchmark.
Worked example
Worked example: a confidence interval for a proportion
Proportions need different arithmetic because the standard error depends on the proportion itself. Suppose 38 of 120 respondents agreed with a statement, so p̂ = 38/120 = 0.317.
The standard approach (Wald)
SE = √(p̂(1 − p̂) / n) = √(0.317 × 0.683 / 120) = √0.001804 = 0.0425
CI = 0.317 ± 1.96 × 0.0425 = [0.234, 0.400] — that is 23.4% to 40.0%.
When the proportion is near 0 or 1, or the sample is small, the Wald interval can extend below 0 or above 1 — impossible values. It also under-covers: a nominal 95% Wald interval often captures the truth barely 90% of the time. Use the Wilson score interval instead, which is what our calculator computes.
When to use Wilson instead
Our confidence interval calculator handles means and proportions, uses the Wilson score method for proportions, and gives you the interval with the reporting sentence already formatted.
Use the calculatorPrecision
What makes an interval narrow or wide
Three things, and only one of them is usually under your control.
| Factor | Effect on width | Under your control? |
|---|---|---|
| Sample size (n) | Larger n → narrower, by √n | Yes — at the design stage |
| Variability (SD) | More spread → wider | Partly — better measurement reduces it |
| Confidence level | Higher confidence → wider | Yes, but 95% is conventional |
The square-root relationship is the one that surprises people. Halving the width of your interval requires quadrupling the sample, not doubling it. This is why post-hoc requests to “just collect a few more” rarely rescue an imprecise study, and why the sample size should be settled before data collection begins.
If your interval runs from −2 to +14, say so. It means the study cannot distinguish a small harm from a large benefit — which is genuinely useful information for whoever designs the next one. Reporting it as “no significant difference” hides that entirely.
Inference
Why an interval beats a p-value
Both come from the same arithmetic, so they never contradict each other: if a 95% interval excludes the null value, the two-tailed p is below .05. But they carry very different amounts of information.
| Result | p-value says | 95% CI says |
|---|---|---|
| Small effect, big sample | p = .01 — significant | [0.4, 1.8] — precisely estimated, and small |
| Large effect, small sample | p = .09 — not significant | [−0.9, 12.4] — could be large, cannot tell |
| No effect, big sample | p = .62 — not significant | [−0.3, 0.5] — genuinely near zero |
| No effect, small sample | p = .61 — not significant | [−8.2, 13.9] — uninformative |
Rows two and four both produce a non-significant p-value, and reporting them the same way — “no significant difference” — is actively misleading. The interval separates them immediately: one study found a possibly large effect it could not pin down, the other found nothing much. Only the interval tells you which.
“The authors interpret a non-significant result as evidence of no effect.” Absence of evidence is not evidence of absence, and the confidence interval is how you tell the difference. If the interval is wide, the honest conclusion is that the study was underpowered.
Comparison
Intervals for differences, and why they matter more
Most research questions are about a comparison, not a single group. “Is the intervention better than the control?” is a question about a difference, and the interval you should report is the interval for that difference — not one interval per group.
Worked example: the difference between two means
An intervention group (n = 40) scores 28.4 (SD = 8.9). A control group (n = 38) scores 24.2 (SD = 9.4). The observed difference is 4.2 points.
First the pooled standard deviation, weighting each group by its degrees of freedom:
sₓ = √[((39 × 8.9²) + (37 × 9.4²)) / 76] = √[(3089.2 + 3269.3) / 76] = √83.7 = 9.15
Then the standard error of the difference:
SE = sₓ × √(1/n₁ + 1/n₂) = 9.15 × √(1/40 + 1/38) = 9.15 × 0.2265 = 2.073
With df = 76, t = 1.992, so the margin is 1.992 × 2.073 = 4.13:
95% CI for the difference = 4.2 ± 4.13 = [0.07, 8.33]
It just barely excludes zero, so p is just below .05. But the honest interpretation is that the data are consistent with a difference anywhere from 0.07 points — effectively nothing — to 8.33 points, which would be substantial. Reporting this as “the intervention was effective” overstates it considerably. The study establishes a direction, not a magnitude.
Why two separate intervals mislead
Had you instead reported a 95% interval for each group — [25.6, 31.2] and [21.1, 27.3] — you would have seen them overlap and might have concluded there was no difference. That conclusion would be wrong. Overlap between separate intervals is not a significance test, and the arithmetic above shows exactly why: the standard error of a difference is not the sum of the two individual standard errors.
| What you want to claim | Interval to report |
|---|---|
| The mean of one group | CI for that mean |
| One group differs from another | CI for the difference |
| The size of an effect | CI for the effect size (d, g, OR, r) |
| A change from baseline | CI for the paired difference |
Intervals around effect sizes
An effect size without an interval is as incomplete as a mean without one. Cohen's d of 0.62 sounds like a medium effect; d = 0.62, 95% CI [0.19, 1.05] tells you the data are consistent with anything from a small to a large effect. That interval is what stops a single study being over-read, and it is what meta-analyses eventually pool.
Every number you interpret substantively should carry an interval. If you would draw a conclusion from it, you need to know how precisely you measured it.
Pitfalls
Six mistakes that cost marks
1. Saying there is a 95% probability the mean is in the interval
The population mean is a fixed number. Once the interval is calculated, it either contains it or does not. Write “we are 95% confident”.
2. Treating overlap between two intervals as a significance test
Two 95% intervals can overlap while the difference between the groups is still significant. If you want to test a difference, compute an interval for the difference, not two separate intervals and a visual comparison.
3. Using z when you estimated the SD
With n = 20, using 1.96 instead of t = 2.093 makes the interval about 7% too narrow. Use t unless the population SD is genuinely known.
4. Reporting the interval but interpreting only the p-value
Putting the CI in the table and then writing “the difference was significant” wastes it. Interpret the range: what does the lower bound mean in practice? What does the upper bound rule out?
5. Using Wald intervals for small or extreme proportions
It produces impossible bounds and under-covers. Use Wilson.
6. Computing intervals on skewed data without checking
The formula assumes the sampling distribution of the mean is roughly normal. With n above about 30 the central limit theorem usually handles this, but with small samples and severe skew, bootstrap the interval instead.
Reporting
Reporting intervals in APA style
APA 7 requires square brackets, a comma between bounds, and the confidence level stated on first use.
| Context | How to write it |
|---|---|
| A mean | M = 24.8, SD = 9.6, 95% CI [22.07, 27.53] |
| A difference | The groups differed by 4.2 points, 95% CI [1.1, 7.3] |
| A proportion | 31.7% agreed, 95% CI [23.4%, 40.0%] |
| An effect size | d = 0.62, 95% CI [0.19, 1.05] |
| An odds ratio | OR = 2.14, 95% CI [1.32, 3.47] |
“Wellbeing was 4.2 points higher in the intervention group, 95% CI [1.1, 7.3]. The interval excludes zero, and its lower bound of 1.1 points remains above the 1-point threshold previously proposed as clinically meaningful, so the data are consistent with a benefit of at least minimal practical importance.” That paragraph interprets the bounds rather than restating them.
Send your results chapter. A named statistician verifies every interval, checks the interpretation against what the numbers support, and flags anything an examiner would query.
See results chapter reviewAnswers
Frequently asked questions
What does a 95% confidence interval actually mean?
It means the procedure used to build the interval captures the true population value in 95% of repeated samples. It does not mean there is a 95% probability that this particular interval contains the true value — once calculated, the interval either contains it or it does not.
Is a confidence interval better than a p-value?
For most purposes, yes. Both come from the same arithmetic, but the interval also tells you the size and precision of the effect. Critically, it distinguishes a precisely estimated null result from a study that was simply too small to detect anything — two situations a p-value reports identically.
Why is my confidence interval so wide?
Almost always small sample size, high variability, or both. Width shrinks with the square root of n, so quadrupling the sample halves the interval. A wide interval is a legitimate finding: report it and say the study could not distinguish between the values it spans.
Should I use t or z for my confidence interval?
Use t whenever you estimated the standard deviation from your sample, which is nearly always the case. Use z only if the population standard deviation is genuinely known. Above about n = 100 the difference is negligible; below n = 30 it matters a great deal.
Can two confidence intervals overlap and still be significantly different?
Yes. Overlapping 95% intervals do not imply a non-significant difference — the groups can still differ at p < .05. If you want to test the difference, compute a confidence interval for the difference itself rather than comparing two separate intervals by eye.
What is the difference between a confidence interval and a prediction interval?
A confidence interval estimates where the population mean lies. A prediction interval estimates where a single future observation will fall, and is always much wider because it carries individual variability as well as uncertainty about the mean.
How do I calculate a confidence interval for a percentage?
Use the Wilson score interval rather than the standard Wald formula, especially with small samples or percentages near 0 or 100. The Wald interval can produce impossible bounds below 0% or above 100% and tends to be too narrow.
Keep reading
Related guides and services
Send the data. Get a fixed quote.
Attach your dataset or just describe the project. A named statistician replies with a price and a deadline, usually within one working day.