Confidence Interval Calculator

For a mean or a proportion, with margin of error and critical value

Mean mode
Mean mode
%
Proportion mode — e.g. 52% of respondents said yes
Confidence interval—
Margin of error (±)—
Critical value—
Standard error—
Comparison—
🎰 15 Global Lotteries + 12 Smart Number Pickers
Powerball · Mega Millions · EuroMillions · UK Lotto — Zodiac, Birthday, Dream, AI & more

What a confidence interval means

A confidence interval gives a range of plausible values for something you cannot measure directly — the average of a whole population or the true share of voters who back a candidate — based on a sample. A 95% confidence level means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true value.

Formulas and examples

  • Mean: x̄ ± t × s ÷ √n, where t comes from the t distribution with n − 1 degrees of freedom (the method in the NIST/SEMATECH e-Handbook of Statistical Methods).
  • Proportion: p̂ ± z × √(p̂(1 − p̂) ÷ n), with z = 1.645, 1.960 or 2.576 for 90%, 95% or 99%.

Example (mean): 36 students average 72 points with a standard deviation of 10. The standard error is 10 ÷ 6 = 1.667, t for 35 degrees of freedom at 95% is 2.030, so the margin is ±3.384 and the interval is 68.62 to 75.38.

Example (poll): 52% of 1,000 adults say yes. The margin is 1.96 × √(0.52 × 0.48 ÷ 1,000) = ±3.10 points, so the interval is 48.9% to 55.1%.

Reading poll margins of error

U.S. election polls usually report the maximum margin of error, calculated at p = 50%. For 1,000 respondents at 95% confidence that is about ±3.1 points. Keep in mind:

  • The gap between two candidates is less certain than either number. A 48% vs. 45% race with a ±3.1-point margin is not a clear lead.
  • Subgroups have bigger margins. If only 250 of the 1,000 respondents are under 35, the margin for that group is about ±6.2 points.
  • Sampling error is not the only error. Non-response, question wording and weighting can move results more than the stated margin.

Choosing the level and sample size

A higher confidence level gives a wider interval; a larger sample gives a narrower one — but the margin only shrinks with the square root of n, so cutting it in half takes four times the sample. To plan a survey, use the sample size calculator; to get the standard deviation from raw data, use the standard deviation calculator.

Sources

Last checked: 2026-10-27

Frequently Asked Questions

What does a 95% confidence interval mean?
If you repeated the same sampling many times, about 95% of the intervals calculated this way would contain the true population value. It does not mean there is a 95% probability that this particular interval contains it.
When should I use t instead of z?
Use t for a mean whenever the standard deviation is estimated from the sample, especially for small samples. For large samples t and z are almost identical. Proportions use z.
How do you calculate the margin of error for a poll?
Margin = z × √(p(1 − p) ÷ n). At 95% confidence (z = 1.96) with 1,000 respondents and p = 50%, it is about ±3.1 percentage points.
Why is my confidence interval so wide?
A small sample, high variability or a high confidence level all widen the interval. Quadrupling the sample size halves the margin of error.
What is the z-score for a 90%, 95% and 99% confidence interval?
1.645 for 90%, 1.960 for 95% and 2.576 for 99% (two-sided).

Bookmarks