Concept Explainer

Confidence Interval Formula: Every Version You Need

Every confidence interval is the same line: point estimate ± critical value × standard error. The hard part is choosing between z and t, and almost every page-one result gets that choice wrong by telling you to switch at n = 30, when R, Stata and SPSS all use t no matter how large the sample.

Statistics 8 min read Updated Aug 2026

The confidence interval formula is a single line: point estimate ± critical value × standard error. Every version taught in an introductory statistics course is that same line with different pieces swapped in, and the exact critical value for 95% confidence is 1.959964, not 2.

Exact z at 95%
1.9600
1.959964 unrounded
t at df = 24
2.0639
Same 95%, sample of 25
Library coverage
11 of 316
Courses with a CI module

What Is the Confidence Interval Formula?

A confidence interval estimates an unknown population value from a sample. The formula has three parts, and only one of them causes trouble.

The point estimate is what the sample reports: a mean, a proportion, a difference between two groups. The standard error measures how far that estimate would drift across repeated samples of the same size.

The critical value converts a confidence level into a multiplier. It is the part that changes depending on what you know.

Written in full: estimate ± critical value × standard error.

Change the parameter and the standard error changes with it. Change the confidence level and only the critical value moves. Everything after this point is selection, not arithmetic.

Where Does 1.96 Actually Come From?

1.96 is the 97.5th percentile of the standard normal distribution. A 95% interval leaves 5% of the distribution outside it, split evenly into 2.5% per tail, which puts the cut points at ±1.959964.

The confusion starts with the empirical rule, which says roughly 95% of a normal distribution falls within two standard deviations of the mean.

Two is the rounded version. 1.96 is the exact one.

Rounding up to 2 quietly turns a 95% interval into a 95.45% interval. On a standard error of 3, that adds 0.12 units to each side, which is enough to flip a marked answer.

Level Alpha z* t* df=24 t* df=99
80% 0.20 1.2816 1.3178 1.2902
90% 0.10 1.6449 1.7109 1.6604
95% 0.05 1.9600 2.0639 1.9842
98% 0.02 2.3263 2.4922 2.3646
99% 0.01 2.5758 2.7969 2.6264
Moving from 95% to 99% confidence costs 31% more width; moving from a sample of 100 to a sample of 25 costs only 4%. Source: standard normal and Student's t quantile functions, computed August 2026.

Read the z column and the t column side by side. The penalty for a small sample is smaller than most students expect, and the penalty for demanding more confidence is larger. Keep these five rows within reach during an exam, or pull them from the Statistics 101 cheatsheet.

How Do You Calculate a 95% Interval?

Take a concrete case. A sample of 25 exam scores has a mean of 100 and a standard deviation of 15. The task is a 95% confidence interval for the true class mean.

Start with the standard error. Divide the sample standard deviation by the square root of the sample size: 15 ÷ √25 = 3.

Then the critical value. The population standard deviation is unknown, and the 15 came from the sample itself, so the distribution is Student's t with degrees of freedom equal to n − 1, which is 24. At 95% confidence, t* = 2.0639.

Multiply for the margin of error: 2.0639 × 3 = 6.19.

Apply it in both directions. 100 ± 6.19 gives an interval of 93.81 to 106.19.

Z-INTERVAL
94.12–105.88
z* = 1.9600 · width 11.76 · assumes σ known
T-INTERVAL
93.81–106.19
t* = 2.0639 · width 12.38 · σ estimated from data

The same mean, the same standard deviation, the same sample. The two intervals differ by 0.62 units of total width, and the t version is 5.3% wider.

That gap is not a rounding artefact. It is the cost of having estimated the population spread from 25 observations rather than knowing it outright.

Marks are usually lost at step two, not step one. Students compute the standard error correctly, then reach for 1.96 out of habit because it is the number they memorised.

When Should You Use t Instead of z?

Nearly every page-one result for this query gives the same rule: use t below n = 30, switch to z above it. Several statistics calculators automate the switch at that exact threshold.

The rule is a relic. Printed t-tables commonly stopped at df = 30, so textbooks told readers to substitute the normal beyond that point.

The statistical answer is shorter. If σ is unknown, use t. Sample size does not enter the decision.

The shortcut survives because the two distributions converge. At df = 99, t* is 1.9842 against a z* of 1.9600, a difference of 1.2%. At df = 199 it falls to 1.9720.

The gap narrows forever without closing. It simply stops mattering once you report to two decimal places.

Statistical software resolved this long ago. None of the four packages below changes distribution at any sample size.

Package Default call Distribution at n = 200
R t.test(x) Student's t, df = 199
Python, statsmodels tconfint_mean() Student's t; the z version needs an explicit second call
Stata ci means x Student's t, stated in the manual
IBM SPSS EXAMINE (Explore) Student's t
No mainstream package implements an n = 30 switch. Source: vendor manuals and documentation, checked August 2026.

Stata's ci manual entry states directly that confidence intervals for normal data rest on the t distribution rather than the standard normal. IBM's own support forum records the same behaviour for the SPSS Explore procedure, in a thread where a user got a narrower interval by hand and was told the software was right.

If a marking scheme demands the z shortcut, follow the marking scheme. Outside that room, use t.

From AskSia's online library
Across the 316 university courses with published topic maps in the AskSia Explore library, 11 carry a dedicated confidence-interval module, spanning economics, business statistics, mathematics, and population health. All 11 sit in courses that also teach hypothesis testing or inference in the same map, and 9 of the 11 pair the interval module directly with a sampling-distributions or central-limit-theorem module. The pattern says something practical: no faculty teaches intervals as a standalone formula. The ECMT1010 study bible on confidence intervals and the bootstrap shows the full sequence, and running your own unit through AskSia's Concept Map reveals which prerequisite module your interval questions are actually testing.

Which Formula Fits Which Parameter?

Exams rarely ask you to recall the formula. They ask you to pick one, usually from a word problem that hides which parameter is being estimated.

Five versions cover almost everything in a first-year unit.

Parameter Formula Critical value Gate
Mean, σ known x̄ ± z* × σ/√n Standard normal σ genuinely given, not estimated
Mean, σ unknown x̄ ± t* × s/√n t, df = n − 1 The default case
Proportion p̂ ± z* × √(p̂(1−p̂)/n) Standard normal np̂ ≥ 5 and n(1−p̂) ≥ 5
Difference of means (x̄₁ − x̄₂) ± t* × SE(diff) t, Welch df Independent groups only
Paired difference d̄ ± t* × s(d)/√n t, df = n − 1 Same units measured twice
The gate column is where marks are lost, not the formula column. Source: standard introductory inference syllabi, August 2026.

Two rows deserve extra attention. The proportion interval fails quietly when p̂ sits near 0 or 1, because the Wald formula can produce a lower bound below zero or an upper bound above 100%.

The paired row catches students who see two columns of numbers and reach for the two-sample formula. If each row of data is the same person, animal, or firm measured twice, collapse the columns into one column of differences first.

Condensing this table into a single revision card is exactly what Sia Note does with a 40-page chapter: concept, gate condition, one worked example per row.

How Do You Read a Confidence Interval?

An interval of 93.81 to 106.19 does not mean there is a 95% probability the true mean lies inside it. The true mean is a fixed number. It is either in there or it is not.

The 95% describes the procedure, not this one interval.

Repeat the study 100 times, build a 95% interval each time, and roughly 95 of those intervals will capture the true value. The confidence attaches to the method across repetitions, which is why the idea is easier to see through repeated simulation than through algebra.

This distinction shows up in exams as a multiple-choice trap with four near-identical wordings. The wrong options all place probability on the parameter rather than on the procedure.

A second reading habit matters more in practice. Width carries information. An interval of 4.9 to 5.1 and an interval of 0.2 to 9.8 can share a point estimate and tell completely different stories about how much the sample knows.

When Does the Formula Break Down?

The formula assumes a random sample. No critical value repairs a sample drawn from whoever answered the email.

Skew and heavy tails degrade coverage. Stata's documentation warns that departures from normality can drastically affect the true coverage of normal-based intervals for variances and standard deviations, and advises checking the distribution before building one.

The proportion interval has a hard floor. With np̂ below 5, the Wald formula is unreliable, and alternatives such as the Wilson or Clopper-Pearson intervals exist for that reason.

Small samples of skewed data are the worst case. Bootstrap intervals, taught in units such as USyd's DATA1001, resample the data directly instead of assuming a shape.

One limit is worth conceding plainly. A confidence interval quantifies sampling error and nothing else. Measurement error, non-response, and a badly worded survey question all sit outside the formula, and none of them widen the interval to warn you.

Frequently Asked Questions

How do you calculate a 95% confidence interval?

Four steps. Compute the point estimate from the sample. Compute the standard error, which for a mean is the sample standard deviation divided by the square root of n. Find the critical value at 95% confidence, which is t with n − 1 degrees of freedom whenever the population standard deviation is unknown. Multiply critical value by standard error to get the margin of error, then add and subtract it from the point estimate. Worked through: a sample of 25 with a mean of 100 and a standard deviation of 15 gives a standard error of 3, a critical value of 2.0639, a margin of error of 6.19, and an interval of 93.81 to 106.19. Write the interval with the same number of decimal places as the original data. Practise the full sequence against timed questions in AskSia's Mock Exam mode, which grades each step separately rather than only the final answer.

How do you get 1.96 for a 95% confidence interval?

1.96 is the 97.5th percentile of the standard normal distribution, carried to more decimal places as 1.959964. For 95% confidence you exclude 5% of the distribution, split into 2.5% in each tail, so you need the z value with 2.5% of the area beyond it. That is 1.96. Reading a z-table, you look for a cumulative probability of 0.9750, which sits at the intersection of row 1.9 and column 0.06. The number is often confused with the empirical rule, which approximates the same idea using two standard deviations rather than 1.96. Using 2 instead of 1.96 produces a 95.45% interval, not a 95% one. If the population standard deviation is unknown, 1.96 is the wrong multiplier entirely and you need t instead. Ask AskSia's AI tutor to derive the value from the tail areas rather than memorising it, since the same reasoning generates the 90% and 99% multipliers.

What is the formula for calculating a confidence interval?

Point estimate ± critical value × standard error. Every variant follows that structure. For a mean with an unknown population standard deviation, it becomes x̄ ± t* × s/√n with df = n − 1. For a proportion, it becomes p̂ ± z* × √(p̂(1−p̂)/n), valid only when np̂ and n(1−p̂) both reach 5. For the difference between two independent means, it becomes (x̄₁ − x̄₂) ± t* × the standard error of the difference, usually with Welch degrees of freedom. For paired data, collapse each pair into a single difference and apply the one-sample t formula to the differences. Five formulas cover almost every first-year question. The exam skill is identifying which parameter the word problem is estimating, not recalling the algebra. Map the five variants against your own unit outline using AskSia's Concept Map to see which two your assessment actually covers.

How do you interpret a 95% confidence interval?

The correct interpretation attaches the 95% to the procedure, not to the specific interval on your page. If the study were repeated many times and a 95% interval built each time, roughly 95% of those intervals would contain the true population value. This particular interval either contains it or it does not, with no ongoing probability involved. Saying there is a 95% chance the true mean lies between 93.81 and 106.19 is the single most common error, and multiple-choice questions test it deliberately with four near-identical options. A useful second habit is reading the width. An interval of 4.9 to 5.1 and one of 0.2 to 9.8 can share the same centre while carrying very different amounts of information. Interpretation questions carry heavy marks in AP Statistics free response, and the AP Statistics prep hub shows the exact wording graders accept.

What is the confidence interval formula for a proportion?

The Wald interval is p̂ ± z* × √(p̂(1−p̂)/n), where p̂ is the sample proportion. At 95% confidence, z* is 1.96. A survey of 500 people where 310 say yes gives p̂ = 0.62, a standard error of √(0.62 × 0.38 ÷ 500) = 0.0217, a margin of error of 0.0425, and an interval of 57.8% to 66.2%. The formula uses z rather than t, because there is no separate standard deviation being estimated. Two conditions gate it: np̂ ≥ 5 and n(1−p̂) ≥ 5. Below that threshold the interval can run past 0% or 100%, and the Wilson or Clopper-Pearson methods replace it. Check both conditions before you calculate, since an interval that violates them is wrong even when the arithmetic is right.

What sample size do you need for a ±3% margin of error?

About 1,068 respondents. Rearranging the proportion formula for n gives n = z*² × p̂(1−p̂) ÷ E², where E is the target margin of error. Using p̂ = 0.5, the most conservative value because it maximises the numerator, and z* = 1.96 for 95% confidence, the calculation is 3.8416 × 0.25 ÷ 0.0009 = 1,067.1, rounded up to 1,068. This is why national opinion polls so consistently report samples near 1,000 with a stated margin of about three percentage points. Halving the margin of error to ±1.5% requires roughly four times the sample, or 4,268 people, because n scales with the inverse square of E. Sample size planning questions appear in most business statistics finals, and the worked patterns sit alongside the interval modules in AskSia's Explore library.

Recommended

Study faster with AskSia

Turn course materials into clear notes, practice questions, and review plans.

Try AskSia