About Confidence Interval Calculator
This confidence interval calculator is free, needs no sign-up and runs in your browser, so your data is never uploaded. It builds an interval for a population mean when the standard deviation is unknown (a t interval) or known (a z interval), for a proportion with both the Wald and the Wilson score methods, and for the difference between two means.
Paste raw data or type the mean, standard deviation and size. The result shows the interval, the margin of error, the critical value and the standard error, with a plain-English sentence that says what the interval means. A bell curve shades the central confidence region, and the step-by-step panel writes each formula with your numbers in it.
For proportions the page shows Wald and Wilson side by side. The Wald interval is the textbook formula, but it can be too narrow for small samples or proportions near 0 or 1, so the calculator opens on Wilson, which behaves much better and is recommended by most statisticians. A warning appears when Wald is unreliable.
How to use Confidence Interval Calculator
- Choose what you want an interval for: a mean (standard deviation unknown or known), a proportion or a difference of means.
- Enter raw data or summary statistics. For a proportion enter the number of successes and the sample size.
- For a known-sigma interval, type the population standard deviation.
- Pick the confidence level: 90%, 95% or 99%.
- Read the interval and the margin of error, then open the working to see each formula.
Features
- Mean with unknown sigma (t interval) or known sigma (z interval).
- Proportion with the Wald and Wilson score methods, compared side by side, with a small-sample warning.
- Difference of two means, with the Welch method by default.
- Raw data or summary statistics.
- Margin of error, critical value, standard error and degrees of freedom shown.
- A bell curve with the central confidence region shaded.
- Step-by-step KaTeX working and a plain-English reading of the interval.
The formulas
Every interval has the form estimate plus or minus a critical value times a standard error. Which critical value you use depends on whether the standard deviation is known and on the sample size. The Wilson score interval comes from inverting the score test and does not use the sample proportion in the standard error.
mean, σ unknown x̄ ± t(α/2, n−1) · s/√n
mean, σ known x̄ ± z(α/2) · σ/√n
proportion, Wald p̂ ± z · √(p̂(1 − p̂)/n)
proportion, Wilson (p̂ + z²/2n ± z·√(p̂(1−p̂)/n + z²/4n²)) / (1 + z²/n)
difference (Welch) (x̄1 − x̄2) ± t · √(s1²/n1 + s2²/n2)Worked examples
NIST ZARR13: mean 9.261460, SD 0.022789, n = 195, 95% gives 9.258241 to 9.264679, margin 0.003219, t = 1.9723
Uses t with 194 degrees of freedom, as in the NIST/SEMATECH e-Handbook, section 1.3.5.2.
81 successes out of 263, 95% gives Wilson 0.2553 to 0.3662. Wald 0.2522 to 0.3638
The Wilson values match Newcombe (1998), Statistics in Medicine, table 1.
Sleep data, drug 1 minus drug 2, 95%, Welch gives -3.365 to 0.2055
The interval includes 0, so the data do not rule out no difference. This matches R: t.test(extra ~ group, data = sleep).
Critical values for 90%, 95% and 99% confidence
| Distribution | 90% | 95% | 99% |
|---|---|---|---|
| t, n = 5 | 2.132 | 2.776 | 4.604 |
| t, n = 10 | 1.833 | 2.262 | 3.25 |
| t, n = 30 | 1.699 | 2.045 | 2.756 |
| t, n = 100 | 1.66 | 1.984 | 2.626 |
| z (known σ) | 1.645 | 1.96 | 2.576 |
Good to know
What a 95% interval means
If you repeated the study many times and built an interval each time with this method, about 95% of those intervals would contain the true value. It is not correct to say there is a 95% probability that this particular interval contains it. A wider interval means more uncertainty, and it gets narrower with more data and wider with a higher confidence level.
Assumptions and limits
The mean intervals assume a random sample from a roughly normal population, or a large sample. With strong skew and a small sample they can be off. The calculator does not compute bootstrap, exact binomial (Clopper-Pearson) or median intervals. The Wald interval is shown for teaching and comparison, and clipped to the range 0 to 1.
Privacy: how it works
- The interval is calculated by code in your own browser tab. Your numbers are not sent to Ulkaa or any other server.
- There is no account and nothing is stored once you close the tab.
Tips
- Use the t interval unless you truly know the population standard deviation. Knowing it is rare outside textbooks.
- For a proportion, prefer Wilson. Use Wald only when you are matching a textbook answer.
- If a difference interval contains 0, the data are consistent with no difference at that confidence level.
- Quadrupling the sample size roughly halves the margin of error.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your data are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your data are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
How do I calculate a 95% confidence interval?
Take the sample mean and add and subtract the margin of error, which is a critical value times the standard error. For a mean with unknown sigma the critical value is t with n minus 1 degrees of freedom and the standard error is s divided by the square root of n.
When do I use z and when t?
Use z only when the population standard deviation is known. Otherwise use t, which allows for the extra uncertainty from estimating the standard deviation. For large samples they are nearly identical.
Wald or Wilson for a proportion?
Wilson. The Wald interval can be too narrow, can run past 0 or 1 and performs poorly for small samples or proportions near the ends. Wilson keeps its coverage close to the stated level.
What does the margin of error tell me?
It is half the width of the interval, the amount added and subtracted from the estimate. A poll with 52% and a margin of 3 points suggests the true value is between 49% and 55%.
Why does a higher confidence level give a wider interval?
To be more sure of catching the true value you have to cast a wider net. The critical value rises from about 1.64 for 90% to 1.96 for 95% and 2.58 for 99% on the normal curve.
Can I get an interval for a difference of means?
Yes. Choose difference of means and enter both groups. It uses Welch by default, which does not assume equal variances. If the interval does not contain 0, the means differ at that confidence level.
Popular Confidence Interval Calculator pages
- 95% Confidence Interval CalculatorType a mean, a standard deviation and a sample size and get the 95% interval and its margin of error.
- Confidence Interval for the Mean CalculatorPaste a list of values and get the confidence interval for the population mean.
- Confidence Interval for a Proportion CalculatorEnter the number of successes and the sample size to get a Wilson or Wald interval.
- Confidence Interval for a Difference of MeansEnter two groups and get the interval for the difference between their population means.
- Z Confidence Interval CalculatorUse the normal distribution for a mean when you know the population standard deviation.