🎯 Confidence Interval Calculator

Confidence intervals for a mean or a proportion, the margin of error, and the sample size you need — with the critical value and every step.

Google Classroom Save to Pinterest Email me

Confidence interval formulas

  • Mean (σ unknown): x̄ ± t* · s ÷ √n, with df = n − 1
  • Mean (σ known): x̄ ± z* · σ ÷ √n
  • Proportion: p̂ ± z* · √(p̂(1 − p̂) ÷ n)
  • Margin of error is the part after ±: critical value × standard error.

Worked examples

Mean. 40 students sleep a mean of 6.8 hours with s = 1.2. SE = 1.2 ÷ √40 = 0.190; t* (95%, df 39) = 2.023; margin = 0.384. 95% CI: 6.42 to 7.18 hours.

Proportion. 312 of 500 surveyed students use the library weekly. p̂ = 0.624; SE = √(0.624 × 0.376 ÷ 500) = 0.0217; margin = 1.96 × 0.0217 = 0.042. 95% CI: 58.2% to 66.6%.

Sample size. For ±3 percentage points at 95%: n = 1.96² × 0.25 ÷ 0.03² = 1,067.1 → 1,068 people. For a mean within ±3 points when σ ≈ 15: n = (1.96 × 15 ÷ 3)² = 96.04 → 97.

The meaning of a confidence level is explained in the lesson Confidence intervals. To test a claim instead, use the t-test calculator.

Commands: Excel =CONFIDENCE.T(alpha, sd, n) and =CONFIDENCE.NORM return the margin of error; TI-84 STAT → TESTS → 8:TInterval, 7:ZInterval, A:1-PropZInt.

Questions and answers

What does “95% confident” mean?

If you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population value. It does not mean there is a 95% chance the true mean is in this one interval — the true mean is fixed; the interval is what varies.

When do I use t and when z?

For a mean, use t with n − 1 degrees of freedom when you only have the sample SD (almost always). Use z only if the population SD σ is known, which is rare outside textbook problems. For a proportion, use z.

How do I make the interval narrower?

Take a bigger sample (the margin of error shrinks with √n — four times the sample halves the margin) or use a lower confidence level. Lower variability in the data also helps.

What is the Wilson interval?

A better interval for a proportion when the sample is small or p̂ is close to 0 or 1. The usual (Wald) interval p̂ ± z·√(p̂(1 − p̂)/n) can go below 0 or above 1 and is too narrow in those cases; Wilson fixes this.

How large a sample do I need?

For a proportion with ±E margin at 95%: n = 1.96² × 0.25 ÷ E², so ±3 points needs 1,068 people and ±5 points needs 385. For a mean: n = (1.96 × σ ÷ E)². Use the “Sample size” tab.

What critical values go with common confidence levels?

z* = 1.645 for 90%, 1.960 for 95%, 2.576 for 99%. t* is larger for small samples: at 95% it is 2.262 with 9 df, 2.045 with 29 df and 1.984 with 100 df.

More free tools for college students

📏 Standard deviation calculatorSample and population SD, variance, mean, median, quartiles — with every step.🔔 Z-score calculatorValue to z-score and percentile, z to probability, percentile to z — with the curve shaded.⚗️ t-test calculatorOne-sample, two-sample (Welch or pooled) and paired t-tests: t, df, p-value, CI and effect size.📉 Linear regression calculatorLine of best fit, r and r², slope test and prediction, with a scatterplot.🎓 GPA calculatorSemester and cumulative GPA on a 4.0 or 4.3 scale, with credit hours and a target-GPA planner.📝 Final grade calculatorWhat you need on the final to get an A, B or C — and what each final score would leave you with.⚖️ Weighted grade calculatorYour course grade from syllabus weights, in percent or points, plus what you need on the rest.📊 Statistics calculatorsStandard deviation, z-score, t-test, confidence interval and regression — with the steps shown.🃏 Flashcard makerMake a deck, learn it with spaced repetition, quiz yourself, print it, share it by link.🍅 Pomodoro study roomOne link, one shared focus timer for your whole study group — everyone sees the same countdown.📅 Class schedule makerYour weekly classes as a printable timetable and a phone lock-screen wallpaper.🔢 Word & character counterWords, characters, sentences, reading and speaking time, page estimate and a word-limit bar.🗂️ Essay outline builderIntro, body paragraphs, counterargument and conclusion with a word budget — copy, print or share.🎯 Thesis statement generator & checkerTurn your topic and reasons into thesis statements, then check yours for weak spots.🗓️ Exam study plannerYour exams in, a day-by-day study plan for finals out.📊 Live class pollStudents answer from their phones with a code or QR; the results fill the projector live.📋 Rubric generatorCriteria × performance levels with weights and points, ready to print, share or save as PDF.📑 Syllabus template builderFill in your course and get a clean one-to-three-page syllabus with schedule, grading and policies.🪑 Exam seating chart makerSpread students across the room with spacing and alternating exam versions. Print one chart and a seat list.🔖 APA, MLA & Chicago citation generatorBooks, articles and websites, plus a works-cited list.