Confidence Interval Calculator

Calculate a confidence interval for a mean or a proportion, with the margin of error and what the interval does and does not say.

Standard error of the mean 0.751177
CI = x̄ ± z × (s ÷ √n)
Margin of error 1.47228
CI = x̄ ± z × (s ÷ √n)
Lower bound 66.92772
CI = x̄ ± z × (s ÷ √n)
Upper bound 69.87228
CI = x̄ ± z × (s ÷ √n)
Interval width 2.944559
Confidence interval for the proportion Enter a success count to get a proportion interval
Sample size to halve the margin 600

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Confidence Interval Calculator does

This confidence interval calculator will calculate a confidence interval for a mean or a proportion, with the margin of error and what the interval does and does not say. Fill in all 5 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for reporting a survey or experimental result with its uncertainty. You may also want the percentile calculator.

How to use it

  1. Enter the sample mean, standard deviation and sample size.
  2. Pick a confidence level.
  3. For a proportion, also enter the number of successes.

How it works

A 95% confidence interval does not mean there is a 95% probability that the true value lies in this particular interval. It means that if you repeated the sampling procedure many times, 95% of the intervals you constructed would contain the true value. The distinction matters because the true value is fixed and it is the interval that varies.

The √n in the denominator is why precision is expensive. Halving the margin of error needs four times the sample, and halving it again needs sixteen times. That is the single most important practical fact about sample size, and it is why survey margins stall around three percentage points — going below it costs more than most studies will pay.

This uses the normal z value, which is appropriate for large samples. Below about n = 30, or whenever the population standard deviation is unknown and the sample is small, the t distribution gives a wider and more honest interval. The proportion interval here is the standard Wald form, which behaves poorly when p is near 0 or 1 or the sample is small — the Wilson or Agresti-Coull interval is better in those cases.

When to use it

  • Reporting a survey or experimental result with its uncertainty.
  • Working out the margin of error on a poll.
  • Planning a sample size for a target precision.
  • Checking a published confidence interval.

Common mistakes to avoid

  • Interpreting the interval as a 95% probability about this particular interval.
  • Using the z value with a small sample, where t is appropriate.
  • Using the Wald proportion interval when the proportion is near 0 or 1.

Frequently asked questions

What does a 95% confidence interval mean?

That the procedure producing it would capture the true value in 95% of repeated samples. It is a statement about the method, not a probability about this one interval.

How do I halve the margin of error?

Quadruple the sample size. The margin scales with one over the square root of n, so precision gets expensive quickly.

When should I use t instead of z?

When the sample is small — conventionally below 30 — or whenever you are estimating the population standard deviation from the sample. The t interval is wider and more honest in those cases.

Related tools

See all math & statistics calculators →