How to use the confidence interval calculator
- 1 Enter the sample mean.
- 2 Enter the standard deviation and the sample size.
- 3 Choose the confidence level: 80%, 90%, 95%, 98%, 99% or 99.9%.
- 4 Read the margin of error and the confidence interval.
Worked example
A sample of 40 with a mean of 50 and a standard deviation of 10, at 95% confidence. The standard error is 10 ÷ √40 = 1.581. With z = 1.96 the margin of error is ±3.099, so the confidence interval is 46.90 to 53.10.
Reporting a confidence interval
- State the level, usually 95%.
- Give the margin of error with the estimate.
- Use t for small samples under 30.
- Quadruple the sample to halve the margin.
Find the mean and standard deviation with the Mean, Median and Mode Calculator, compare values with the Z-Score Calculator, and work with chances in the Probability Calculator.
How it works: The standard error is the standard deviation divided by the square root of the sample size. It is multiplied by a critical value from the normal distribution, or from Student's t distribution for samples under 30, and the result is added to and taken from the sample mean.
Features
z or t automatically
Student's t for samples under 30, z for larger samples.
Margin of error
Standard error, critical value and ± margin.
Sample size hint
How many observations halve the margin.
When to use it
Surveys and polls
Report results with a margin of error. Find the mean first with the Mean, Median and Mode Calculator.
Statistics homework
Check confidence interval problems. Compare values with the Z-Score Calculator.
Quality control
Estimate the true average of a process from samples.
Planning a study
See how sample size changes precision.
Related Math tasks
Frequently asked questions
What is a confidence interval?
A range of values, worked out from a sample, that is likely to contain the true population value. A 95% confidence interval comes from a method that captures the true mean 95% of the time.
How do you calculate a confidence interval?
Mean ± critical value × (standard deviation ÷ √n). For a mean of 50, standard deviation 10, n = 40 at 95%: 50 ± 1.96 × 1.581 = 50 ± 3.10, so 46.90 to 53.10.
What is the margin of error?
Half the width of the interval: the critical value times the standard error. In the example it is ±3.10.
What z-value is used for 95% confidence?
1.96. For 90% it is 1.645, for 99% it is 2.576 and for 99.9% it is 3.291.
When should I use t instead of z?
When the sample is small (under about 30) and the population standard deviation is estimated from the sample. The t value is larger, giving a wider interval.
Does a 95% confidence interval mean a 95% chance the mean is inside?
Not exactly. The true mean is fixed; 95% describes how often the method produces intervals that contain it.
How does sample size affect the interval?
The margin of error shrinks with the square root of n. To halve it, you need about four times as many observations.
Why is a 99% interval wider than a 95% one?
To be more confident of capturing the true value, the interval has to cover more possible values.
What standard deviation should I enter?
The sample standard deviation (dividing by n − 1). Find it with the Standard Deviation Calculator.
Can I use this for proportions?
This version is for means. For a proportion, the standard error is √(p(1 − p) ÷ n) instead.
What is the t value for 95% with 10 degrees of freedom?
About 2.228, compared with 1.96 for z. It approaches 1.96 as the sample grows.
What is the standard error?
The standard deviation divided by the square root of the sample size. It measures how much the sample mean would vary between samples.
What confidence level should I use?
95% is the convention in most fields. Use 99% when being wrong is costly, or 90% for early estimates.
Built and reviewed by Hamza Farooq, founder and lead developer
· Last updated
· How we check our tools
· Report a problem