Math

Confidence Interval Calculator

Details

How to use Confidence Interval Calculator

What the tool does, how to run it, and what to expect from the result.

How to calculate a confidence interval for a mean

Enter the three summary statistics from your sample: the mean, the standard deviation, and the number of observations. The calculator derives the critical z value for your confidence level from the inverse normal CDF, computes the standard error as s divided by the square root of n, and multiplies the two to get the margin of error.

The result is the interval, the margin of error, the standard error, and the exact z that was used, so you can check the working.

  • Enter the sample mean (x-bar).
  • Enter the sample standard deviation (s), which must not be negative.
  • Enter the sample size (n), which must be a whole number; be aware that below about 30 the z method gives an interval that is too narrow.
  • Pick 90, 95, or 99 percent, or choose Custom and type any level between 0 and 100.
  • Read the interval, and report the margin of error alongside it rather than the mean on its own.
Tips

Getting a better result out of Confidence Interval Calculator

Specific settings and thresholds, not general advice.

  • This uses the z (normal) approximation: CI = x-bar plus or minus z times s over the square root of n. It does not use the t distribution, so for a small sample it gives an interval that is too narrow and therefore too confident.
  • The rule of thumb is n of 30 or more. At n = 10 the correct two-sided 95 percent multiplier is t = 2.262, while this tool uses z = 1.960, which makes the interval about 15 percent too tight. At n = 100 the difference is under 2 percent and no longer matters.
  • The z value is computed from an inverse normal CDF rather than looked up in a table, so any confidence level works, not only 90, 95, and 99. Enter 80 or 99.9 in the custom field and you get the exact critical value.
  • Halving the margin of error requires four times the sample, because the standard error is s over the square root of n. That square root is the single most useful fact in survey planning, and the reason a poll of 1,000 people is only about three times more precise than a poll of 100.
  • A 95 percent confidence interval does not mean there is a 95 percent chance the true mean lies in this particular interval. It means that if you repeated the sampling procedure many times, 95 percent of the intervals it produced would contain the true mean. The distinction matters the moment somebody asks you to bet on it.
Limits

What Confidence Interval Calculator does not do

The honest boundary, so you do not lose time finding it yourself.

  • Interval for a mean only; no interval for a proportion, a difference of means, or a variance.
  • z only; the t distribution is not offered, so small samples get an over-narrow interval.
  • No finite-population correction.
  • No raw-data input; you must supply the mean, the standard deviation, and n yourself.
At a glance

Who Confidence Interval Calculator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Students and analysts estimating a population mean.

Ideal for

Using the confidence interval calculator without installing anything or signing up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Should I be using the t distribution instead?

If your sample is small (roughly under 30) and you estimated the standard deviation from the sample rather than knowing the population value, yes, strictly you should use t. This calculator uses z, which produces a narrower interval than t does. At n = 10 the 95 percent multiplier should be 2.262 but z gives 1.960, so the interval here is about 15 percent too tight. Above n = 30 the two converge and the difference is not practically important.

Can I use a confidence level other than the presets?

Yes. Choose Custom and type any level strictly between 0 and 100. The critical value is computed from an inverse normal CDF, not read from a lookup table, so 80, 97.5, and 99.9 all give an exact z. The tool rejects 0 and 100 because both correspond to a degenerate or infinite interval.

Why is my interval so wide?

Either your sample standard deviation is large relative to the mean, or your sample is small, or both. The margin of error is z times s divided by the square root of n, so the only lever that reliably narrows it is more data, and it narrows only with the square root of the sample size: to halve the width you need four times as many observations.

What exactly does 95 percent confidence mean?

It is a property of the procedure, not of the one interval you are looking at. If you drew many samples the same way and computed an interval from each, about 95 percent of those intervals would contain the true population mean. The true mean is a fixed number; it is the interval that moves from sample to sample. Saying "there is a 95 percent probability the mean is in this range" is the common misstatement, and it is a Bayesian claim that this frequentist procedure does not support.

Why does it reject a non-integer sample size?

Because you cannot have 12.5 observations. The tool requires n to be a whole number of at least 1, and it requires the standard deviation to be non-negative. Those checks catch the most common data-entry mistakes before they turn into a plausible-looking but meaningless interval.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon