Confidence Interval Calculator
Enter your sample results to get a confidence interval and margin of error for a mean or a proportion at the confidence level you choose.
How it works
For a mean, the margin of error is the critical t-value times the standard error (the standard deviation divided by the square root of n). For a proportion, the margin uses the normal z-value and the standard error of the proportion.
Proportion: p̂ ± z × √(p̂(1 − p̂) ÷ n)
Worked example
Using the default values: Interval for = A mean; Confidence level = 95%; Sample size = 30; Sample mean = 50; Sample standard deviation = 8; Successes (for a proportion) = 45.
The calculator returns: Confidence interval: 47.0128 to 52.9872; Margin of error: 2.9872; Critical t-value (df = 29): 2.0452; Standard error: 1.4606.
Limits and assumptions
- The mean interval assumes the data are roughly normal or the sample is reasonably large.
- The proportion interval uses the normal approximation; it is unreliable when n × p or n × (1 − p) is below about 10.
- A confidence interval is about the method, not a probability that this one interval holds the true value.
Frequently asked questions about the Confidence Interval Calculator
What does a 95% confidence interval mean?
If you repeated the study many times, about 95% of the intervals built this way would contain the true value.
Why use the t-distribution?
When the population standard deviation is unknown and the sample is small, the t-distribution gives wider, more honest intervals than the normal.
How do I get a narrower interval?
Increase the sample size, accept a lower confidence level, or reduce variability.