Enter a sample mean, standard deviation and size to get the margin of error and the full confidence interval for the population mean, from 80% to 99.9%, with the correct t or z critical value chosen automatically.
A sample tells you about the sample. A confidence interval turns that sample into a honest statement about the population you drew it from: a range of values that the true population mean plausibly sits in, with a stated level of reliability. A 95% confidence interval for a sample mean of 100 might run from 95.74 to 104.26, which says the data is compatible with any true mean in that neighborhood.
The word confidence has a precise meaning here, and it is probably not the one most people assume. It does not mean there is a 95% chance that the true mean falls inside this particular interval. The true mean is a fixed number, not a random one; it either is inside your interval or it is not. What the 95% describes is the procedure: if you drew sample after sample and built an interval from each one, about 95% of those intervals would capture the true mean. You cannot know whether yours is one of the lucky ones, which is exactly why the range, not a single point estimate, is the honest summary.
The toggle for a known population SD switches the mathematics between two distributions, which the next section explains.
Three steps build the interval: measure the precision of your sample, look up how much slack your confidence level demands, and add the two together.
SE = s ÷ √n
SE is the standard error: the standard deviation of the sample mean itself. Averages of many observations vary less than single observations, by a factor of √n.
ME = critical × SE
ME is the margin of error. The critical value comes from the t distribution when the population SD is unknown (the normal case) or from the z distribution when it is known.
CI = x̄ ± ME
The full interval: lower bound = x̄ - ME, upper bound = x̄ + ME.
Take a sample mean of 100, a sample SD of 15 and n = 50 at 95% confidence. The standard error is 15 ÷ √50 = 2.1213. Because the population SD is unknown, the critical value comes from the t distribution with n - 1 = 49 degrees of freedom: t = 2.0096, just above the z value of 1.9600. The margin of error is 2.0096 × 2.1213 = 4.2630, so the interval runs from 95.74 to 104.26. The calculator reproduces these figures exactly.
Tick Population SD known on the same numbers and the critical value switches to the z distribution: 1.959964 at 95%. The margin of error tightens to 4.1577 and the interval to 95.84 to 104.16. It is only slightly narrower, which is why the distinction matters more in principle than in practice once n is moderately large.
Small samples pay twice. Take the mean of 22.14 and SD of 13.29 from seven observations at 95%. The standard error is 13.29 ÷ √7 = 5.0231, and the t critical value with 6 degrees of freedom swells to 2.4469, well above the z value. The margin of error is 12.2912 and the interval spans 9.85 to 34.43, wider than the data's own SD. That is the t distribution honestly charging you for the uncertainty of a tiny sample.
Three levers control the width, and two of them are trade-offs:
A widespread habit is to build two confidence intervals, one per group, and declare a difference significant only if the intervals do not overlap. The logic feels intuitive and it is wrong in both directions. Two 95% intervals can overlap while the difference between the group means is statistically significant, because the difference is measured more precisely than either group alone: each group's interval must cover its own uncertainty, while the comparison only needs to beat the combined uncertainty. And when intervals barely fail to overlap, the conclusion "significant" is right only by luck of the geometry.
The correct comparison computes an interval for the difference between the two means, using both samples' information at once, and checks whether that interval contains zero. Until you have such a tool in front of you, treat side-by-side intervals as descriptive pictures, not as the verdict of a comparison.
Clear reporting costs one sentence and saves every reader a calculation. The standard pattern, used in APA and most scientific style guides, puts the estimate, the level and the bounds together: "the mean response time was 412 ms, 95% CI [398.1, 425.9]". Four habits make such lines trustworthy:
In the early 1900s, William Sealy Gosset worked as a chemist at the Guinness brewery in Dublin, where the practical problem was quality control on tiny samples: you cannot test every barrel of stout. The statistics of the day assumed large samples, and Guinness routinely drew just a handful of observations per batch, where the bell curve's promises quietly fail.
Gosset worked out the exact small-sample mathematics: a family of bell-like curves with heavier tails, indexed by what is now called the degrees of freedom. Guinness, wary of trade secrets, forbade employees from publishing, so Gosset wrote under the pen name "Student", and his 1908 paper gave the world Student's t-distribution, the very distribution this calculator uses whenever the population SD is unknown. Ronald Fisher later formalized the theory, and the t-based confidence interval became the default instrument of experimental science. Every "95% CI" you have ever read is, in a real sense, a souvenir of brewing.
It means the method works 95% of the time: if you repeated the sampling and interval-building many times, about 95 of every 100 intervals would contain the true population mean. It does not mean this specific interval has a 95% chance of containing the mean, because the mean is fixed and your single interval either includes it or does not.
Use t whenever you estimated the standard deviation from the sample itself, which is the normal situation; leave the "Population SD known" toggle off. Use z only when the population SD is genuinely known from outside sources. For sample sizes above about 30 the two differ by less than the second decimal place, so the choice stops mattering in practice.
Increase the sample size, which shrinks the standard error by the square root of n; to halve the margin of error you need roughly four times the observations. The other levers are trade-offs: lowering the confidence level narrows the interval but makes the procedure less reliable, and reducing the standard deviation requires better measurements rather than more arithmetic.
The t distribution already compensates for small samples by widening the interval, and its coverage stays honest when the underlying data is roughly symmetric. For visibly skewed data with fewer than about 15 observations, the stated confidence level can be optimistic, and a non-parametric method such as bootstrapping is the safer tool. Large samples are forgiving: the central limit theorem makes the mean nearly normal regardless of the data's shape.
Not with this page. Proportions use a different standard error, √(p(1 - p) ÷ n), and the logic of the interval is the same but the inputs are a count of successes rather than a mean and SD. Enter the proportion as a percentage in a pinch only for large samples, and prefer a dedicated proportion calculator for anything you plan to publish.
Width scales with the standard deviation and shrinks with the square root of the sample size, so a wide interval usually means a small sample or noisy measurements. Published studies often aggregate hundreds or thousands of observations. Compare your n with theirs before concluding your data is unusual, and remember that a wide interval stated honestly beats a narrow one that the data cannot support.
It is more reliable and less informative, which is the trade-off. Raising the level widens the interval (about 30% wider for large samples), so you are surer of capturing the mean but say less about where it lies. The right level depends on the cost of being wrong: exploratory work often uses 90%, published research 95%, and safety-critical decisions 99% or more.
Because the t distribution's shape depends on the degrees of freedom, n - 1. With few observations, the estimated SD is itself uncertain, so the curve grows heavier tails and the critical value rises, from 2.4469 at df = 6 down toward the familiar 1.959964 as df climbs. In the limit the t distribution becomes exactly the normal curve, which is why large-sample results look like textbook z values.
No. Overlap is not a significance test, and it fails in both directions: groups with clearly different means can still have overlapping individual intervals, and barely separated intervals do not guarantee significance. The sound comparison builds an interval for the difference between the two means and checks whether it contains zero, as the guide section above explains.
No. Every calculation runs in your browser. Nothing is stored or transmitted.