Toolzent

Confidence Interval Calculator

Free confidence interval calculator: enter mean, standard deviation and sample size to find the 90%, 95% or 99% z-interval and margin of error instantly.

Updated 2026-06-09 · Free · No sign-up · Runs privately in your browser

z-interval: x̄ ± z × (SD ÷ √n). t-interval (small samples): x̄ ± t × (s ÷ √n), df = n − 1.

What is a confidence interval calculator?

A confidence interval calculator turns a sample mean into a range of plausible values for the true population mean. Instead of reporting a single number, it reports a lower and an upper bound — for example “95.1 to 104.9” — together with a confidence level that says how often such a range would capture the real mean if you repeated the study many times.

This tool builds a z-interval for a mean. You supply three numbers — the sample mean, the standard deviation (SD) and the sample size (n) — and pick a confidence level of 90%, 95% or 99%. The calculator then returns the margin of error and the interval mean ± margin of error, all instantly in your browser.

How does the confidence interval calculator work?

The interval comes from one formula:

CI = mean ± z·(SD ÷ √n)

It is built in two stages. First the standard error of the mean:

SE = SD ÷ √n

Then the margin of error, which scales the standard error by a z-value chosen for your confidence level:

margin of error = z × SE

The terms are:

  • mean — the average of your sample, the centre of the interval.
  • SD — the standard deviation, the spread of the data (in the same units as the mean).
  • n — the sample size (a count of observations). Its square root, √n, drives the precision.
  • z — the critical value from the normal distribution for the chosen confidence level.

This tool uses these fixed z-values:

  • z = 1.645 for 90% confidence
  • z = 1.96 for 95% confidence
  • z = 2.576 for 99% confidence

The interval is symmetric: the lower bound is mean − margin and the upper bound is mean + margin. The interval carries the same units as the mean and SD; only z is unitless.

Examples

Each example matches the calculator exactly. Type the inputs into the tool above to confirm the output.

Example 1: the verified 95% interval

A sample has a mean of 100, an SD of 15 and n = 36, at 95% confidence.

SE = 15 ÷ √36 = 15 ÷ 6 = 2.5

margin = 1.96 × 2.5 = 4.9

CI = 100 ± 4.9 = 95.1 to 104.9

So you can be 95% confident the true mean lies between 95.1 and 104.9.

Example 2: same data at 90% confidence

Keep the mean 100, SD 15, n = 36, but drop to 90% confidence.

SE = 15 ÷ 6 = 2.5

margin = 1.645 × 2.5 = 4.1125

CI = 100 ± 4.1125 = 95.8875 to 104.1125

The interval 95.89 to 104.11 is narrower than the 95% interval because the smaller z (1.645) accepts more risk of missing the true mean.

Example 3: same data at 99% confidence

Now raise the confidence to 99% with the same mean 100, SD 15, n = 36.

SE = 15 ÷ 6 = 2.5

margin = 2.576 × 2.5 = 6.44

CI = 100 ± 6.44 = 93.56 to 106.44

The interval 93.56 to 106.44 is the widest of the three: demanding more confidence (z = 2.576) forces a larger margin.

Example 4: a larger sample tightens the interval

Take a mean of 50, an SD of 12 and a bigger n = 64, at 95% confidence.

SE = 12 ÷ √64 = 12 ÷ 8 = 1.5

margin = 1.96 × 1.5 = 2.94

CI = 50 ± 2.94 = 47.06 to 52.94

Because n is larger, √n is larger, the standard error shrinks, and the interval 47.06 to 52.94 is comparatively tight.

Confidence level reference table

This table fixes the data at mean 100, SD 15, n = 36 (so SE = 2.5) and shows how the z-value, margin and interval change with the confidence level.

Confidence levelz-valueMargin of error (z × 2.5)Interval
90%1.6454.112595.8875 to 104.1125
95%1.964.995.1 to 104.9
99%2.5766.4493.56 to 106.44

Higher confidence always widens the interval, because you are asking the range to capture the true mean more often.

Common uses

  • Reporting survey or poll results — pair a mean rating or score with a margin of error so readers see the precision.
  • A/B testing and experiments — express the average effect as an interval rather than a single point estimate.
  • Quality control — check whether a process mean stays inside an expected range across batches.
  • Academic and lab work — present a measured average with its uncertainty in coursework or papers.
  • Business metrics — bound estimates such as average order value or average handle time before making decisions.

Tips and common mistakes

  • Sample size n must be greater than 0, and SD must be 0 or more. A larger n shrinks the standard error and narrows the interval.
  • Use the standard deviation, not the standard error, as the SD input. The tool computes the standard error itself as SD ÷ √n.
  • A 95% interval does not mean a 95% chance the true mean is inside this one range. It means 95% of intervals built this way, over many repeated samples, would contain the true mean.
  • Higher confidence is not “better” for free — it always costs a wider, less precise interval. Pick the level that fits your decision.
  • Keep units consistent. The mean, SD and resulting bounds all share the same units; z is the only unitless piece.

Limitations and notes

This calculator builds a z-interval, which assumes the sample mean is approximately normally distributed — reasonable for large samples or when the population standard deviation is known. For small samples with an unknown population SD, a t-interval (using t-values instead of z) is more accurate, and this tool does not compute that. It also covers the interval for a single mean, not for proportions, differences or variances.

The three z-values (1.645, 1.96, 2.576) are rounded standard critical values, and results may be displayed rounded for readability. The interval is only as trustworthy as the inputs: a biased sample or a wrong SD produces a misleading range no matter how the arithmetic checks out. Everything runs privately in your browser — your numbers are never uploaded — and this tool is intended for educational and general analytical use, not as a substitute for professional statistical advice.

Build the inputs this calculator needs by computing the spread with the standard deviation calculator, find the centre with the mean, median & mode calculator, standardise a single value with the z-score calculator, and explore more in the statistics category.

Frequently asked questions

How do you calculate a confidence interval for a mean?+

Find the standard error (SD ÷ √n), multiply it by the z-value for your confidence level, then add and subtract that margin from the mean: CI = mean ± z·(SD ÷ √n).

What is the 95% confidence interval for a mean of 100, SD 15 and n = 36?+

SE = 15 ÷ 6 = 2.5, margin = 1.96 × 2.5 = 4.9, so the 95% interval is 95.1 to 104.9.

What z-values does this calculator use?+

It uses z = 1.645 for 90% confidence, z = 1.96 for 95%, and z = 2.576 for 99%.

What is the margin of error?+

The margin of error is z multiplied by the standard error (z × SD ÷ √n). It is the half-width you add to and subtract from the mean to form the interval.

Does a higher confidence level make the interval wider?+

Yes. A larger z multiplies the standard error by more, so a 99% interval is wider than a 95% interval, which is wider than a 90% interval for the same data.

How does sample size affect the interval?+

A larger sample size n increases √n, which shrinks the standard error and narrows the interval, giving a more precise estimate of the mean.

Does this tool use the z-distribution or the t-distribution?+

It uses the z-distribution (normal) for the interval of a mean, which is appropriate for large samples or when the population standard deviation is known.

Is my data sent to a server?+

No. The calculation runs entirely in your browser, so the numbers you enter never leave your device.