What Is a Confidence Interval?
A confidence interval (CI) is a range of plausible values for an unknown population parameter, estimated from sample data. Every study you conduct observes a sample and uses it to estimate something about the broader population — an average blood pressure, a proportion of patients who respond to treatment, an odds ratio for a risk factor. Because samples are imperfect representations of populations, any estimate carries uncertainty. The confidence interval quantifies that uncertainty.
The most common confidence interval in medical research is the 95% CI. If you repeated a study many times using the same method and calculated a 95% CI each time, approximately 95% of those intervals would contain the true population value. This does not mean there is a 95% probability that the true value falls within any single interval — once the interval is calculated, the true value either is or is not inside it. The probability statement refers to the long-run behaviour of the procedure, not to any single result.
This distinction matters because it affects how you communicate results. You should write "the 95% CI was 1.2 to 3.4" rather than "there is a 95% probability that the true value is between 1.2 and 3.4." Both sound similar but only the first correctly captures the frequentist meaning.
Confidence intervals were formally introduced by Jerzy Neyman in 1937, and their adoption in medical journals accelerated in the 1980s as part of a broader movement away from pure significance testing toward effect estimation. Today, virtually all major medical journals — The Lancet, NEJM, JAMA, BMJ — require confidence intervals in clinical papers, and many now prefer them over p values as the primary measure of statistical precision.
The 95% Confidence Interval in Simple Language
Imagine you want to know the average systolic blood pressure of all adults with hypertension in your city — a population you can never fully measure. You recruit a sample of 100 patients and measure their blood pressure. The sample mean is 148 mmHg. But this number is just an estimate; a different random sample of 100 patients from the same population would give a slightly different mean.
The 95% CI tells you: based on this sample, the plausible range for the true population mean runs from 143 to 153 mmHg. You are not 95% certain the true mean is in that range — you are using a method that works 95% of the time.
The 95% level is a convention. You could use 90% (narrower, less stringent) or 99% (wider, more conservative). The choice depends on the field and the consequences of error. In pharmaceutical trials evaluating drug safety, a 99% CI may be used. In exploratory observational research, 90% CIs sometimes appear. The 95% level corresponds to the familiar alpha = 0.05 threshold for significance testing.
The Confidence Interval Formula: Every Component Explained
For a sample mean, the general formula for a 95% confidence interval is:
Understanding the Standard Error
The standard error (SE) is the most important component of any confidence interval. It equals the standard deviation divided by the square root of sample size: SE = SD / √n. The SE represents how much the sample mean would vary across repeated samples from the same population — it is the precision of the estimate, not the spread of the raw data.
Large SE → wide CI → imprecise estimate. Small SE → narrow CI → precise estimate. Two factors reduce SE and therefore narrow the CI: increasing sample size, and reducing variability in the outcome measurement.
Why 1.96?
The number 1.96 comes from the standard normal (Z) distribution. Exactly 95% of the area under the normal curve lies between −1.96 and +1.96 standard deviations from the mean. For smaller samples (n < 30), the t-distribution is used instead of the normal distribution, and the critical value is slightly larger than 1.96, depending on the degrees of freedom. Statistical software handles this automatically, which is why software output occasionally shows slightly different CI boundaries than manual calculation using 1.96.
Confidence Interval, Sample Size, and Precision
The relationship between sample size and CI width is one of the most practically important concepts in research planning. Larger samples produce narrower intervals because they estimate the population parameter more precisely. The mathematical relationship is through the square root: precision improves with √n, not with n itself.
This has direct implications for study planning. A pilot study with n = 30 may produce a CI so wide that it spans both clinically important benefit and harm — making it impossible to draw conclusions. A properly powered study with n = 300 may narrow that interval enough to distinguish between clinically important and trivial effects.
| Sample Size (n) | Standard Error | 95% CI Width (approximate) | Interpretation |
|---|---|---|---|
| 30 | SD / 5.5 | Wide | Pilot study — very uncertain estimate |
| 100 | SD / 10 | Moderate | Typical small clinical study |
| 400 | SD / 20 | Narrow | Well-powered trial |
| 1600 | SD / 40 | Very narrow | Large multicentre study |
Variability also matters. A highly variable outcome — such as pain scores rated 0–100 with wide individual differences — produces a larger SD and therefore a wider CI for a given sample size, compared to a less variable measure like height in a homogeneous population. This is why study design choices that reduce measurement variability (standardised equipment, blinded assessors, tightly defined eligibility criteria) improve precision independently of sample size.
Narrow vs Wide Confidence Intervals: What They Tell You
The width of a confidence interval communicates two distinct things: how precise the estimate is, and what range of true effects is compatible with the data. Understanding both is essential for clinical interpretation.
Narrow Confidence Intervals
A narrow CI means the estimate is precise — the range of values consistent with the data is small. Narrow CIs arise from large samples, low outcome variability, and many events. A narrow CI that excludes the null value (0 for differences, 1 for ratios) is strong evidence for or against an effect. However, a narrow CI can still be clinically unimportant if it is centred on a trivial effect size. An HR of 1.02 with a 95% CI of 1.01 to 1.03 is statistically significant and precise but may be clinically meaningless.
Wide Confidence Intervals
A wide CI means the estimate is imprecise — many different true effect sizes are compatible with the data. Wide CIs arise from small samples, high outcome variability, and rare events. A wide CI that crosses the null value is not a negative result; it is an inconclusive result. The difference matters: a negative result means no effect was found with sufficient precision to rule it out; an inconclusive result means the study lacked the power to tell.
Four Practical Clinical Examples
Mean Difference: Blood Pressure After Antihypertensive Treatment
Randomised controlled trial — continuous outcome
A randomised trial recruited 120 hypertensive patients (60 per arm) to compare a new antihypertensive drug versus placebo over 12 weeks. The primary outcome was change in systolic blood pressure (mmHg).
Results: Drug group mean change = −18.4 mmHg; Placebo group mean change = −6.2 mmHg. Mean difference = −12.2 mmHg (drug superior). Pooled SD = 14.5 mmHg.
SE of difference = 14.5 × √(1/60 + 1/60) = 14.5 × 0.1826 = 2.65. 95% CI = −12.2 ± 1.96 × 2.65 = −17.4 to −7.0 mmHg.
Proportion: 30-Day Readmission Rate After Hip Replacement
Cohort study — binary outcome proportion
A retrospective cohort study followed 350 patients who underwent primary hip replacement at a single hospital over two years. Forty-two patients were readmitted within 30 days (12.0%).
p̂ = 42/350 = 0.120. SE = √[0.120 × (1 − 0.120) / 350] = √(0.1056/350) = √0.000302 = 0.0174. 95% CI = 0.120 ± 1.96 × 0.0174 = 8.6% to 15.4%.
Odds Ratio: Diabetes and Peripheral Neuropathy
Case-control study — ratio measure
A case-control study enrolled 180 cases (patients with confirmed peripheral neuropathy) and 180 controls matched for age and sex. Diabetes was present in 110 cases (61.1%) and 72 controls (40.0%).
OR = (110 × 108) / (70 × 72) = 11,880 / 5,040 = 2.36. SE(ln OR) = √(1/110 + 1/70 + 1/72 + 1/108) = √(0.00909 + 0.01429 + 0.01389 + 0.00926) = √0.04652 = 0.2157. 95% CI for OR = e^(ln 2.36 ± 1.96 × 0.2157) = e^(0.859 ± 0.423) = 1.54 to 3.62.
Relative Risk: Smoking and Surgical Site Infection
Cohort study — relative risk with CI interpretation
A prospective cohort study of 500 patients undergoing abdominal surgery compared surgical site infection (SSI) rates between smokers (n = 180) and non-smokers (n = 320). SSI occurred in 36 smokers (20.0%) and 32 non-smokers (10.0%).
RR = 0.200 / 0.100 = 2.00. SE(ln RR) = √[(1−0.200)/(36) + (1−0.100)/(32)] = √[0.800/36 + 0.900/32] = √[0.02222 + 0.02813] = √0.05035 = 0.2244. 95% CI = e^(0.693 ± 1.96 × 0.2244) = e^(0.693 ± 0.440) = 1.28 to 3.14.
CI for Means: One Sample and Two-Sample Designs
The CI for a mean applies whenever your outcome is a continuous variable — blood glucose, serum creatinine, pain score, body mass index, length of hospital stay. The formula varies slightly by study design.
One-Sample CI for a Mean
Use when you have one group and want to estimate the population mean. Formula: x̅ ± t(α/2, n−1) × (SD / √n). The t-critical value replaces 1.96 for small samples, derived from the t-distribution with n−1 degrees of freedom. For n = 20, the 95% CI uses t = 2.093 instead of 1.96.
Two-Sample CI for a Mean Difference
Use when comparing two independent groups. The SE of the difference uses the pooled or separate variance depending on whether variances are assumed equal (use Levene's test to check). SPSS reports both: the equal-variances-assumed and equal-variances-not-assumed rows — choose based on the Levene's significance.
Paired CI for a Mean Difference
Use when the same patients are measured twice (before and after treatment, or matched pairs). Compute the difference for each pair, then apply the one-sample formula to those differences. This design usually produces narrower CIs because between-patient variability is removed.
CI for Proportions: Choosing the Right Method
For proportions (percentages), three main methods exist. The choice depends on sample size and whether the proportion is near 0% or 100%.
Wald (Normal Approximation) Method
The simplest: p̂ ± 1.96 × √[p̂(1−p̂)/n]. Works well when np̂ ≥ 10 and n(1−p̂) ≥ 10. Problematic for extreme proportions (very high or very low) or small samples because it can produce intervals extending below 0% or above 100%.
Wilson Score Method
The preferred method for most medical research, especially when proportions are near 0 or 1, or when sample sizes are moderate. It is the default in most statistical software including SPSS. The formula adjusts for the asymmetry of small proportions and never produces impossible intervals.
Clopper-Pearson Exact Method
The most conservative method, guaranteed to produce intervals that always contain the true proportion at least 95% of the time. Used for very small samples, regulatory submissions, and when accuracy is paramount. Available in R and SPSS via the Binomial CI option.
CI for Odds Ratio and Relative Risk
Ratio measures require calculation on the log scale because they are always positive and their distribution is right-skewed. The CI is always calculated for ln(OR) or ln(RR) and then exponentiated back.
CI for Odds Ratio
From a 2×2 table with cells a, b, c, d: OR = (a×d)/(b×c). SE of ln(OR) = √(1/a + 1/b + 1/c + 1/d). 95% CI = e^[ln(OR) ± 1.96 × SE]. In logistic regression output, SPSS directly provides the 95% CI for Exp(B), which is the OR — no manual calculation required.
CI for Relative Risk
RR = [a/(a+b)] / [c/(c+d)]. SE of ln(RR) = √[b/(a×(a+b)) + d/(c×(c+d))]. 95% CI = e^[ln(RR) ± 1.96 × SE]. Note: relative risk can only be directly calculated from cohort studies and randomised trials. For case-control studies, use the odds ratio, which approximates RR when the outcome is rare.
Interpreting Ratio CIs: The Null Value is 1
For all ratio measures (OR, RR, HR, rate ratio, prevalence ratio), the null value is 1.0 — meaning no difference between groups. If the 95% CI:
- Entirely > 1.0: the exposure increases the outcome risk — statistically significant
- Entirely < 1.0: the exposure decreases the outcome risk — statistically significant
- Includes 1.0: the association is not statistically significant at alpha 0.05
The width of the interval still matters even when significance is achieved. A 95% CI of 1.01 to 28.5 for an OR is technically significant but extremely wide and clinically uninformative. An OR of 2.4 (95% CI 1.9 to 3.1) is both significant and precise.
How Confidence Intervals Are Reported in Journal Articles
Understanding how CIs appear in published papers allows you to extract and critically appraise results efficiently. Common reporting formats you will encounter:
Inline parenthetical format
"The mean haemoglobin at 12 weeks was 11.8 g/dL (95% CI 11.2–12.4) in the treatment group versus 10.9 g/dL (95% CI 10.3–11.5) in the control group." This is the most common format in clinical journals.
Table format with CI columns
Most papers with multiple outcomes present CIs in results tables. Columns are typically: Variable, n, Estimate, 95% CI, p value. Read the lower and upper limits as the complete interval, not just the point estimate.
Forest plot (systematic reviews and meta-analyses)
Forest plots display study-level CIs as horizontal lines with squares (point estimates) and a diamond (pooled estimate). Wider lines = wider CIs = less precise studies. Lines crossing the vertical null line = non-significant individual studies. Focus on the pooled diamond and whether it crosses the line.
Regression table format
In multivariable analyses, CIs appear alongside adjusted odds ratios, hazard ratios, or regression coefficients. Always report both the crude and adjusted estimates with their respective CIs in observational research.
Reading a CI from a Published Paper: A Step-by-Step Approach
- Identify the effect measure. Is it a mean difference, proportion, OR, RR, or HR? This determines the null value (0 for differences, 1 for ratios).
- Find the point estimate. This is your best single guess for the true population value.
- Check the CI limits. Read both the lower and upper bound. Do not focus only on the point estimate.
- Check the null value. Does the interval cross the null? If not, the result is statistically significant.
- Assess clinical importance. Is the lower bound alone clinically meaningful? Is the upper bound dangerously large? Would the effect at either extreme of the CI change clinical practice?
- Assess width. Is the interval narrow enough to be informative? Or too wide to distinguish benefit from harm?
6 Common Mistakes Researchers Make with Confidence Intervals
Mistake 1: Reporting only the p value and ignoring the CI
A p value tells you whether to reject the null hypothesis at a fixed alpha threshold. It says nothing about effect size or precision. A drug that reduces mortality from 30% to 29.9% with a massive sample produces p < 0.05 but a clinically trivial effect. Without the CI, readers cannot judge clinical importance.
Mistake 2: Interpreting a wide CI that crosses 1 as a "negative result"
A CI of 0.40 to 4.80 for an OR does not mean no association exists. It means the study was too small to tell. The true effect could be anywhere in that range, including strongly protective or strongly harmful. This is an inconclusive result, not a negative one.
Mistake 3: Treating the CI as a probability statement about the parameter
Writing "there is a 95% probability that the true OR lies between 1.4 and 3.2" is technically incorrect in frequentist statistics. The true OR is a fixed unknown number — it is either in that interval or it is not. The 95% refers to the long-run behaviour of the procedure.
Mistake 4: Comparing CIs between subgroups without a formal interaction test
If the CI for men excludes 1 (e.g., OR 2.1, 95% CI 1.3–3.4) but the CI for women includes 1 (OR 1.6, 95% CI 0.8–3.3), this does NOT prove the effect differs by sex. The CIs may overlap when formally tested. Subgroup comparisons require a formal interaction test (Cochran's Q or likelihood-ratio test), not a visual comparison of CIs.
Mistake 5: Confusing standard error (SE) with standard deviation (SD)
The SD describes variability in individual measurements. The SE describes variability in the estimate (usually the mean) across samples. Reporting SE instead of SD for descriptive statistics makes study populations look less variable than they are. Some papers use SD in descriptives but SE to construct CIs, which is correct; using SE in both places understates biological variability.
Mistake 6: Ignoring the clinical minimum important difference when interpreting CIs
Statistical significance and clinical importance are separate questions. A CI for mean pain reduction of 0.4 to 0.8 points on a 10-point scale is statistically significant (excludes 0) but almost certainly clinically meaningless if the minimum important difference for that scale is 1.5 points. The CI must be interpreted against a pre-specified or clinically established threshold.
Frequently Asked Questions
Calculate confidence intervals instantly
Use StatClinic's free CI calculator for means and proportions, with plain-English medical interpretation for clinical and thesis reports.
Open Confidence Interval Calculator →