Confidence interval calculator (mean and proportion)
By Jude Wallis · Published
A confidence interval calculator takes your sample data and returns a range of plausible values for the true mean or proportion. It uses the form statistic plus or minus (critical value)(standard error), with z* for a proportion and t* for a mean.
95% confidence interval for p
(0.3767, 0.4633)
Large counts check: successes = 210, failures = 290 (both at least 10, condition met).
Steps
- 1.p-hat = x / n = 210 / 500 = 0.42
- 2.z* for 95% confidence = 1.96
- 3.SE = sqrt(p-hat(1 - p-hat) / n) = sqrt(0.42 x 0.58 / 500) = 0.02207
- 4.margin of error = 1.96 x 0.02207 = 0.0433
- 5.interval = 0.42 ± 0.0433 = (0.3767, 0.4633)
This calculator supports Unit 3 topic 3.3 (confidence interval for a proportion) and Unit 4 topic 4.2 (confidence interval for a mean) in the Fall 2026 AP Statistics course.
What a confidence interval calculator does
A confidence interval is a range of plausible values for a population parameter, built from a single sample. This confidence interval calculator takes your sample data, applies the AP Statistics interval form, and returns the interval along with its margin of error.
The College Board formula sheet writes every confidence interval the same way:
The statistic is your best single estimate, either the sample proportion (p-hat) or the sample mean (x-bar). The critical value sets how wide the net is for your chosen confidence level. The standard error measures how much the statistic moves from one random sample to the next.
z* for a proportion, t* for a mean
For a population proportion , the standard error is set entirely by the single parameter , with the sample proportion plugged in and no separate spread parameter to estimate, so the critical value comes from the standard normal (z) distribution:
Here is the sample proportion, is the sample size, and is the critical value that captures the middle C% of a standard normal curve. For 95% confidence, . You can find other levels in the z-table.
For a population mean (mu), you usually do not know the population standard deviation (sigma), so you estimate it with the sample standard deviation and switch to the t distribution:
Here is the sample mean and is the critical value from a t distribution with degrees of freedom. Its heavier tails account for the extra variability from estimating with . Look up values in the t-table.
Conditions to check first
The interval is only trustworthy when the sampling distribution of the statistic is roughly normal. Check these before you report anything.
For a proportion:
- Random: the data come from a random sample or a randomized experiment.
- 10% condition: the sample is no more than 10% of the population, so .
- Large counts: both and .
For a mean:
- Random: the data come from a random sample or a randomized experiment.
- 10% condition: the sample is no more than 10% of the population.
- Normal or large sample: the population is roughly normal, or so the Central Limit Theorem applies, or a plot of the data shows no strong skew and no outliers.
How to use this calculator
- Choose proportion or mean at the top.
- For a proportion, enter the number of successes and the sample size , or enter directly. For a mean, enter the sample mean , the sample standard deviation , and .
- Pick a confidence level. 90%, 95%, and 99% are the common choices.
- Read off the interval, the margin of error, and the critical value the tool used.
The calculator reports the same numbers you would get by hand, so you can use it to check your work rather than skip the steps. On the exam you still have to show the formula, the substituted values, and the interpretation.
How to state your interval
Two sentences cover almost every free-response prompt.
Interpret the interval: "We are 95% confident that the interval from (lower) to (upper) captures the true [parameter in context]."
Interpret the confidence level: "If we repeated this sampling many times and built an interval from each sample, about 95% of those intervals would capture the true [parameter]."
Do not say there is a 95% probability that the parameter falls inside your one interval. The parameter is a fixed number, and the interval is what changes from sample to sample. For more on this idea, read what 95% confidence means.
95% confidence interval for a proportion
A random sample of 500 registered voters includes 210 who support a ballot measure. The sample is less than 10% of all voters. Build a 95% confidence interval for the true proportion of voters who support the measure.
Find the sample proportion : .
Check conditions. Random: stated. 10% condition: stated. Large counts: and . All conditions are met.
Find the standard error: .
Find the critical value. For 95% confidence, .
Find the margin of error: .
Build the interval: , which gives .
The 95% confidence interval for is . We are 95% confident that the interval from 0.3767 to 0.4633 captures the true proportion of registered voters who support the ballot measure.
Frequently asked questions
Should I use z* or t* for a confidence interval?
Use for a proportion, because its standard error depends only on the single parameter , with no separate spread parameter to estimate. Use with degrees of freedom for a mean, because you estimate the population standard deviation with , and that extra estimation adds variability the t distribution accounts for. See t-test vs z-test for the full comparison.
What makes a confidence interval wider or narrower?
Raising the confidence level, say from 95% to 99%, widens the interval because the critical value grows. A larger sample size narrows the interval because the standard error shrinks. More spread in the data also widens a mean interval.
Can I get a confidence interval from summary statistics instead of raw data?
Yes. For a proportion you only need the number of successes and the sample size. For a mean you need the sample mean, the sample standard deviation, and the sample size. This calculator accepts those values directly.