Tools · Math & Statistics

Confidence Interval Calculator

Put a margin of error around a sample mean or a poll result, at any confidence level from 80% to 99.9%. You get both bounds, the margin, and the standard error underneath it — plus a plain account of what the confidence level does and does not claim.

Published z multipliers, no approximated tailsWhat 95% actually meansInputs stay on this device
Your inputs

Interval for a mean

A mean needs a standard deviation; a proportion carries its own.

How often the procedure captures the true value across repeated samples. Higher confidence buys a wider interval, not a better estimate.

x̄ — the average of your measurements, in whatever unit they were taken.

σ, in the same unit as the mean. A z interval assumes this is known rather than estimated from a handful of observations.

n — how many observations the estimate rests on. The margin shrinks with √n, so four times the data halves it.

Your inputs are calculated locally and are not stored.
95% confidence interval95.8422 to 104.1578

A mean of 100.00 from 50 observations, give or take 4.1578. The margin is 1.96 × the standard error of 2.1213.

Point estimate
100.00
Margin of error
±4.1578
Standard error
2.1213
Lower bound
95.8422
Upper bound
104.1578
z multiplier
1.96
  • Read this as a statement about the method, not about this interval: repeat the study many times and 95% of the intervals built this way would contain the true value. It does not say there is a 95% probability the true value sits between 95.8422 and 104.1578 — that value is fixed, and this interval either caught it or missed it.
  • Sampling error only. Nothing here accounts for who declined to answer, a sampling frame that misses part of the population, or a leading question — none of which shrink as n grows.
Formula & methodology

One estimate, one standard error, one multiplier

Every confidence interval on this page is the same three-part sentence: here is my estimate, here is how much it wobbles from sample to sample, and here is how many wobbles wide I want the net to be. Only the middle term changes between a mean and a proportion.

x̄ ± z × σ∕√n  •  p̂ ± z × √(p̂(1 − p̂)∕n)
x̄, p̂
The point estimate — the sample mean, or the sample proportion
σ
The standard deviation of the data, in the same unit as the mean
n
The number of observations behind the estimate
σ∕√n
The standard error — the spread of the estimate itself, not of the data
z
The multiplier for the confidence level you picked, from the standard normal table

A proportion needs no separate standard deviation because a yes/no answer carries its own: the variance of a proportion is p̂(1 − p̂), fixed entirely by the proportion itself. That is why the proportion mode above asks for one number where the mean mode asks for two.

The multipliers this tool uses

Each is the point on the standard normal curve that leaves half of the remaining probability in each tail — 1.960 for 95% because 2.5% of the curve sits above it and 2.5% below.

Two-sided z multipliers, and the margin each produces for the default example (x̄ = 100, σ = 15, n = 50)
Confidence levelzMargin of error
80%1.282±2.72
90%1.645±3.49
95%1.960±4.16
99%2.576±5.46
99.9%3.291±6.98
The part everyone gets wrong

What “95% confidence” actually claims

A 95% confidence interval does not mean there is a 95% probability that the true value lies between the two bounds. It is worth being blunt about this, because almost every calculator that returns an interval lets the reader assume otherwise.

The true value — the mean of the whole population, the real share of voters — is a fixed number. It does not move, and it is not random. Your interval either contains it or it does not. There is no 95% about it; the answer is already yes or no, and you simply cannot see which.

The 95% belongs to the method. Picture a hundred research teams, each drawing their own sample of 50 from the same population and each building an interval exactly the way this page does. About 95 of those hundred intervals would contain the true mean; about 5 would sit entirely to one side of it and miss. That long-run capture rate is the guarantee on offer. You have one interval from that process, and no way to tell which kind you are holding.

Why the distinction has practical teeth

  • A bound is not a worst case.“At worst 95.84” is the wrong reading. Five intervals in a hundred do not contain the true value at all, so the true value can sit outside both bounds, in either direction.
  • A value just outside the interval is not ruled out. An interval of 95.84 to 104.16 does not refute a true mean of 105. It says a mean of 105 would make this sample somewhat surprising, not impossible.
  • The confidence level is conditional on the assumptions. The 95% capture rate holds only if the sample was drawn the way the maths assumes. Sample the wrong people and the long-run rate is not 95% either — it can be anything at all, and no arithmetic on the numbers you collected will reveal it.
  • Overlap is not a test. Two groups whose intervals overlap can still differ significantly. Comparing two intervals by eye is not the same as building an interval for the difference, which is the thing you actually want.
Worked example

A mean of 100 from 50 measurements, and a 52% poll

Start with the default above: 50 observations, a sample mean of 100, and a standard deviation of 15. The standard error is 15 ÷ √50 = 15 ÷ 7.0711 = 2.1213. That is the number that matters — not the 15. At 95% confidence the multiplier is 1.960, so the margin of error is 1.960 × 2.1213 = 4.1578, and the interval runs from 100 − 4.1578 = 95.8422 to 100 + 4.1578 = 104.1578.

Now the poll. Switch the mode to a proportion, enter 52% and a sample of 1,000. The standard error is √(0.52 × 0.48 ÷ 1000) = 0.0158, which is 1.58 percentage points. Times 1.960 gives a margin of 3.10 points, so the interval is 48.90% to 55.10%. It contains 50%. A candidate leading 52 to 48 in a poll of a thousand people is, on this evidence, in a tie — which is why “within the margin of error” is the phrase that belongs in the write-up.

One more thing worth noticing in that second example: the published margin for a poll like this is usually quoted as ±3.1 points, which is exactly what falls out of assuming a 50/50 split. The margin barely moves across the middle of the range — at 52% it is 3.096 points and at 50% it is 3.099 — which is why pollsters can print a single figure at the bottom of the page and have it hold for every question on the survey.

When z is the wrong tool

The t distribution, and when you need it

The multipliers here come from the normal distribution, which assumes the standard deviation you typed is the real one. That is true when σ is known from long experience with the process — a calibrated instrument, a standardised test — and near enough to true when the sample is large, because a standard deviation estimated from a lot of data is close to the truth.

It is not true for a small sample with an estimated standard deviation. There the extra uncertainty about σ itself has to be paid for, and the payment is a bigger multiplier from Student's t distribution with n − 1 degrees of freedom:

95% multipliers: t against z, by sample size
Sample sizet multiplierz multiplierHow much z understates
n = 102.2621.96013%
n = 202.0931.9606%
n = 302.0451.9604%
n = 1001.9841.9601%

This calculator does not compute t multipliers — they need an inverse cumulative distribution rather than a seven-row table — so instead of quietly returning something too narrow, it flags the case: enter a sample below 30 in mean mode and the result panel says so. Above 30 the gap is small enough that the z interval is the one most reporting uses anyway.

Assumptions

What this calculator assumes

  • The sample was drawn at random from the population you care about. Every figure here describes sampling error and nothing else — self-selection, non-response and a frame that misses part of the population are invisible to it, and they do not shrink as n grows.
  • The standard deviation you enter is the population one, or a large-sample estimate close to it. If it came from a handful of observations, the t distribution is the correct tool and this interval is too narrow.
  • Observations are independent. Clustered or repeated-measures data — several readings from each subject, several people per household — carries less information than its raw n suggests, and the true interval is wider than this one.
  • The proportion interval is the Wald interval, which assumes the normal approximation to the binomial holds. The usual condition is at least ten successes and ten failures; the tool warns when that fails.
  • No finite population correction is applied. If your sample is a large fraction of a small population — more than about 5% — the real interval is narrower than this one.
  • Results are shown to four decimal places, which is finer than the data behind almost any of them justifies. Report a margin of error to the precision your measurement supports, not to the precision the arithmetic can print.
Common questions

Confidence interval FAQ

Does a 95% confidence interval mean there is a 95% chance the true value is inside it?

No, and this is the most common misreading in applied statistics. The true value is a fixed number — it is either inside your interval or it is not, and there is no probability attached to a settled fact. The 95% describes the procedure: if you repeated the study many times, drawing a fresh sample each time and building an interval the same way each time, about 95% of those intervals would contain the true value. You are holding one interval out of that imaginary run, and nothing in the data tells you whether yours is one of the 95 that caught the value or one of the 5 that missed.

What is the difference between standard deviation and standard error?

Standard deviation describes the data — how far a typical single observation sits from the mean. Standard error describes an estimate — how far this sample's mean is likely to sit from the true mean. It is σ ÷ √n, so it shrinks as you collect more data while the standard deviation does not. A confidence interval is built from the standard error, never from the standard deviation directly, which is why 50 observations with σ = 15 give a margin of ±4.16 rather than ±29.4.

Why does a higher confidence level make the interval wider?

Because confidence and precision are traded against each other. Asking to be right more often means casting a wider net: the same data at 90% gives ±3.49, at 95% gives ±4.16, and at 99% gives ±5.46. The estimate has not improved — the interval has simply grown to catch the true value more often. The only way to be both more confident and more precise is more data.

How much extra data does it take to halve the margin of error?

Four times as much. The margin carries √n in its denominator, so precision improves with the square root of the sample, not with the sample. Going from 50 observations to 200 cuts a ±4.16 margin to ±2.08; getting to ±1.04 would take 800. This square-root wall is why very precise estimates are expensive and why doubling a survey feels so disappointing.

Should I be using z or t?

Use z when the population standard deviation is genuinely known, or when the sample is large enough — roughly 30 or more — that an estimated standard deviation is close enough to the real one. Use t when σ is estimated from a small sample, with n − 1 degrees of freedom. At n = 10 the 95% t multiplier is 2.262 against z's 1.960, so a z interval there is about 13% too narrow. By n = 100 the t multiplier is 1.984 and the distinction stops mattering. This tool computes the z interval and tells you on screen when your sample is small enough that t is the honest choice.

My proportion interval runs below 0%. Is that a bug?

No — it is the Wald interval showing its limits. The formula p̂ ± z√(p̂(1−p̂)/n) is symmetric, but a proportion is bounded at 0 and 1, so with a small sample or an extreme proportion the arithmetic can push a bound past the edge. The same formula fails in the opposite direction at p̂ = 0 or 100%, where the standard error is exactly zero and the interval collapses to a point: 0 successes in 50 trials is plainly not certainty. When either happens, a Wilson or Agresti–Coull interval is the right tool.

Two groups have overlapping confidence intervals. Does that mean they are not different?

Not necessarily, and treating overlap as a test is a real error. Two 95% intervals can overlap while a proper test of the difference still finds it significant, because the interval for a difference is built from the combined standard error rather than from the two intervals side by side. Overlap is suggestive, not conclusive; if the question is whether two groups differ, compute an interval for the difference itself.

Primary sources

Sources and review notes

  1. NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.2 — Confidence Limits for the Mean, including the interpretation of the confidence level as a long-run capture rate
  2. NIST/SEMATECH e-Handbook §7.2.4.1 — Confidence intervals for a proportion, and the conditions under which the normal approximation holds

The z multipliers are the published two-sided values from the standard normal distribution, rounded to three decimals as they appear in every printed table. They are constants, not data, and cannot go stale. The t multipliers quoted in the comparison above are the standard 95% values at 9, 19, 29 and 99 degrees of freedom.