Quick answer: a confidence interval takes a sample estimate — a mean or a proportion — and stretches it by a margin of error built from the standard error and a critical value, giving a range constructed to capture the true population value at a stated rate. This confidence interval calculator builds intervals for a mean from raw data or summary statistics, with z or t critical values at 90%, 95%, 99% or a custom level, and intervals for a proportion by the Wald and Wilson score methods. The worked check to try first: a mean of 50 with a standard deviation of 10 and n = 100 at 95% confidence gives a z margin of error of 1.960 and the interval (48.04, 51.96).
How to use this confidence interval calculator
Step 1 — Pick the mode that matches your quantity. Mean mode is for a measured quantity averaged over a sample: average test score, average delivery time, average blood pressure. Proportion mode is for a share: the fraction of voters backing a candidate, of parts failing inspection, of patients who recovered. The two quantities need different standard errors and, for proportions, a choice of method, so the calculator keeps them in separate modes rather than pretending one formula fits both.
Step 2 — Enter what you actually have. In mean mode you can type the summary statistics directly — sample mean, standard deviation and sample size — or paste the raw measurements and let the calculator count them and compute the mean and the sample standard deviation itself. In proportion mode you enter the count of successes and the total sample size; the calculator divides them to get the sample proportion. Every keystroke recalculates, and impossible inputs — a success count larger than the sample, a sample size below 2 for a mean — produce a plain error message instead of a silent wrong answer.
Step 3 — Choose the method and the level, then read the whole result. For a mean, choose t when the standard deviation came from your sample (the usual case) and z only when the population standard deviation is genuinely known. For a proportion, choose Wald for the standard textbook interval or Wilson when the sample is small or the proportion is near 0 or 1. Then read the result in order: point estimate, critical value, standard error, margin of error, interval. If you also need a p-value from a finished statistic, the companion P-Value Calculator handles z, t, chi-square and F; if you are planning a study around a target margin of error, the Margin of Error Calculator works the same arithmetic backwards.
What a confidence interval is — in plain terms
A single sample gives a single estimate, and a single estimate is almost certainly not exactly right. Measure the heights of 100 adults and their mean might be 171.2 cm; draw a different 100 adults and the mean moves — 170.4, 172.0, 171.7. The sample mean is a moving target centred near the true population mean, and the confidence interval is the standard way of honestly reporting that wobble: instead of pretending the estimate is exact, you report a range whose width is calibrated to how much the statistic itself moves from sample to sample.
Three ingredients set the width. The standard error measures the wobble directly: it is the standard deviation the sample mean (or proportion) would have across repeated samples. The critical value is a multiplier chosen from the normal or t distribution so that the resulting procedure succeeds at the rate you asked for. And the confidence level — 90%, 95%, 99% — is that requested success rate. Multiply the standard error by the critical value and you get the margin of error; add and subtract it from the estimate and you have the interval. Every one of those ingredients is printed on this page's results panel, because an interval you cannot take apart is an interval you cannot defend.
Confidence intervals answer a different question from the one a lone estimate or a lone p-value answers. An estimate says "our best single guess is this." A p-value says "data this extreme would be unusual if nothing were going on." An interval says "the values inside this range are the ones compatible with our data at this level of stringency" — which is usually the question a reader, a manager or a marker actually wants answered, because it carries both the estimate and its precision in one statement.
The honest interpretation: what 95% confidence really means
Here is the interpretation this page stands behind, stated as carefully as the textbooks state it. Imagine repeating the whole study many times: fresh sample, same procedure, new interval each time. About 95% of those intervals would contain the true population value, and about 5% would miss it entirely. The 95% is a property of the procedure — its long-run capture rate — and your interval is one draw from that procedure. That is the whole claim, and it is a genuinely useful one: a method that captures the truth 95 times in 100 is a method whose single output deserves substantial, but not unlimited, trust.
What you may not say, as a blanket claim, is "there is a 95% probability that the true value lies inside this interval." In the frequentist framework this calculator — and nearly all standard software — uses, the true value is a fixed number, not a random one. Your computed interval either contains it or it does not; there is no probability left to assign once the data are in, any more than a flipped coin still lying covered has a probability of being heads. The randomness lived in the sampling, and it was spent producing this one interval. A Bayesian credible interval does support the probability reading, but it is a different construction, built from a prior distribution as well as the data, and it is not what this page computes.
In everyday reporting, the accepted phrasing is "we are 95% confident that the true mean lies between 48.04 and 51.96" — with "confident" understood as shorthand for the procedural statement above. Used that way, the interval also earns its most practical reading: values inside it are the values reasonably compatible with the data, values far outside it are not, and the width of the range is an honest picture of how much the data actually pin down. What an interval never does is rescue a biased sample: if the sampling itself was skewed, the procedure's 95% promise is void before the arithmetic starts, because the promise is about repeated sampling done this way.
Confidence interval for a mean, step by step
The recipe has four steps. First, compute or enter the sample mean x̄ — the ordinary average of the observations. Second, get the standard error: divide the standard deviation by the square root of the sample size, SE = s ÷ √n. Notice what this does: the spread of individual observations might be large, but the mean of 100 of them is far steadier, and the √n in the denominator is exactly that steadiness made quantitative. Third, pick the critical value for your confidence level — from the t distribution with n − 1 degrees of freedom when s was estimated from the sample, or from the normal distribution when the population standard deviation σ is known. Fourth, form the interval: x̄ ± critical value × SE.
Run it on the pre-filled example. x̄ = 50, s = 10, n = 100. The standard error is 10 ÷ √100 = 10 ÷ 10 = 1.000. At 95% confidence the z critical value is 1.960, so the margin of error is 1.960 × 1.000 = 1.960, and the interval is 50 − 1.960 to 50 + 1.960, that is (48.04, 51.96). Switch the method to t and the only change is the critical value: with 99 degrees of freedom it is about 1.984, the margin of error grows to about 1.984, and the interval widens slightly to (48.02, 51.98). Same data, same level — the t interval is a little wider because it honestly charges you for having estimated the standard deviation from the same sample.
Two assumptions ride along and deserve to be said out loud. The observations should be independent — one respondent's answer must not drag another's along — and either the underlying measurements should be roughly normally distributed or the sample should be large enough for the central limit theorem to make the mean approximately normal, which in practice means n of 30 or more covers most well-behaved data. Badly skewed data with a small n is the danger case: the interval arithmetic still runs, but the capture rate can drift away from the level printed on it. The calculator warns when you ask for z with a small sample, but no calculator can inspect your sampling for you.
z or t? Choosing the critical value for a mean
The z and t critical values come from two different distributions, and the difference is a confession. The normal (z) values assume the standard deviation plugged into the standard error is the true population value — known exactly, not estimated. The t values assume what is almost always the truth in practice: the standard deviation was computed from the same sample as the mean, so it carries its own sampling error, and the interval must widen to pay for that second layer of uncertainty. The t distribution does the widening automatically, with heavier tails that are fattest at small samples and that melt toward the normal shape as the degrees of freedom, df = n − 1, grow.
The size of the difference is worth seeing numerically. At 95% confidence, the z critical value is 1.960 at every sample size. The t critical value is 2.262 at df = 9 (n = 10), 2.045 at df = 29 (n = 30), 1.984 at df = 99 (n = 100), and it reaches 1.960 only in the limit of an infinite sample. So at n = 10, using z when you should use t understates the margin of error by about 13% and produces an interval whose real capture rate is well below 95% — a quiet, common way to overclaim precision. At n = 100 the penalty for using t is tiny, about 1%, which is why the safe habit is simple: estimated standard deviation, use t; genuinely known population standard deviation — a calibrated instrument specification, a long-established process value — z is legitimate.
This calculator makes the choice explicit rather than hiding it, and raw-data mode removes it altogether: because the standard deviation there is computed from the pasted data, t is always used. In summary mode the method selector defaults to t, and if you switch to z the results panel still reports the degrees of freedom that t would have used, so a reader can see both critical values and judge the choice for themselves.
Confidence interval for a proportion: the Wald method
For a proportion, the estimate is p̂ = x ÷ n — successes divided by trials — and the standard error has a shape worth understanding: SE = √(p̂(1 − p̂) ÷ n). The p̂(1 − p̂) term is largest at p̂ = 0.5 and shrinks toward 0 as the proportion approaches 0 or 1, which says something real: a near-unanimous sample genuinely does pin the proportion down more tightly than a fifty-fifty split of the same size, at least while the normal approximation behind the formula holds. The Wald interval is then the familiar p̂ ± z × SE, with z from the table below — there is no t version in standard use, because the proportion's standard error is computed from p̂ itself rather than from a separately estimated spread.
On the pre-filled counts: 200 successes in 400 trials gives p̂ = 0.500, a standard error of √(0.5 × 0.5 ÷ 400) = √0.000625 = 0.025, and at 95% confidence a margin of error of 1.960 × 0.025 = 0.049. The interval is (0.451, 0.549) — in percentage terms, roughly 45.1% to 54.9%. This is the arithmetic behind every "±4.9 points" attached to a poll of 400, and behind the rule of thumb that a sample of about 1,000 gives a margin near ±3.1 points at p̂ = 0.5: the standard error there is √(0.25 ÷ 1000) ≈ 0.0158, and 1.960 × 0.0158 ≈ 0.031.
The Wald interval's weakness is the approximation it is built on. It pretends the sampling distribution of p̂ is a tidy normal curve centred at p̂, which fails when the true proportion is near 0 or 1 or the sample is small: the interval can spill below 0 or above 1 — impossible values for a proportion — and, worse, its true capture rate can sag far below the stated level even when the interval looks respectable. The usual rule of thumb asks for at least 5, and preferably 10, expected successes and failures before trusting it. This calculator checks both counts, warns visibly when either is small, and offers the method in the next section, which was designed to fix exactly these failures.
The Wilson score interval: the safer proportion method
The Wilson score interval starts from the test rather than from the estimate. Instead of asking "which values sit within z standard errors of p̂, with the standard error computed at p̂?", it asks "for which candidate values of the true proportion would p̂ not look surprising?" — computing the standard error at each candidate value instead of at p̂. Solving that question gives an interval with two visible differences: its centre is pulled slightly from p̂ toward 0.5, by an amount that matters for small samples and fades as n grows, and its endpoints can never leave the range 0 to 1, because the construction itself respects the boundary.
On large, central samples the two methods nearly agree, which is a good check rather than a disappointment. For 200 successes in 400 trials at 95%, Wilson gives (0.451, 0.549) to three decimals — the same rounded endpoints as Wald, with a centre of exactly 0.500 because p̂ already sits at the pull target. Move to a harder case — 3 successes in 40 trials, p̂ = 0.075 — and they separate: Wald gives about (−0.007, 0.157), including an impossible negative endpoint, while Wilson gives about (0.026, 0.199), entirely inside the possible range and centred higher, reflecting how little a count of 3 can rule out. Simulation studies consistently find Wilson's capture rate stays close to the stated level in exactly the small-sample, extreme-proportion territory where Wald's collapses, which is why many statisticians recommend Wilson (or its Agresti–Coull cousin) as the default for proportions.
When should you still report Wald? When your audience, textbook or field convention expects it and the sample is comfortably large with p̂ well away from the edges — there, the methods agree to rounding and familiarity wins. When n is small, when p̂ is below about 0.1 or above 0.9, or when a Wald endpoint leaves 0 to 1, Wilson is the defensible choice, and the method used should be named in the report either way. This calculator labels every proportion result with its method and prints both the centre and the half-width for Wilson, so the slight shift away from p̂ never happens silently.
z critical values by confidence level
The critical value is the hinge of the whole calculation: it converts the confidence level you chose into the multiplier applied to the standard error. For the normal distribution it is the z score that leaves half of the remaining probability in each tail — at 95% confidence, 2.5% above it and 2.5% below its negative. The values below are the ones this calculator uses for z intervals and for both proportion methods; the custom-level option computes any other level from the same inverse normal calculation rather than from a longer printed table.
| Confidence level | α (total in both tails) | α ÷ 2 (each tail) | z critical value |
|---|---|---|---|
| 80% | 0.20 | 0.10 | 1.282 |
| 85% | 0.15 | 0.075 | 1.440 |
| 90% | 0.10 | 0.05 | 1.645 |
| 95% | 0.05 | 0.025 | 1.960 |
| 98% | 0.02 | 0.01 | 2.326 |
| 99% | 0.01 | 0.005 | 2.576 |
| 99.9% | 0.001 | 0.0005 | 3.291 |
Read the table as a price list. Moving from 90% to 95% confidence raises the multiplier from 1.645 to 1.960 — about 19% more width for five more points of capture rate. Moving from 95% to 99% costs another 31%, and 99.9% costs 68% more width than 95%. Nothing about the data changes across those rows; you are simply buying a stronger procedural promise with the only currency available, width. The t critical values follow the same pattern at every degrees-of-freedom value, sitting above the z row and settling down onto it as df grows — at df = 99 the 95% t value is 1.984 against z's 1.960.
What makes an interval wide or narrow
Three levers, and only three, set the width of a mean interval: the confidence level, the standard deviation, and the sample size. The level's effect is in the table above. The standard deviation's effect is linear and unforgiving — data twice as spread out give an interval twice as wide, and no cleverness with the formula changes that, because the spread is a property of the thing being measured. The sample size's effect is the famous square-root law: the standard error divides by √n, so doubling precision requires four times the data, and halving the margin of error on a study that already has 400 observations means recruiting 1,600. This is why pilot studies so often disappoint: an interval from n = 25 is not a slightly fuzzy version of the n = 400 interval, it is four times as wide.
For proportions there is a fourth consideration: where p̂ sits. The standard error peaks at p̂ = 0.5, so a poll split down the middle carries the maximum margin of error for its n, and published poll margins are conventionally quoted at exactly that worst case. A proportion estimated at 0.9 from the same n has a standard error only 60% as large. But treat that narrowing cautiously near the edges — it is precisely there that the Wald approximation is least trustworthy, and the Wilson interval, which does not narrow as eagerly, is the more honest reporter.
A wide interval is information, not failure. It says the data, at the stringency you chose, are compatible with a broad range of values — and reporting it plainly is what separates an estimate from a guess dressed in decimals. The dishonest responses to width are choosing a lower confidence level after seeing the result, quietly switching methods until an endpoint crosses a line you wanted crossed, or reporting the point estimate alone. The honest responses are collecting more data, or publishing the wide interval and letting the conclusion be as tentative as the evidence.
Worked examples, fully checked
Example 1 — a mean with z. A process has a long-established standard deviation of 10, and a fresh sample of 100 gives a mean of 50. Standard error: 10 ÷ √100 = 1.000. Critical value at 95%: 1.960. Margin of error: 1.960. Interval: (48.04, 51.96). In the calculator: mean mode, summary input, method z, level 95% — the hero result reads (48.04, 51.96) and the margin-of-error pill reads 1.960.
Example 2 — the same numbers with t. Now suppose the 10 was the sample standard deviation of those same 100 observations rather than a known process value. Degrees of freedom: 99. Critical value: about 1.984. Margin of error: about 1.984. Interval: (48.02, 51.98). The interval widened by roughly 0.024 in total — the small, exact price of estimating the spread. In the calculator, only the method selector changes.
Example 3 — a proportion, both methods. 200 of 400 surveyed customers say they would buy again. p̂ = 0.500, standard error 0.025. Wald at 95%: margin 0.049, interval (0.451, 0.549). Wilson at 95%: centre 0.500, half-width about 0.049, interval (0.451, 0.549) to three decimals. The agreement is the lesson: at n = 400 with p̂ at the centre, method choice barely matters. Example 4 — where it matters. 3 of 40 trial parts fail: p̂ = 0.075. Wald gives about (−0.007, 0.157) and triggers this page's below-range warning; Wilson gives about (0.026, 0.199). Same data, same level — one interval contains an impossible value and understates the plausible failure rate, the other does neither.
Common mistakes
Stating the probability interpretation as fact. "There is a 95% probability the true mean is in this interval" misstates what the procedure delivers, for the reasons in the interpretation section above. Say "95% confident," and know what the shorthand stands for. Using z with a small sample and an estimated standard deviation. At n = 10 the z interval's real capture rate falls well short of 95%; the t critical value exists precisely to prevent this. Confusing the standard deviation with the standard error. Multiplying the critical value by s instead of s ÷ √n inflates the interval by a factor of √n — at n = 100, a tenfold-too-wide interval that usually gets "fixed" by quietly dropping the formula instead of finding the error.
Reading overlap wrongly. Two group intervals that overlap are routinely declared "not significantly different" — but the comparison of two means has its own standard error, and intervals can overlap while the difference between the means is still statistically distinguishable, or fail to overlap in ways that mislead in the other direction. Compare groups with a method built for the comparison, such as the T-Test Calculator, not by eyeballing two intervals. Choosing the level or method after seeing the result. An interval shopped for until it excludes (or includes) a favoured value is no longer the procedure whose capture rate is printed on it. Decide the level and method first — ideally before the data arrive — and report the decision with the result.
Forgetting the sample behind the interval. Every formula on this page assumes the sample was drawn in a way that makes repeated-sampling language meaningful. A convenience sample, a self-selected poll or measurements with a broken instrument produce intervals that are arithmetically correct and inferentially worthless. The interval quantifies sampling wobble only; it says nothing about bias, and no width adjustment inside this calculator can price bias in.
Honest limits: what this calculator does not do
This calculator builds the standard one-sample intervals for a mean and for a proportion, and it is worth being exact about what sits outside that fence. It does not build intervals for a difference between two means or two proportions, intervals for a standard deviation or variance, prediction intervals for a single future observation (a different, wider construction), or tolerance intervals. It does not bootstrap: for badly skewed raw data at small n, a bootstrap interval from statistical software can behave better than the t interval given here, and the t result should be read as the standard textbook answer rather than the last word. It does not apply a finite population correction, so if your sample is a substantial fraction of the whole population — more than about 5–10% — the true standard error is slightly smaller than the one used here and the interval is mildly conservative.
Nothing on this page is labelled AI, because nothing here is: the critical values come from inverse normal and inverse t calculations, the Wilson endpoints from the closed-form score formula, and every figure can be reproduced from the formulas in this guide with a hand calculator and a critical-values table. The calculator also cannot judge whether your sample deserved an interval at all — representativeness, independence and honest measurement are upstream of any formula. Within those limits, what it does do is show its working completely: estimate, standard error, critical value, degrees of freedom where they apply, margin of error and method, on every single result.
Sources and References
- NIST/SEMATECH e-Handbook of Statistical Methods — What are confidence intervals? (7.1.4) — the US National Institute of Standards and Technology reference defining a confidence interval and its repeated-sampling interpretation, which this page's interpretation section follows.
- NIST/SEMATECH e-Handbook of Statistical Methods — Confidence Limits for the Mean (1.3.5.2) — the handbook's procedure for confidence limits on a mean, including the t-based limits used when the standard deviation is estimated from the sample.
- NIST/SEMATECH e-Handbook of Statistical Methods — Normal Distribution (1.3.6.6.1) — the reference for the normal distribution behind the z critical values in the table on this page.
- NIST/SEMATECH e-Handbook of Statistical Methods — t Distribution (1.3.6.6.4) — the reference for the t distribution, its degrees of freedom and its convergence to the normal distribution, behind the t critical values.
- OpenStax (Rice University) — Introductory Statistics 2e — the free peer-reviewed textbook whose chapter on confidence intervals defines the single-mean and single-proportion intervals this calculator implements.
- Wikipedia — Confidence interval — the reference summary of the confidence interval, its frequentist interpretation and the common misinterpretations this page is careful to avoid.
- Wikipedia — Wilson score interval — the reference for the Wilson score interval for a proportion: its derivation from the score test, its centre shift toward 0.5, and its coverage behaviour compared with the Wald interval.
Source verification note: all seven sources above returned HTTP 200 to a direct check on 24 November 2026. Substitution disclosed: the Penn State STAT 200 confidence-interval lesson pages originally considered could not be verified (the host returned no response to direct checks), so the NIST Product and Process Comparisons chapter (7.1.4) and the OpenStax textbook above are used instead. No source that could not be verified is cited.