Instructional videos are coming to Albert.Join the waitlist
Tools
Practice
Tools

Confidence Interval Calculator (Proportions and Means, with Steps)

This free confidence interval calculator builds a one- or two-sample interval for a proportion or a mean, showing the margin of error, the critical value, the conditions to check, an AP-style conclusion and the TI-84 steps, for statistics and AP® Statistics students.

Loading the confidence interval calculator…

How to use the confidence interval calculator

  1. Choose the interval. One proportion or two proportions for categorical data (yes/no, success/failure), and one mean or two means for quantitative data.
  2. Pick a confidence level. 90%, 95% and 99% are built in; choose Custom for any other level.
  3. Enter your sample. For proportions, type the number of successes (like 60) or the sample proportion (0.6 or 60%) and the sample size. For means, type x̄, s and n, or switch to Raw data and paste your values.
  4. Add the context (optional) so the conclusion reads in words, then read the interval, the conditions checklist, the conclusion and the steps.

Worked example

In a random sample of 100 students at a large high school, 60 support a later start time. Build a 95% confidence interval for the proportion of all students at the school who support it.

  1. Check the conditions. Random: the sample was random. 10%: 100 students is less than 10% of a large school (it needs at least 1,000 students). Large Counts: 60 successes and 40 failures are both at least 10.
  2. Find the statistic. p̂ = 60 ÷ 100 = 0.6.
  3. Find the standard error. SE = √(0.6 × 0.4 ÷ 100) = √0.0024 = 0.04899.
  4. Find the critical value. For 95% confidence, z* = invNorm(0.975) = 1.960.
  5. Find the margin of error. ME = 1.960 × 0.04899 = 0.096.
  6. Build the interval. 0.6 ± 0.096 gives (0.504, 0.696).

Conclusion: We are 95% confident that the true proportion of students at this school who support a later start time is between 0.504 and 0.696. On a TI-84, 1-PropZInt with x = 60, n = 100 and C-Level = 0.95 gives the same interval.

Every confidence interval has the same shape

A confidence interval is an estimate plus or minus a margin of error:

statistic ± (critical value) × (standard error)

The statistic is your best single guess from the sample. The standard error measures how much that statistic would vary from sample to sample. The critical value sets how many standard errors to go out on each side, based on the confidence level. Here are the four intervals the calculator builds:

Interval Statistic Standard error Critical value TI-84
One proportion p̂ √(p̂(1 − p̂) ÷ n) z* 1-PropZInt
Two proportions p̂₁ − p̂₂ √(p̂₁(1 − p̂₁) ÷ n₁ + p̂₂(1 − p̂₂) ÷ n₂) z* 2-PropZInt
One mean x̄ s ÷ √n t*, df = n − 1 TInterval
Two means x̄₁ − x̄₂ √(s₁² ÷ n₁ + s₂² ÷ n₂) t*, Welch df 2-SampTInt

Critical values: z* and t*

For proportions, the critical value comes from the standard normal distribution. For means, it comes from a t distribution, because you estimate the population standard deviation with the sample standard deviation s, which adds uncertainty. The t distribution has heavier tails, so t* is larger than z*, especially for small samples:

Confidence level z* t*, df = 9 t*, df = 24
90% 1.645 1.833 1.711
95% 1.960 2.262 2.064
99% 2.576 3.250 2.797

As df grows, t* gets closer to z*. The calculator works out critical values exactly, so a custom level like 98% or a decimal df from the Welch formula needs no table.

Conditions for a confidence interval

An interval is only trustworthy when its conditions are met. AP® Statistics expects you to check them in context before you calculate:

  • Random: the data come from a random sample, or from a randomized experiment. Without randomness, the interval can’t be generalized, no matter how narrow it is.
  • 10%: when you sample without replacement, the sample should be at most 10% of the population (n ≤ 0.10N). This keeps the observations close enough to independent for the standard error formula to hold.
  • Large Counts (proportions): at least 10 successes and 10 failures in each sample, so the sampling distribution of p̂ is approximately normal.
  • Normal/Large Sample (means): the population is approximately normal, or n ≥ 30 (by the central limit theorem). With a small sample, graph the data and check for strong skew or outliers.

The calculator marks the conditions it can test from your numbers as met or not met, and leaves Random and 10% for you to check, since they depend on how the data were collected.

What “95% confident” means

The confidence level describes the method, not a single interval. If you took many random samples and built a 95% confidence interval from each, about 95% of those intervals would capture the true parameter, and about 5% would miss it.

Two common mistakes on the AP exam:

  • Saying “there is a 95% probability that the true proportion is between 0.504 and 0.696.” Once the interval is built, the parameter is either in it or it isn’t; the 95% refers to the long-run success rate of the method.
  • Saying the interval describes individual values, such as “95% of students’ commute times are between 18 and 24 minutes.” A confidence interval estimates a parameter (a population mean or proportion), not where individual data values fall.

The safe template is the one the calculator writes: “We are 95% confident that the interval from ___ to ___ captures the true [parameter in context],” or equivalently, “…that the true [parameter in context] is between ___ and ___.”

What changes the margin of error

  • Sample size: the margin of error shrinks with √n. Quadrupling the sample size halves it; with 400 students instead of 100, the worked example’s margin drops from 0.096 to 0.048.
  • Confidence level: a higher level means a larger critical value and a wider interval. A 99% interval is wider than a 95% interval from the same data.
  • Variability: more spread in the data (a larger s, or p̂ closer to 0.5) means a larger standard error.

To plan a survey, solve the margin of error formula for n. For a proportion with no prior estimate, use p̂ = 0.5, the most cautious choice: for a margin of error of 0.03 at 95% confidence, n = (1.960 ÷ 0.03)² × 0.5 × 0.5 = 1,067.1, so you need at least 1,068 people. Always round up.

Intervals for a difference and the role of 0

A two-sample interval estimates a difference, p₁ − p₂ or μ₁ − μ₂. Check whether 0 is inside it:

  • If 0 is inside the interval, “no difference” is a plausible value, so the data don’t give convincing evidence that the two parameters differ.
  • If the whole interval is above 0, the first parameter is plausibly larger; if it’s entirely below 0, the first is plausibly smaller.

Keep track of the order you subtract in, and say it in your conclusion. For two means, calculators use the Welch degrees of freedom; by hand you can use the smaller of n₁ − 1 and n₂ − 1, which gives a slightly wider, conservative interval. The calculator shows both.

Confidence intervals on the AP® Statistics exam

Confidence intervals run through AP® Statistics Units 6 and 7, and free-response questions usually expect four parts: name the procedure and the parameter, check the conditions, do the calculation, and state the conclusion in context. For more practice, read Constructing a Confidence Interval for a Population Mean, Confidence Intervals for the Difference of Two Proportions, Confidence Intervals for the Difference of Two Population Means and Margin of Error: What to Know, and browse the AP® Statistics cheat sheets. After a practice test, estimate your score with the AP® Statistics Score Calculator.

FAQ

How do you calculate a confidence interval?

Every interval has the same shape: statistic ± (critical value) × (standard error). For a proportion, that is p̂ ± z*√(p̂(1 − p̂)/n). For a mean, it is x̄ ± t*·s/√n with df = n − 1. With p̂ = 0.6 and n = 100 at 95%, the interval is 0.6 ± 1.960 × 0.049 = (0.504, 0.696).

What does 95% confident mean?

It describes the method, not one interval. If you took many random samples and built a 95% interval from each, about 95% of those intervals would capture the true parameter. It does not mean there is a 95% chance the parameter is in this particular interval: the parameter is fixed, and this interval either contains it or doesn’t.

What is the margin of error?

The margin of error is the critical value times the standard error, the amount added to and subtracted from the statistic. It gets smaller with a larger sample (it shrinks with √n) and larger with a higher confidence level. To cut the margin of error in half, you need about four times the sample size.

When do I use z* and when do I use t*?

Use z* for proportions, because the standard error of p̂ depends only on p̂ and n. Use t* for means when you estimate the population standard deviation with s, which is almost always. The t distribution has heavier tails to account for that extra uncertainty, with df = n − 1 for one sample.

What conditions do I need to check?

Random: the data come from a random sample or randomized experiment. 10%: when sampling without replacement, the sample is at most 10% of the population. Then Large Counts for proportions (at least 10 successes and 10 failures) or Normal/Large Sample for means (n ≥ 30, or a population or data distribution that looks roughly normal with no outliers).

Which degrees of freedom does the two-sample t interval use?

Calculators use the Welch formula, which usually gives a decimal df. Without a calculator, you can use the smaller of n₁ − 1 and n₂ − 1, which is conservative and gives a slightly wider interval. Both are accepted on the AP® Statistics exam.