Confidence Interval Calculator (Mean & Proportion)
Instant confidence intervals for a sample mean or proportion. Enter your data and confidence level to see bounds, margin of error, and plain-English interpretation.
Your data
Confidence interval results
Results interpretation
- Wider intervals come from smaller samples, higher confidence, or greater variability (larger SD).
- Proportion near 0 or 1: prefer Wilson. Wald can misbehave with small n or extreme p̂.
- Not a probability statement: the CI procedure has X% coverage; the parameter is fixed.
- Who it’s for: students, analysts, and researchers needing quick, transparent CI bounds.
How to use the confidence interval calculator
- Choose Mean or Proportion mode.
- Enter your sample values (x̄, s, n) or counts (x, n).
- Pick a confidence level (e.g., 95%).
- Review CI bounds, margin of error, and interpretation.
- Adjust inputs to see how n, SD, or CL change the interval width.
How this calculator works
Formulas & assumptions
Mean CI (z): with sample mean x̄, sample SD s, size n, and confidence level (CL), the margin of error is zα/2 · s / √n
where α = 1 − CL
. The interval is x̄ ± zα/2 · s / √n
.
Proportion CI (Wilson): let p̂ = x/n and z = zα/2. Compute center = p̂ + z²/(2n)
, denom = 1 + z²/n
, and margin = z · √( p̂(1−p̂)/n + z²/(4n²) )
. Then lower = (center − margin)/denom
, upper = (center + margin)/denom
.
Assumptions: independent observations; for mean CI, normality of the sampling distribution (CLT helps for moderate n); for proportions, Wilson offers good coverage even with small n or extreme p̂. Outputs are planning estimates.
Use cases & examples
Example 1 — Mean, unknown population SD: x̄ = 72.3, s = 10.8, n = 40, CL = 95%. z ≈ 1.96 → ME ≈ 1.96 × 10.8 / √40 ≈ 3.35. CI ≈ 68.95 to 75.65.
Example 2 — Proportion (Wilson): x = 56 of n = 100 at 90% CL. z ≈ 1.645. The calculator shows a slightly asymmetric interval around p̂ = 0.56.
Example 3 — Tighter CI: Doubling sample size cuts the ME by about √2 (~29%), holding SD and CL fixed.
Confidence Intervals — FAQ
Is a 95% CI the probability the parameter is inside?
No. It means the procedure covers the true value ~95% of the time in repeated sampling.
When should I use a t-interval?
For small n with an approximately normal population and unknown σ. This tool uses z for simplicity.
Why Wilson instead of Wald for proportions?
Wilson has better coverage with small samples or when p̂ is near 0 or 1.
Can I change the confidence level?
Yes—set CL% (e.g., 90%, 95%, 99%). Higher CL gives a wider interval.
Does increasing n always shrink the CI?
Yes, ME scales with 1/√n, holding SD and CL fixed.
What if x = 0 or x = n?
Wilson still yields finite bounds, unlike Wald which can collapse to 0% or 100%.
Confidence Interval Calculator: How to Get Reliable Bounds for a Mean or Proportion
Our confidence interval calculator helps you move beyond a single estimate and report a plausible range for the population mean or proportion. Entering a sample mean and standard deviation, or successes and trials, with a chosen confidence level produces bounds and a margin of error that are easy to communicate. Confidence intervals reflect the precision of your data: larger samples and lower variability shrink the interval, while higher confidence targets widen it. This page shows exactly how those trade-offs work and offers recommended methods for proportions that behave well with small samples.
What “95% confident” really means
Confidence is about procedures, not probabilities of a fixed parameter. If we collected new samples and rebuilt intervals the same way forever, about 95% of those intervals would contain the true value when using a 95% confidence level. Your single interval either contains the truth or it doesn’t, but the methodis calibrated to succeed a known fraction of the time. This frequentist interpretation is subtle but crucial for clear communication with non-statistical stakeholders.
Mean intervals: margin of error and the CLT
For a sample mean, the margin of error is z × s/√n, where s is the sample standard deviation, n is the sample size, and z is the critical value tied to the confidence level (≈1.645, 1.96, 2.576 for 90%, 95%, 99%). When n is moderately large, the Central Limit Theorem makes the sampling distribution of x̄ close to normal even if the original data aren’t. For small samples from an approximately normal population, a t-interval using Student’s t critical value is preferred; it’s slightly wider to account for extra uncertainty in s.
Proportion intervals: why Wilson beats Wald
The classic “Wald” interval p̂ ± z·√(p̂(1−p̂)/n) is simple but can under- or over-cover when n is small or the estimate is near 0 or 1. The Wilson score interval recenters and rescales to provide much more reliable coverage in those edge cases, which is why this tool uses Wilson by default. If you need symmetry for teaching or homework, you can still select Wald, but in practice Wilson is a better everyday choice.
Practical tips for tighter intervals
- Increase n: margin shrinks with 1/√n—quadruple n to halve the ME.
- Reduce variability: better measurement protocols and outlier handling can lower s.
- Pick the right CL: use 90% for quick screens, 95% for reports, 99% when stakes are high.
Use this calculator to design studies, summarize surveys, and report results with clarity. Confidence intervals make uncertainty visible and set realistic expectations for decision-making.