Confidence Interval Calculator
The confidence interval and margin of error for a sample mean
Confidence Interval
—
Related Calculators
Frequently Asked Questions
What is a confidence interval?
A confidence interval is a range of values, built from sample data, that is likely to contain the true population value. A 95% confidence interval means that if you repeated the sampling many times, about 95% of the intervals produced would capture the real population mean. It expresses the precision of an estimate.
How is a confidence interval calculated?
For a mean, it is x̄ ± z × (σ / √n), where x̄ is the sample mean, σ is the standard deviation, n is the sample size, and z is the critical value for your confidence level (1.96 for 95%). The z × (σ/√n) part is the margin of error, which is added to and subtracted from the mean.
What does a 95% confidence level mean?
It means the method used will produce an interval containing the true population value 95% of the time over repeated sampling. It does not mean there is a 95% probability the true value is in your one specific interval — the true value is fixed; it is the interval that varies from sample to sample.
What is the margin of error?
The margin of error is the half-width of the confidence interval: z × (σ / √n). A larger sample size shrinks it (more precision), while a higher confidence level widens it (more certainty). It is the plus-or-minus value you often see quoted with poll results.
When should I use z instead of t?
The z-value is appropriate when the population standard deviation is known or the sample is large (roughly n ≥ 30). For small samples with an unknown population standard deviation, statisticians use the t-distribution, which has slightly wider intervals. This calculator uses z, which is standard for large samples.