Confidence Interval Calculator
A confidence interval calculator returns the range of plausible values for a population parameter from sample statistics. This calculator supports four cases (one-sample mean using z or t, one-sample proportion using Wilson or normal, difference in means, difference in proportions) and outputs a paste-ready APA or Vancouver sentence with the method footnote.
Every calculation runs in your browser. The live counter above shows the calculator has made zero network requests since page load.
What is a confidence interval calculator?
A confidence interval calculator turns sample statistics into the range of values within which the population parameter most plausibly sits. It tells you how precisely your point estimate has pinned down the true effect, which is what reviewers and meta-analysts actually want from your numbers. In 2019 the New England Journal of Medicine told authors to report effect estimates with 95% confidence intervals rather than p-values alone. Most major journals followed. This calculator handles the four cases that come up in real manuscripts: a single mean, a single proportion, the difference between two means, and the difference between two proportions.
How to use this calculator
Pick a mode at the top: Mean, Proportion, Mean difference, or Proportion difference. The form below the tabs adjusts to the inputs that mode needs.
For a mean, you enter the sample mean, sample standard deviation, and sample size. For a proportion, you enter the count of successes and the total. For a mean difference, you enter both groups’ summary statistics. For a proportion difference, you enter both counts and totals. Pick a confidence level (90, 95, or 99 percent), and the output panel shows the lower bound, upper bound, the method the calculator chose, and a manuscript-ready sentence in your choice of APA-7 or Vancouver/ICMJE style.
The horizontal bar visualisation underneath plots the point estimate as a vertical tick inside a shaded CI band. For Wilson intervals on proportions the band is asymmetric, which is the right shape: the sampling distribution itself is asymmetric, and a symmetric textbook formula would hide that.
What a confidence interval actually means (and what it does not)
A 95% confidence interval is constructed so that, across hypothetical repeated samples, 95 percent of intervals computed this way would contain the true parameter. That is the textbook definition and it is technically about the procedure, not the interval you just computed.
The interpretation reviewers tolerate, and that the Cochrane Handbook endorses as a “loose but useful rough guide”, is “a range within which we can be 95 percent confident the true value lies, based on this study.” Use that phrasing in plain-English summaries; use the procedural phrasing in methods sections if your statistical reviewer is precise about it.
What a CI is not: it is not the range that contains 95 percent of the data. It is not a probability that the true value is in this specific interval (under frequentist construction). And it is not a substitute for thinking about clinical or substantive significance, because a narrow CI excluding the null can still bracket effects too small to matter.
Which method does this calculator use?
Different shapes of data require different CI methods, and silently picking one is how textbook calculators get researchers into trouble. This tool surfaces the method on every output.
Means. The default is the t-distribution with n − 1 degrees of freedom, because researchers almost never know the population standard deviation σ. Toggle “σ known” to switch to the z-distribution; do that only when you genuinely have σ from an external source (a national survey calibration constant, for example), not when you have a large sample.
Proportions. The calculator auto-picks between two methods. The normal approximation (Wald interval) is fast and symmetric and matches the formula in most introductory textbooks. It misbehaves when n·p̂ or n·(1 − p̂) is below 5, where the sampling distribution stops being approximately normal. In that regime the calculator switches to the Wilson score interval, which stays accurate down to small samples and matches binom::binom.confint(..., methods = "wilson") in R.
Difference in means. The default is Welch’s t-test, which does not assume equal variances. It is more robust than the pooled-variance t-test and matches R’s default t.test() behaviour. Degrees of freedom use the Welch–Satterthwaite approximation. If you are confident the two groups have equal variances and want the slightly tighter pooled interval, that is an option in the form.
Difference in proportions. Normal approximation with continuity correction, matching prop.test(..., correct = TRUE) in R. For very small samples a Newcombe interval would be more accurate; treat this calculator’s output as a reasonable default and prefer the Forest Plot Generator for meta-analytic pooling.
How to report a confidence interval in your manuscript
Reviewer-acceptable formats vary by journal style. The calculator’s output panel toggles between two:
- APA 7th edition:
M = 4.20, 95% CI [3.80, 4.60] - Vancouver / ICMJE:
4.20 (95% CI 3.80 to 4.60)
For ratio measures use the sibling Odds Ratio Calculator. Those need a log transform before CI construction, and the formatting convention is different.
A methods-section sentence template:
“Means are reported with 95% confidence intervals computed from the t-distribution with n − 1 degrees of freedom. Proportions use the Wilson score interval when n·p̂ < 5 and the normal approximation otherwise.”
Fynman extracts every reported CI from every included paper in your literature review automatically, which makes the methods-section audit step (do all included studies report CIs? in compatible formats?) take minutes instead of hours. The screening side of that workflow is covered in our literature review strategies guide.
When the confidence interval matters more than the p-value
Three patterns the CI shows immediately and the p-value hides:
Width. A 95% CI of [3.80, 4.60] for a mean is more useful than the same point estimate with a CI of [1.20, 7.20]. Width tells you whether the study had enough information to settle the question, and reviewers will downgrade a barely-significant result if the CI is wide.
Null exclusion. When the CI excludes the null value (zero for a difference; one for a ratio), the result is statistically significant at the corresponding alpha. Cochrane Handbook 12.4.1 puts it cleanly: “the 95% confidence interval will exclude the null value if and only if the test of significance yields a P value of less than 0.05.” The CI gives you the same information plus the magnitude and precision.
Statistically significant but clinically irrelevant. An odds ratio CI of [1.001, 1.05] is statistically significant and clinically meaningless. The p-value alone hides this; the CI exposes it. Pair the CI from this calculator with effect-size context from the Effect Size Calculator for the magnitude question. The research methodology guide covers the broader interpretation framework.
Worked examples
A two-arm trial, continuous outcome. Blood pressure drop in an intervention arm (n = 120, mean = 12.4 mmHg, SD = 6.1) versus control (n = 120, mean = 8.9 mmHg, SD = 5.8). Mean difference mode, Welch’s t. The 95% CI for the difference is approximately [1.97, 5.03] mmHg, manuscript sentence: M_diff = 3.50 mmHg, 95% CI [1.97, 5.03]. The interval excludes zero, so the difference is significant; the width tells you the precision.
A survey proportion. A small-sample pilot survey: 3 of 20 respondents reported the outcome. With n·p̂ = 3, the calculator selects Wilson. The 95% CI is approximately [0.052, 0.360], strongly asymmetric. The normal-approximation formula would have given [−0.006, 0.306], which is asymmetric in the wrong direction and includes negative values (nonsensical for a proportion). The method-choice rule earns its keep here. Fynman flags this exact “negative lower bound on a proportion” anti-pattern when extracting reported CIs from included studies.
A vaccine efficacy mini-example. Group A: 45 of 100 events; Group B: 30 of 100 events. Proportion difference mode. The 95% CI for p_A − p_B is approximately [0.018, 0.282]. Manuscript sentence: risk difference = 0.150, 95% CI [0.018, 0.282]. The CI is positive and excludes zero, but the lower bound near 0.02 means the true effect could be much smaller than the point estimate.
Frequently asked questions
Frequently Asked Questions
Find answers to common questions about this topic.
Should I report a confidence interval or a p-value?
Why does the proportion calculator sometimes use Wilson and sometimes normal approximation?
Can I use this for odds ratios or risk ratios?
Does it match R's t.test() and prop.test() output?
t.test() (df = n − 1 for one sample; Welch–Satterthwaite df for two-sample). Proportions match prop.test(..., correct = FALSE) for the normal approximation and the Wilson method in binom::binom.confint(..., methods = 'wilson'). Validated to four decimals on a 50-input test set during development.