Confidence Interval for Mean
A confidence interval for a mean from summary statistics: n, mean, standard deviation and level.
What this page computes
Type the sample size, the sample mean, the sample standard deviation and the confidence level. The standard error is s/√n, the degrees of freedom are n − 1, and the interval is x̄ ± t*·SE with t* from the two-sided t quantile at the level you chose. The page prints the standard error, t*, the half-width and both endpoints. Figures print to six significant figures.
It uses the t distribution, not the normal, because s is estimated rather than known; a page that used 1.96 at n = 5 would understate the interval. The sample size must be at least 2, the standard deviation must be above zero, and the level must be between 0 and 100 percent, each refused with the value supplied.
The arithmetic runs in this tab, so the same four numbers always print the same interval.
The page builds the same t-based interval for a mean from summary numbers instead of raw data: x̄ ± t*·s/√n, with s typed in and t* taken at n − 1 degrees of freedom. A sample of 8 with mean 5 and s 2.13809 gives 3.21251 … 6.78749 at 95%, the same interval the raw-data page gives for those eight values. It needs n of at least 2, because one observation leaves no degrees of freedom, and an s of zero because a zero-width interval would claim certainty.
Build a confidence interval for a mean from n, the mean and s — no raw data needed.
How to use it
Type the sample size n, the sample mean, the sample standard deviation s and the confidence level in percent. n must be at least 2 and the level strictly between 0 and 100. The printed standard error s/√n, the t* and the half-width let the arithmetic be checked step by step rather than trusted as one number.
When to use this instead of the raw-data page
This is the summary-statistics face of the raw-data page: the same formula, the same two-sided t*, the same n − 1 degrees of freedom. It exists for the case where the mean and standard deviation are already known and the observations are not — from a paper, a lab sheet or someone else’s table. Because s is taken as given, the interval carries whatever convention produced it; the page does not re-derive it and does not silently switch to a normal critical value for large n.
What to Expect
Best for
- An interval from a published mean and standard deviation
What this tool keeps
- Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.
Sample output
95% CI of the mean = 3.21251 … 6.78749 SE = s/√n = 0.755929, df = 7, t* = 2.36462 half-width = t*·SE = 1.78749 n = 8, mean = 5, s = 2.13809
Frequently asked questions
Where does the t* come from?
From the inverse of the t cumulative function at n − 1 degrees of freedom, two-sided for the level you typed. The value used is printed so the interval can be reproduced.
Why is a sample size of 1 refused?
One observation leaves zero degrees of freedom, so there is no t distribution to take a critical value from. The page refuses it by name rather than printing an infinite interval.
Is anything uploaded?
No. All four inputs stay in this page; the interval is computed by JavaScript here and is not posted or stored.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.