Free Online Calculator

Confidence Interval Calculator

Find a confidence interval for a mean or a proportion.

Last updated: Free, no sign-up Private — runs in your browser

Quick answer: a 95% confidence interval

Mean ± critical value × standard error. For n = 25, mean 50 and s = 10 the 95% interval is (45.87220288, 54.12779712).

Overview of the Confidence Interval Calculator

A confidence interval gives a range likely to contain the true population value. For a mean, enter the sample size, mean and standard deviation and choose the t-distribution (σ unknown) or z (σ known). For a proportion, enter the successes and sample size to get both the Wilson and Wald intervals. Each result shows the margin of error and critical value.

Wider intervals mean more uncertainty; larger samples narrow them — plan with the Sample Size Calculator. Related: Z-Score Calculator, P-Value Calculator, Standard Deviation Calculator and Statistics Calculator.

How We Calculate

The calculator applies the standard method step by step.

  1. Mean: standard error = s ÷ √n.
  2. Critical value: t with n − 1 degrees of freedom (or z if σ is known) for the chosen confidence level.
  3. Margin of error = critical value × standard error; interval = mean ± margin.
  4. Proportion: p̂ = x ÷ n; the Wilson interval is (p̂ + z²/2n ± z√(p̂(1 − p̂)/n + z²/4n²)) ÷ (1 + z²/n).
  5. Wald: p̂ ± z × √(p̂(1 − p̂) ÷ n).
CI = x̄ ± t* × s ÷ √n   proportion p̂ ± z* √(p̂(1 − p̂) ÷ n)
Worked example — confidence interval calculator
ItemValue
Sample mean50
Standard error (s ÷ √n)2
Distribution usedt with 24 degrees of freedom
Critical value2.0638986
Margin of error4.127797123
Lower bound45.87220288
Upper bound54.12779712
95% interval for mean 50, s = 10
Sample size95% interval
n = 10(42.84643094, 57.15356906)
n = 25(45.87220288, 54.12779712)
n = 50(47.15803145, 52.84196855)
n = 100(48.01578305, 51.98421695)
n = 400(49.01703635, 50.98296365)
Critical z-values by confidence level
Confidence levelαCritical z (two-tailed)
80%0.21.2816
85%0.151.4395
90%0.11.6449
95%0.051.9600
98%0.022.3263
99%0.012.5758
99.9%0.0013.2905
Two-tailed critical t-values
Degrees of freedom95% (α = 0.05)99% (α = 0.01)
112.706263.6567
24.30279.9248
52.57064.0321
102.22813.1693
202.08602.8453
302.04232.7500
602.00032.6603
1201.97992.6174
∞ (z)1.96002.5758

Confidence Interval Calculator — Frequently Asked Questions

What is a confidence interval?

A range of values, computed from a sample, that is likely to contain the true population value at a stated confidence level.

What does 95% confidence mean?

If you repeated the study many times, about 95% of the intervals would contain the true value.

When do I use t instead of z?

Use t when the population standard deviation is unknown (almost always); z when it is known or the sample is very large.

What is the margin of error?

Half the width of the interval: critical value × standard error.

Which interval is best for a proportion?

The Wilson interval is more reliable than the simple Wald interval, especially for small samples or proportions near 0 or 1.

How can I make the interval narrower?

Increase the sample size, accept a lower confidence level, or reduce variability.

How is the confidence interval calculator calculated?

It uses the standard method: CI = x̄ ± t* × s ÷ √n   proportion p̂ ± z* √(p̂(1 − p̂) ÷ n) The full working and a worked example are shown on this page.

How accurate is this calculator?

Decimal results use standard double-precision arithmetic (about 15–16 significant digits). Tools that work with whole numbers — big numbers, factors, bases, combinations — use exact integer arithmetic, so no digits are lost.

Can I use it for homework or exams?

Yes for checking your work and learning the method. The steps and formula are shown so you can understand the answer, but follow your teacher's rules about calculators in exams.

Is my data stored?

No. Everything is calculated in your browser and nothing you enter is uploaded or saved.

More Free Calculators You May Need

Need a custom calculator or tool on your website?

Our team designs and develops fast, SEO-ready websites and web tools. Tell us what you need.

Call Us WhatsApp

Get a Free Quote

Tell us a bit about your project — we'll get back to you shortly.

8 + 8 =
Call WhatsApp