Confidence Interval Calculator

Calculate confidence intervals for a population mean (known or unknown σ) and population proportion at various confidence levels.

Type

Use z-distribution when population standard deviation σ is known.

95% Confidence Interval
(46.4215, 53.5785)
Margin of Error: ±3.5785  |  z* = 1.96

Results

PropertyValue
Sample mean (x̄)50
Critical value (z*)1.96
Standard Error (σ/√n)1.8257
Margin of Error±3.5785
Lower bound46.4215
Upper bound53.5785

Z* Critical Values

Confidence Levelz*α
80%1.28160.200
85%1.43950.150
90%1.64490.100
95%1.960.050
99%2.57580.010
99.5%2.8070.005
99.9%3.29050.001

Use 1.96 on a sample of 15 and the interval comes out about 9% too narrow, which makes the result look more certain than the data allows. With a sample mean of 50 and a sample standard deviation of 12, the correct 95% interval is 43.3546 to 56.6454; the 1.96 shortcut gives 43.9272 to 56.0728. The gap comes from using the normal distribution when the spread was estimated from the same small sample. This page has a separate tab for each situation, and the t tab computes its multiplier for your exact sample size.

Three tabs, three margin-of-error formulas

Mean (σ unknown), the t tab, loads with mean 50, a sample standard deviation (s) of 12 and Sample size (n) 15 at 95%. The page first finds the standard error, s / √n = 12 / 3.8730 = 3.0984. Degrees of freedom are n - 1 = 14, and the critical value t* for 14 df at 95% two-sided is 2.145 (exactly 2.1448). Margin of error = 2.1448 x 3.0984 = 6.6454, so the interval is 50 ± 6.6454, or 43.3546 to 56.6454. The results table lists the standard error, degrees of freedom, t*, the margin and both bounds.

The t value is computed from the t distribution for whatever n you enter, not looked up from a table with gaps, so n = 15 gives 2.145 and n = 30 gives 2.045. It shrinks toward the normal value as n grows: 2.776 at n = 5, 1.984 at n = 100 and 1.962 at n = 1000. At 99% with the same data the multiplier is 2.977 and the margin becomes 9.2234.

Mean (σ known), the z tab, uses the normal multiplier because the population spread is supplied from outside. Starting values are mean 50, σ 10, n 30: standard error 10 / √30 = 1.8257, margin 1.96 x 1.8257 = 3.5785, interval 46.4215 to 53.5785. Quadrupling the sample to 120 halves the margin, to 1.7892.

Proportion uses the normal approximation: p̂ ± z* √(p̂(1 - p̂) / n). With p̂ = 0.6 and n = 200 the standard error is √(0.24 / 200) = 0.0346, the margin is 1.96 x 0.0346 = 0.0679, and the interval is 0.5321 to 0.6679. Near 0 or 1 the approximation fails: p̂ = 0.02 with n = 50 would give a lower limit of -0.0188, which the page clips to 0, producing 0 to 0.0588. A clipped limit is a hint to use an exact method.

The Confidence Level list offers 80%, 85%, 90%, 95%, 99%, 99.5% and 99.9%, with z* values 1.2816, 1.4395, 1.6449, 1.96, 2.5758, 2.807 and 3.2905, and the same list is printed in the Z* Critical Values table with the matching α. The choice is shared by all three tabs. Sample size has to be a whole number, because a fraction of an observation has no meaning.

How to Use This Calculator

  1. Pick a tab: Mean (σ known), Mean (σ unknown) or Proportion. Use the middle tab whenever the spread was calculated from the same data.
  2. Choose a Confidence Level. The setting is shared by all three tabs, and the highlighted row in the Z* table follows it.
  3. Fill in that tab's fields: Sample mean (x̄) with the population (σ) or sample (s) standard deviation and Sample size (n); or Sample proportion (p̂) from 0 to 1 and Sample size (n).
  4. There is no Calculate button. The purple interval box and the Results table update as you type.
  5. If the Results card says "Enter values to calculate confidence interval.", an entry is invalid: a spread of 0 or less, n that is not a whole number or is below 1 (below 2 on the t tab), or p̂ outside 0 to 1.

Frequently Asked Questions

When does the Mean (σ known) tab apply?

Only when the population standard deviation comes from outside your sample, for example a long-established instrument specification. If you computed the spread from the same data as the mean, use the unknown tab; its t multiplier is wider, which matters most for small samples.

Is there a 95% chance the true mean sits inside the interval shown?

Not in the strict reading. The 95% describes the method: across many repeated samples, about 95% of intervals built this way would cover the true value. A single interval either does or does not.

Which t value does the page use for 14 degrees of freedom?

2.145 at 95%, 2.977 at 99% and 1.761 at 90%. The page works it out for the exact degrees of freedom you imply, so it matches a standard t table at every sample size rather than using the nearest listed row.

What happens to a proportion near 0 or 1 with a small sample?

The normal approximation breaks down and a limit can fall outside 0 to 1. The page clips it to 0 or 1, so p̂ = 0.02 and n = 50 shows 0 to 0.0588. Seeing a clipped limit means an exact method would be a safer choice.

How much extra data do I need to halve the interval?

Four times as much. In the z example, n = 30 gives a margin of 3.5785 and n = 120 gives 1.7892. Tripling the sample narrows the interval by only about 42%.