About Confidence Interval for a Difference of Means
This calculator builds a confidence interval for the difference between the means of two independent groups, using Welch’s method so equal variances are not assumed. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
If the interval contains 0, the data are consistent with no difference between the groups at that confidence level. If it lies entirely above or below 0, the difference is statistically significant at the matching level, which is the same conclusion a two-sided t-test would give.
The page opens on the two sets of sleep data from R. Switch to summary statistics to type each group’s mean, standard deviation and size.
How to use Confidence Interval for a Difference of Means
- 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.
Welch interval for a difference
The standard error adds the two variances of the means, and the degrees of freedom come from the Welch-Satterthwaite formula.
(x̄1 − x̄2) ± t · √(s1²/n1 + s2²/n2)Worked examples
Sleep data, drug 1 minus drug 2, 95% gives -3.365 to 0.2055, df = 17.78
R: t.test(extra ~ group, data = sleep) reports the interval -3.3655 to 0.2055.
Group 1: mean 50, SD 10, n 25. Group 2: mean 42, SD 12, n 30 gives 2.05 to 13.95
The interval excludes 0, so the means differ at the 95% level.
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.
Is this for paired data?
No, it is for two independent groups. For paired data, use the paired t-test calculator or the mean interval on the list of differences.
Why is the difference shown as group 1 minus group 2?
The sign tells you which group is higher. A positive interval means group 1 has the higher mean. Swapping the groups flips the signs.
More Confidence Interval Calculator pages
- Confidence Interval CalculatorGet a 90%, 95% or 99% confidence interval for a mean, a proportion or a difference of means, with every step shown.
- 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.
- Z Confidence Interval CalculatorUse the normal distribution for a mean when you know the population standard deviation.