Skip to main content

Confidence Interval Calculator

Calculate a confidence interval for a mean, a proportion, or directly from raw data. This calculator supports z-intervals and t-intervals, shows the margin of error, gives a clear step-by-step solution, and includes a small confidence interval visual.

Background

A confidence interval gives a range of plausible values for a population parameter based on sample data. In general, a larger sample size makes the interval narrower, while a higher confidence level makes it wider. For means, the calculator uses either a z critical value or a t critical value depending on what information is available.

Enter values

Tip: Use Mean (population SD known) only when the population standard deviation σ is actually known.

Mean CI with known population SD (z-interval)

Options

Rounding affects display only.

Chips prefill and calculate immediately.

Result

No results yet. Enter values and click Calculate.

How to use this calculator

  • Choose the correct mode: mean with known σ, mean with unknown σ, proportion, or raw data.
  • Enter the sample information and select a confidence level.
  • Click Calculate to see the interval, margin of error, method used, and optional step-by-step solution.
  • In proportion mode, you can enter either p̂ directly or successes and trials.

How this calculator works

  • Mean (population SD known): uses x̄ ± z*·(σ/√n).
  • Mean (population SD unknown): uses x̄ ± t*·(s/√n) with df = n−1.
  • Proportion: uses p̂ ± z*·√(p̂(1−p̂)/n).
  • Raw data mode: computes , s, and n, then builds a t-interval.
  • The margin of error is the critical value times the standard error.
  • A higher confidence level makes the interval wider, while a larger sample size usually makes it narrower.

Formula & Equations Used

Mean CI with known σ: x̄ ± z*·(σ/√n)

Mean CI with unknown σ: x̄ ± t*·(s/√n)

Proportion CI: p̂ ± z*·√(p̂(1−p̂)/n)

Sample mean: x̄ = (Σx) / n

Sample standard deviation: s = √(Σ(x − x̄)² / (n − 1))

Margin of error: ME = critical value × SE

Example Problem & Step-by-Step Solution

Example 1 — Mean CI with known population SD

Suppose x̄ = 72, σ = 12, n = 36, and the confidence level is 95%.

  1. Use x̄ ± z*·(σ/√n).
  2. For 95%, z* ≈ 1.96.
  3. SE = 12/√36 = 12/6 = 2.
  4. ME = 1.96·2 = 3.92.
  5. CI = 72 ± 3.92 = (68.08, 75.92).

Example 2 — Proportion CI

A survey finds p̂ = 0.42 from n = 200 at 95% confidence.

  1. Use p̂ ± z*·√(p̂(1−p̂)/n).
  2. For 95%, z* ≈ 1.96.
  3. Compute the standard error.
  4. Multiply by z* to get the margin of error.
  5. Add and subtract the margin of error from .

Example 3 — Raw data

Use the dataset 4, 6, 7, 9, 10 to build a 95% confidence interval for the mean.

  1. Compute the sample mean .
  2. Compute the sample standard deviation s.
  3. Find SE = s/√n.
  4. Use the appropriate t* value with df = n−1.
  5. Build the interval as x̄ ± t*·SE.

Frequently Asked Questions

Q: What is a confidence interval?

A confidence interval is a range of plausible values for a population parameter based on sample data.

Q: Why does a 99% confidence interval look wider than a 95% interval?

Because higher confidence requires a larger critical value, which increases the margin of error.

Q: When should I use a t-interval instead of a z-interval?

Use a t-interval for a mean when the population standard deviation is unknown and you are using the sample standard deviation instead.

Q: Does a 95% confidence interval mean there is a 95% chance the true value is inside this specific interval?

Not exactly. It means the method used would capture the true parameter about 95% of the time over many repeated samples.

Mean
3. Describing Data Numerically
4 problems
Topic
Ally
Standard Deviation
3. Describing Data Numerically
7 problems
Topic
Jonathan
Standard Normal Distribution
6. Normal Distribution and Continuous Random Variables
7 problems
Topic
Laura
Confidence Intervals for Population Mean
7. Sampling Distributions & Confidence Intervals: Mean
7 problems
Topic
Justin
Confidence Intervals for Population Proportion
8. Sampling Distributions & Confidence Intervals: Proportion
7 problems
Topic
Ernest
Introduction to Confidence Intervals
7. Sampling Distributions & Confidence Intervals: Mean
6 problems
Topic
Ernest
3. Describing Data Numerically
4 topics 11 problems
Chapter
David-Paige
6. Normal Distribution and Continuous Random Variables
2 topics 6 problems
Chapter
Justin
7. Sampling Distributions & Confidence Intervals: Mean
2 topics 6 problems
Chapter
Ally
8. Sampling Distributions & Confidence Intervals: Proportion
1 topic 3 problems
Chapter
Ernest
Confidence Intervals
4 & 5. Statistics, Quality Assurance and Calibration Methods
5 problems
Topic
4 & 5. Statistics, Quality Assurance and Calibration Methods - Part 1 of 2
4 topics 12 problems
Chapter
4 & 5. Statistics, Quality Assurance and Calibration Methods - Part 2 of 2
2 topics 6 problems
Chapter
Mean
3. Describing Data Numerically
10 problems
Topic
Brendan
Standard Deviation
3. Describing Data Numerically
10 problems
Topic
Jonathan
Standard Normal Distribution
6. Normal Distribution & Continuous Random Variables
10 problems
Topic
Ernest
Sampling Distribution of the Sample Mean and Central Limit Theorem
7. Sampling Distributions & Confidence Intervals: Mean
10 problems
Topic
David-Paige
Confidence Intervals for Population Mean
7. Sampling Distributions & Confidence Intervals: Mean
10 problems
Topic
Laura
Sampling Distribution of Sample Proportion
8. Sampling Distributions & Confidence Intervals: Proportion
10 problems
Topic
David-Paige
Confidence Intervals for Population Proportion
8. Sampling Distributions & Confidence Intervals: Proportion
10 problems
Topic
Ernest
Introduction to Confidence Intervals
7. Sampling Distributions & Confidence Intervals: Mean
10 problems
Topic
Justin
3. Describing Data Numerically
8 topics 15 problems
Chapter
Jonathan
6. Normal Distribution & Continuous Random Variables
4 topics 15 problems
Chapter
Ernest
7. Sampling Distributions & Confidence Intervals: Mean
3 topics 15 problems
Chapter
Ally
8. Sampling Distributions & Confidence Intervals: Proportion
2 topics 15 problems
Chapter
Laura