CalcCafe

Confidence Interval Calculator

Find the confidence interval for a population mean using your sample statistics and a chosen confidence level.

Confidence interval for the mean
-
z-value
-
Std error
-
Margin of error
-
Lower bound
-
Upper bound
-

Uses the z-distribution (large-sample approximation). For small samples the t-distribution gives a slightly wider, more accurate interval.

Example

Sample mean = 100, sample SD = 15, n = 25, 95% confidence (z = 1.95996):

SE = 15 / sqrt(25) = 15 / 5 = 3
MOE = 1.95996 x 3  = 5.8799
CI = 100 +/- 5.8799
  = [94.12, 105.88]

How it works

Enter the sample mean, sample standard deviation, sample size, and pick a confidence level; the tool computes the standard error, margin of error, and the interval as mean +/- z*(sd/sqrt(n)).

Good to know

This Confidence Interval Calculator estimates the range that likely contains a population mean, based on four numbers from your sample: the sample mean, the sample standard deviation, the sample size, and a chosen confidence level (90%, 95%, or 99%). It is built for students working through statistics homework, researchers summarizing survey or experiment data, and anyone who has a set of measurements and wants a defensible range rather than a single point estimate.

Reach for it whenever you have already calculated your sample average and spread but need to express how much uncertainty surrounds that average. The output gives you the standard error (how much the sample mean is expected to vary), the margin of error (the z-value times the standard error), and the lower and upper bounds written as mean plus or minus the margin. A 95% interval of [94.12, 105.88], for example, means that if you repeated this sampling process many times, about 95% of the intervals built this way would capture the true population mean.

A few points keep your results honest:

One practical caveat: this tool uses the z-distribution, a large-sample approximation that is most accurate when n is roughly 30 or more, or when the population standard deviation is genuinely known. With a small sample the true interval is slightly wider than what z reports, so treat very small-n results as a close estimate rather than an exact figure.

Frequently asked questions

Why does this use z instead of the t-distribution?
The z-distribution gives a clean, standard interval that is accurate for large samples (roughly n >= 30) or when the population SD is known. For small samples a t-value would be slightly larger, producing a marginally wider interval; the note flags this case.
What z-values are used for each confidence level?
90% uses z = 1.6449, 95% uses z = 1.9600, and 99% uses z = 2.5758. These are the two-sided critical values that leave (1 - level)/2 in each tail of the standard normal distribution.
Is my data uploaded anywhere?
No — this calculator runs entirely in your browser; nothing is uploaded.
Is it free?
Yes, completely free with no sign-up and no limits.

People also ask

What is a confidence interval in simple terms?
It is a range of values, calculated from sample data, that is likely to contain the true value of a population parameter such as the mean. A 95% confidence interval means the method used to build it captures the true mean about 95% of the time over many repeated samples.
How do you calculate a 95% confidence interval for the mean?
Compute the standard error as the sample standard deviation divided by the square root of the sample size, multiply it by the critical z-value of 1.95996 for 95% confidence to get the margin of error, then add and subtract that margin from the sample mean. The result is the interval [mean minus margin, mean plus margin].
Does a wider confidence interval mean my result is better or worse?
A wider interval reflects more uncertainty about the mean, usually from a small sample, large variability, or a higher confidence level. A narrower interval is more precise, but precision alone does not guarantee accuracy if the data is biased.
What is the difference between standard error and standard deviation?
Standard deviation measures how spread out individual data points are around the sample mean. Standard error measures how much the sample mean itself is expected to vary from sample to sample, and it equals the standard deviation divided by the square root of the sample size.
How does sample size affect the confidence interval width?
Increasing the sample size reduces the standard error because it divides the standard deviation by a larger square root, which narrows the interval. Quadrupling the sample size roughly halves the margin of error, all else being equal.
Can a confidence interval be used to test a hypothesis?
Yes. If a hypothesized value for the mean falls outside the confidence interval, that value would be rejected at the corresponding significance level, while a value inside the interval would not. A 95% interval corresponds to a two-sided test at the 0.05 level.
What does a 99% confidence level change compared to 95%?
A 99% level uses a larger critical z-value (about 2.5758 instead of 1.96000), which increases the margin of error and produces a wider interval. You gain more certainty that the true mean is captured, at the cost of a less precise range.
Is a confidence interval the same as a probability that the true mean lies in the range?
Not exactly. In the standard frequentist interpretation, the true mean is fixed and either is or is not in any single interval; the confidence level describes the long-run success rate of the method, not the probability for one specific interval.

Related calculators