Confidence Interval Calculator

This confidence interval calculator covers a population mean and a population proportion. For a mean you can use a t interval with the sample standard deviation, or a z interval when σ is known. For a proportion the default is the Wilson interval, which behaves better than the textbook Wald interval, especially with smaller samples or proportions near 0 or 1. A separate, older tool on this site still computes a mean-only interval if you want that specialized page.

Confidence interval calculator

Compute a confidence interval for a mean (t or z) or for a proportion (Wilson or Wald).

Parameter
Leave σ blank to use the t interval.

Calculator loading… If the form does not return a result, wait a moment and try again.

Confidence interval formulas

Mean, σ unknown: x̄ ± tα/2, n−1 × s/√n.

Mean, σ known: x̄ ± zα/2 × σ/√n.

Proportion, Wald: p̂ ± zα/2 × √(p̂(1−p̂)/n). This interval can fall outside [0, 1].

Proportion, Wilson: the center is (p̂ + z²/(2n)) / (1 + z²/n), and the margin uses √(p̂(1−p̂)/n + z²/(4n²)) in the numerator, divided by 1 + z²/n.

Wilson is the default here because it has better coverage than Wald in common classroom and research settings.

Worked example

A sample of n = 16 observations has mean 50 and sample SD 8. For a 95% t interval, df = 15 and t0.025, 15 ≈ 2.131. The standard error is 8/√16 = 2, so the margin of error is about 4.263, and the interval is [45.737, 54.263].

For a proportion, 12 successes in 50 trials give p̂ = 0.24. The 95% Wilson interval is about [0.142, 0.374]. The Wald interval is about [0.122, 0.358] and is slightly over-optimistic in the lower tail.

Related calculators and guides

Frequently asked questions

When should I use a t interval instead of a z interval for a mean?

Use the t interval whenever σ is unknown and you are using the sample standard deviation s. Use the z interval only when σ is treated as known.

Why is Wilson the default for a proportion?

The Wald interval can be too short, can go outside 0 and 1, and can be inaccurate for small n or for p̂ near 0 or 1. The Wilson interval has better coverage in those cases and is a standard recommended default.

What does a 95% confidence interval mean?

In repeated sampling, about 95% of intervals computed this way would contain the true parameter. It is not the probability that this particular interval contains the parameter after you have seen the data.

Is there already a confidence interval tool on this site?

Yes. The Confidence Interval Calculator for the Population Mean is a mean-only tool. This page adds a proportion interval and keeps the mean interval in one place.

Can I paste a list of numbers?

Yes, for a mean interval. Paste the data in the raw-data box and leave n, the mean, and s blank. The calculator will compute those from the list.