Opens in a new tab

CALCULATOR · REPORTING

Confidence Interval Calculator for a Mean, a Proportion and a Difference

Enter the summary statistics you already have and choose a 90, 95 or 99% level. The interval, a plain reading of it and the method behind it update as you type. Nothing you enter leaves your browser.

Runs in your browser. No data is sent or stored.

Method reviewed by an in-house statistician · Last checked November 2026

In Short

A confidence interval calculator turns summary statistics into a range of values compatible with the data at a stated confidence level. This one covers four cases on four tabs: a mean (t interval), a proportion (Wilson interval), a difference in means (Welch interval, no equal-variance assumption) and a difference in proportions (Newcombe interval). The interval is not a 95% probability that the parameter lies inside it. It describes how the method behaves over repeated samples, and its width shows how precisely the study estimated the quantity.

How It Is Calculated

For a mean, the interval uses the t distribution with n − 1 degrees of freedom:

FORMULA

CI = x̄ ± t(1 − α/2, n − 1) · s / √n

x̄ = sample mean · s = sample SD · n = sample size · t(q, df) = the q quantile of Student’s t with df degrees of freedom.

For a proportion x/n, the Wilson score interval is used, never the Wald interval (Newcombe, 1998a):

FORMULA

center = (p + z²/2n) / (1 + z²/n) half-width = z · √( p(1 − p)/n + z²/4n² ) / (1 + z²/n)

p = x/n · z = the standard normal quantile for the chosen level.

For a difference in means the Welch interval is the default, so the two SDs need not be equal (Welch, 1947):

FORMULA

SE = √( s1²/n1 + s2²/n2 ) df = SE⁴ / [ (s1²/n1)² / (n1 − 1) + (s2²/n2)² / (n2 − 1) ] CI = (m1 − m2) ± t(1 − α/2, df) · SE

For a difference in proportions the Newcombe hybrid score method (method 10) combines the Wilson limits (l1, u1) and (l2, u2) of each proportion (Newcombe, 1998b):

FORMULA

lower = (p1 − p2) − √( (p1 − l1)² + (u2 − p2)² ) upper = (p1 − p2) + √( (u1 − p1)² + (p2 − l2)² )

The level is selectable at 90, 95 or 99%. A zero SD, fewer than two observations for a mean, or a count above its total returns a message, not an interval.

Assumptions and When Not to Use It

  • Independent observations. Each participant contributes once to each sample. Paired data, repeated measures and clusters need a method that accounts for that structure; see Which Statistical Test Should I Use? A Research Decision Guide.
  • A mean that summarizes the data. The t interval is for a mean of a continuous outcome. With a small sample and a strongly skewed outcome, the interval for the mean may not describe the data well.
  • Two separate groups for the difference tabs. The difference in means and the difference in proportions compare two independent groups.
  • A single level chosen in advance. The 90, 95 and 99% levels are a reporting convention. Choose the level the protocol specifies, and do not switch after seeing the result.
  • The interval is not a probability for the parameter. It is a range of values compatible with the data at the stated level.
  • Valid inputs. Proportions need a count no larger than the total, means need n of at least 2, and SDs must be above zero.

Worked Example (Hypothetical Values)

A sample of 30 participants has a mean score of 50 and an SD of 12. The 95% confidence interval for the mean uses the t quantile with 29 degrees of freedom.

Input or result Value
Mean, x̄ 50
SD, s 12
Sample size, n 30
Confidence level 95%
t quantile 2.0452
95% confidence interval 45.52 to 54.48

The interval is a range of values for the population mean that is compatible with the data. Press “Load the worked example” under the calculator and these values fill the fields. HYPOTHETICAL VALUES.

What the Result Still Needs

  1. 1
    The right interval for the question. A mean, a proportion, a difference in means and a difference in proportions each have a method, and the report names it.
  2. 2
    An interval beside every estimate. The point estimate, the interval and the level appear together, not the interval alone and not a p-value alone.
  3. 3
    A design that matches the method. Independent samples are required; paired, repeated or clustered data are analyzed on their own terms.
  4. 4
    A reading that avoids probability language. The text says the interval is compatible with the data at that level, and does not say the parameter has a 95% chance of lying in it.
  5. 5
    A level fixed in the protocol. The confidence level is stated in the methods and kept the same throughout the paper.
Have the result reported correctly

A statistician checks the design against the interval method, confirms the numbers and writes the results sentence for your manuscript or report.

Results Reporting & Interpretation
Already have a calculation?

Independent Statistical Review confirms an analysis prepared by you, a colleague or an AI tool before it goes to a committee or a journal.

Independent Statistical Review

Frequently Asked Questions

No. The interval is a range of values compatible with the data at the stated level, and the 95% describes the long-run behavior of the method. It is not a 95% probability that the parameter lies inside this particular interval.

The simple Wald interval performs poorly with small samples and with proportions near 0 or 1. The Wilson score interval keeps the coverage close to the stated level and stays inside the 0 to 1 range. The calculator never uses the Wald interval.

The Welch interval does not require the two groups to have the same SD, and it adjusts the degrees of freedom accordingly. When the SDs are equal, it gives almost the same interval as the pooled version. It is the safer default for two independent groups.

A higher level gives a wider interval, because it reports a larger range of compatible values. The level is a reporting convention and should be set before the analysis. Report the level beside every interval.

Not with the difference tabs, which assume two independent groups. Paired data are summarized by the within-pair differences, and clustered designs need a method that accounts for the clustering. Choose the method that fits the data structure before you calculate.

References

  1. Altman, D. G., Machin, D., Bryant, T. N., & Gardner, M. J. (2000). Statistics with confidence: Confidence intervals and statistical guidelines (2nd ed.). BMJ Books.
  2. Newcombe, R. G. (1998a). Two-sided confidence intervals for the single proportion: Comparison of seven methods. Statistics in Medicine, 17(8), 857-872. https://doi.org/10.1002/(SICI)1097-0258(19980430)17:8<857::AID-SIM777>3.0.CO;2-E
  3. Newcombe, R. G. (1998b). Interval estimation for the difference between independent proportions: Comparison of eleven methods. Statistics in Medicine, 17(8), 873-890. https://doi.org/10.1002/(SICI)1097-0258(19980430)17:8<873::AID-SIM779>3.0.CO;2-I
  4. Welch, B. L. (1947). The generalization of “Student’s” problem when several different population variances are involved. Biometrika, 34(1-2), 28-35. https://doi.org/10.1093/biomet/34.1-2.28
i

Method reviewed by an in-house statistician · Last checked November 2026 · Test cases and boundary cases verified before release

Found an error or have a suggestion? Write to info@onlinespss.com with the calculator name and the inputs you used. Every report is checked by a statistician.

Have a Statistician Check Your Confidence Interval

Share the study aim, the design and the numbers or the source of your results. A statistically trained Research Coordinator reviews the request, and the scope and one fixed project fee are confirmed before work begins.

No Commitment Required

Strictly Confidential

Fixed Project Fee

In-House PhD-Level Statisticians

Same-Day Response