Mortgage & Loans

Investing & Retirement

Salary, Tax & Business

India Finance

Health & Fitness

Math & Statistics

Date, Time & Everyday

Home, Construction & Science

Unit Converters

Confidence Interval Calculator

Find the confidence interval and margin of error for a sample mean or a sample proportion at 90%, 95%, 99% or any other confidence level.

Free, no sign-upPrivate — runs in your browserUpdated October 2026
Live
Interval for a
%
95% confidence interval
46.2659 – 53.7341
50 ± 3.7341
Margin of error
± 3.7341
Standard error of the means ÷ √n
1.8257
Critical value t*t-distribution, 29 degrees of freedom
2.0452
z* would be
1.9600
Step-by-step solution
  1. Inputs: x̄ = 50, s = 10, n = 30, confidence = 95% (α = 0.05).
  2. Critical value: t* with n − 1 = 29 degrees of freedom and α/2 in each tail = 2.0452.
  3. Standard error: SE = s ÷ √n = 10 ÷ √30 = 1.8257.
  4. Margin of error: ME = t* × SE = 2.0452 × 1.8257 = 3.7341.
  5. Interval: x̄ ± ME = 50 ± 3.7341 → 46.2659 to 53.7341.

Interval at other confidence levels

Levelt*Margin of errorInterval
80%1.3114± 2.394347.6057 – 52.3943
90%1.6991± 3.102246.8978 – 53.1022
95%2.0452± 3.734146.2659 – 53.7341
98%2.4620± 4.49545.505 – 54.495
99%2.7564± 5.032444.9676 – 55.0324
99.9%3.6594± 6.681143.3189 – 56.6811
At a glance

Find the confidence interval and margin of error for a sample mean or a sample proportion at 90%, 95%, 99% or any other confidence level.

FormulaMean: x̄ ± t* × s ÷ √n   |   Proportion: p̂ ± z* × √[ p̂(1 − p̂) ÷ n ]
Also searched asmargin of error calculator · ci calculator · 95 confidence interval · t interval · z interval · proportion confidence interval

How to use the confidence interval calculator

Choose whether you are estimating a mean (an average such as height, spend or test score) or a proportion (a percentage such as the share of voters supporting a candidate). For a mean, enter the sample mean, the standard deviation and the sample size. For a proportion, enter the sample percentage and the sample size. Then set the confidence level — 95% is the convention in most fields. The calculator returns the interval, the margin of error, the standard error and the critical value, with a table showing how the interval widens or narrows at other confidence levels.

By default the mean interval uses the t-distribution, which is correct when the standard deviation comes from the sample itself. Tick the box only if the population standard deviation is genuinely known in advance, in which case the normal (z) distribution is used.

Confidence interval formulas

Mean: x̄ ± t* × s ÷ √n   |   Proportion: p̂ ± z* × √[ p̂(1 − p̂) ÷ n ]
  • x̄ or p̂ — the sample mean or sample proportion (the point estimate)
  • s — the sample standard deviation; n — the sample size
  • t* or z* — the critical value that leaves α/2 in each tail, where α = 1 − confidence level
  • The part after the ± sign is the margin of error.

Worked example

A sample of 30 delivery times has a mean of 50 minutes and a standard deviation of 10 minutes. The standard error is 10 ÷ √30 ≈ 1.826. With 29 degrees of freedom, the 95% critical t-value is 2.0452, so the margin of error is 2.0452 × 1.826 ≈ 3.73 minutes. The 95% confidence interval is therefore about 46.27 to 53.73 minutes. Had we used z* = 1.96 instead, the interval would be slightly narrower (±3.58), understating the uncertainty that comes from estimating the standard deviation.

For a proportion: if 52% of 1,000 people surveyed say yes, the standard error is √(0.52 × 0.48 ÷ 1000) ≈ 0.0158, and the 95% margin of error is 1.96 × 0.0158 ≈ ±3.1 percentage points, giving an interval of 48.9% to 55.1%.

What a confidence interval really means

A 95% confidence interval comes from a procedure that captures the true population value in 95% of repeated samples. It is not quite right to say "there is a 95% probability the true mean is in this particular interval" — the true mean is fixed, and the interval either contains it or not. In practice, the interval gives a range of plausible values for the population parameter, and its width shows how precise your estimate is.

Tip: To halve the margin of error you need about four times the sample size, because the standard error shrinks with the square root of n. Use the sample size calculator to plan a study with a target margin of error.

Choosing the confidence level

Higher confidence means a wider interval. Moving from 95% to 99% increases the critical value from 1.96 to 2.576 (for large samples), widening the interval by about a third. Lower levels such as 90% give tighter ranges but are wrong more often. Medical and engineering work sometimes uses 99%; business and social research typically use 95% or 90%.

Assumptions and caveats

  • Random sampling. No formula can fix a biased sample. A large but unrepresentative survey still gives a misleading interval.
  • Normality. The t-interval assumes the data is roughly normal or the sample is large enough (often n ≥ 30) for the central limit theorem to apply. Strongly skewed small samples need other methods.
  • Proportions near 0% or 100%. The simple (Wald) formula breaks down when n·p̂ or n·(1 − p̂) is below about 10. The calculator therefore also shows the Wilson score interval, which stays accurate in those cases.
  • Finite populations. If you sample more than about 5% of a small population, the true margin of error is a little smaller than shown.

If you only have raw data, compute the mean and standard deviation first with the standard deviation calculator. To see where a single observation falls relative to the mean, use the z-score calculator.

Built and reviewed by the Calcivia editorial team following our editorial policy · Last updated .
Cite or link to this page

Using this confidence interval calculator in an article, report or homework? Copy a citation or a ready-made link:

APACalcivia. (2026). Confidence Interval Calculator. Retrieved October 31, 2026, from https://www.calcivia.com/confidence-interval-calculator/
MLA"Confidence Interval Calculator." Calcivia, 2026, https://www.calcivia.com/confidence-interval-calculator/. Accessed 31 Oct. 2026.
HTML link<a href="https://www.calcivia.com/confidence-interval-calculator/">Confidence Interval Calculator</a> by Calcivia
Was this calculator helpful?

Frequently asked questions

How do you calculate a 95% confidence interval?

Take the sample mean and add and subtract the margin of error: the critical value (about 1.96 for large samples, or the t-value for n − 1 degrees of freedom) multiplied by the standard error, s ÷ √n.

When should I use t instead of z?

Use t whenever the standard deviation is estimated from the sample, which is almost always. Use z only when the population standard deviation is known, or for proportions. For samples above about 100 the two give nearly identical results.

What is the margin of error?

The margin of error is the half-width of the confidence interval — the amount added to and subtracted from the estimate. A poll reporting 52% ± 3% has a margin of error of 3 percentage points.

Why does a larger sample give a narrower interval?

The standard error equals the standard deviation divided by the square root of n, so more data reduces uncertainty. Quadrupling the sample size halves the margin of error.

What does 95% confidence actually mean?

It means that if you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population value.

Related calculators