The Handy Calculators logoTheHandyCalculators

Confidence Interval Calculator

Compute z or t confidence intervals for a mean, with margin of error breakdown.

Autosave on
Point estimate
100
Margin of error
± 5.6011
Lower bound
94.3989
Upper bound
105.6011
Standard error
2.73861
Critical value
2.0452
Degrees of freedom
29

A confidence interval gives a range of plausible values for an unknown population parameter. '95% CI' means: if we repeated the sampling many times, 95% of the intervals we built this way would contain the true value. Use t-intervals for means with unknown population SD (most cases), z for very large samples, and the Wald formula for proportions.

How the interval is built

estimate ± critical value × standard error.

Estimate — your sample mean or proportion.

Standard error — the SD of the estimate. For a sample mean, SE = s/√n; for a proportion, SE = √(p̂(1−p̂)/n).

Critical value — how many SEs out you need to reach to capture the target confidence. Comes from the t (small n, unknown σ) or normal (large n or known σ) tables. For 95% it's about 1.96 for z, slightly larger for t.

When to use t vs z for a mean

If you know σ exactly, use z. This almost never happens in practice.

If you're estimating σ from the sample (using s), use t with df = n − 1. The t critical values are bigger than z critical values, which correctly widens the interval to account for uncertainty in s.

As n grows, t converges to z. By n = 60 the two are essentially identical; the choice mostly matters for n < 30.

Worked example — average commute

Survey of 30 commuters: mean = 32 minutes, s = 8 minutes. 95% CI for the population mean?

SE = 8 / √30 ≈ 1.461.

t(0.975, df = 29) ≈ 2.045. Margin of error = 2.045 · 1.461 ≈ 2.99 minutes.

95% CI: 32 ± 2.99 → (29.0, 35.0).

Interpretation: if we repeated this survey many times, about 95% of such intervals would cover the true average commute time. We do NOT say there is a 95% probability the true mean lies in this specific interval (that's a Bayesian credible interval).

Confidence interval for a proportion

Wald formula: p̂ ± z · √(p̂(1−p̂)/n). Works well when np̂ ≥ 10 and n(1−p̂) ≥ 10.

Edge cases (p̂ near 0 or 1, small n) are better handled by Wilson or Agresti-Coull intervals. The Wald interval can dip below 0 or above 1, which is impossible.

Example: 240 of 400 customers say yes (p̂ = 0.60). 95% Wald CI = 0.60 ± 1.96 · √(0.60·0.40/400) = 0.60 ± 0.048 = (0.552, 0.648).

Common pitfalls

Saying 'there's a 95% chance the parameter is in this interval'. The parameter is fixed; the interval is random. The 95% refers to the long-run capture rate.

Using a small-sample interval when the data is heavily skewed. CIs assume the sampling distribution of the mean is roughly normal — true for any shape when n is large, but failing for small skewed samples.

Confusing CI width with effect size. Wider intervals just mean more uncertainty; they don't change the point estimate.

Treating overlapping intervals as 'no difference'. Two CIs can overlap and the difference still be statistically significant — use a CI on the difference instead.

Frequently asked questions

Why is the 95% critical value 1.96?

Because Φ⁻¹(0.975) = 1.96 — 95% of a standard normal sits between −1.96 and +1.96.

How do I shrink the interval?

Larger n (interval shrinks like 1/√n), lower confidence level (95→90 narrows it), or reduced variability.

What if my data isn't normal?

CIs on means are robust for n ≥ 30 by the CLT. For small skewed samples, use bootstrap or transform the data.

Is this the same as a hypothesis test?

Closely related. A 95% CI that excludes a hypothesised value is equivalent to rejecting H₀ at α = 0.05 in a two-sided test.

By Larius — software engineer, NC real estate broker & CRE/business appraiserReviewed by the Handy Calculators editorial teamHow we build calculators

More in Statistics & Probability

From z-scores and confidence intervals to t-tests, chi-square, correlation, regression, and the binomial/Poisson distributions — textbook-grade tools with worked examples.

See hub →
Browse all Education →

Free download

Property Investment Checklist (PDF)

A field-tested checklist from a licensed broker and commercial appraiser: what to verify before you tour, how to check income and expenses, and the ratios lenders actually test.

We email you the guide. No spam, unsubscribe any time.

See all free resources