Build a confidence interval for a mean or a proportion from your sample. Pick any confidence level, let it choose z or t automatically, and see the standard error, margin of error, and interval worked out — updating as you type.
The average of your sample
Spread of the data
Number of observations (≥ 2)
Auto uses t for small samples (n < 30) and z otherwise.
A sample gives you a single estimate — an average, a percentage — but it never lands exactly on the true population value. A confidence interval wraps that estimate in a range and attaches a confidence level, so you report not just a best guess but how much room for error comes with it. Every interval is built from the same two pieces.
Four steps for a mean. A proportion follows the same arc with its own standard-error formula.
Divide the standard deviation by the square root of the sample size. This is how far the sample mean x̄ typically strays from the true mean.
Pick z* from the normal table for large samples, or t* at n − 1 degrees of freedom for small ones. It grows with the confidence level.
The critical value times the standard error gives the half-width of the interval.
Centre the interval on the estimate: subtract the margin for the lower bound, add it for the upper.
The same recipe, computed live for a large-sample mean, a small-sample mean, and a poll proportion.
Both give a critical value; they differ in how much they trust a small sample to estimate the spread.
The two-sided z* for the standard confidence levels — the numbers you plug into the margin of error.
| Confidence level | Tail area (α/2) | z* critical value |
|---|---|---|
| 80% | 0.100 | 1.282 |
| 85% | 0.075 | 1.44 |
| 90% | 0.050 | 1.645 |
| 95% | 0.025 | 1.96 |
| 98% | 0.010 | 2.326 |
| 99% | 0.005 | 2.576 |
| 99.9% | 0.0005 | 3.291 |
For small samples, the t* value also depends on the degrees of freedom (df = n − 1). It starts well above z* and shrinks toward it as the sample grows.
| df | t* (90%) | t* (95%) | t* (99%) |
|---|---|---|---|
| 1 | 5.572 | 9.711 | 28.471 |
| 2 | 2.885 | 4.171 | 8.761 |
| 3 | 2.347 | 3.159 | 5.646 |
| 4 | 2.130 | 2.769 | 4.547 |
| 5 | 2.014 | 2.568 | 4.010 |
| 8 | 1.859 | 2.306 | 3.352 |
| 10 | 1.812 | 2.228 | 3.168 |
| 15 | 1.753 | 2.131 | 2.946 |
| 20 | 1.725 | 2.086 | 2.845 |
| 30 | 1.697 | 2.042 | 2.750 |
| 50 | 1.676 | 2.009 | 2.678 |
| 100 | 1.660 | 1.984 | 2.626 |
| ∞ (z*) | 1.645 | 1.960 | 2.576 |
The classic poll question — “what is the margin of error for n respondents?” — answered for every common sample size. These are the widest-case margins (at 50/50), the figure news outlets cite.
Six things that trip people up — and the facts that keep your intervals honest.
Anywhere a number comes from a sample, a confidence interval is the honest way to report it.

The mean is the average of a set of numbers: add them all up and divide by how many there are. This guide shows the formula, a worked example, and how the mean differs from the median and mode.

Use STDEV.S or STDEV.P in Excel, choose the right one for your data, and check the result against a worked example.

A friendly, beginner-focused guide to understanding and calculating range in statistics. Learn what range means, how to compute it, real-life applications, and common mistakes to avoid.