How to use this calculator
- Put one independent group in Sample A and the other in Sample B. Each needs at least two observations; the groups can have different sizes. Keep both samples in the same measurement units.
- Choose a two-sided alternative to test for a difference in either direction. Choose a one-sided direction only if it was specified before examining the results. Every difference is A − B, so “greater” means a higher population mean for A.
- Choose Run statistical test. Read the p-value, mean difference, standard error, and interval together. Copy test results includes the method and cautions; editing either sample or the alternative clears the old result. Reset example restores the samples below.
Try a reproducible example
The default data are A = 14, 16, 15, 19, 18, 21 and B = 12, 13, 15, 14, 16, 17. Imagine measurements from six separate units in each group. Keep the two-sided alternative. These invented numbers check the calculation, not the suitability of a real study design.
The means are 17.1667 and 14.5, giving A − B = 2.6667 and a standard error of 1.3208. The result is t = 2.0190, Welch–Satterthwaite df = 9.0114, and p = 0.07419967062. The two-sided 95% interval is −0.3206 to 5.6539. Values here are rounded; the calculator retains its internal precision.
The interval spans zero and also includes positive differences. This example does not establish equal population means. Its p-value is not an effect size or the probability that the null hypothesis is true.
What Welch’s method calculates
The null hypothesis is a population mean difference of zero. Using each group’s sample variance s² and size n, the standard error is √(s²A/nA + s²B/nB), and t is the sample mean difference divided by that standard error. Welch–Satterthwaite degrees of freedom adjust for the separate variance estimates and can be fractional; the Student-t distribution gives the p-value and interval.
The displayed confidence interval is always two-sided 95%, even for a one-sided alternative. It estimates the population mean difference, not a range containing 95% of individual observations. A one-sided p-value below 0.05 can therefore accompany an interval that contains zero.
Check the design and input limits
Observations must be independent within and between groups. Small-sample t inference depends on roughly normal populations without strong outliers; unequal variances are allowed, but dependence and biased sampling are not repaired. Before-and-after measurements on the same units need a paired analysis instead. Equal sample sizes alone do not make samples paired.
Each sample accepts 2–10,000 observations and up to 200,000 characters. Follow the input-format instructions beside the fields, and omit headers, units, and thousands separators. Empty comma-separated fields and invalid tokens are errors. Numeric values may be zero or have magnitude from 1e−100 to 1e150.
Zero estimated standard error makes inference undefined here. Browser numbers retain roughly 15–17 significant digits, so nearly equal values at large offsets can merge; consider centering or rescaling. Unrepresentable intervals are marked unavailable, and p-values below the numeric limit are not labeled as mathematically zero. The tool cannot check your sampling design or adjust for multiple comparisons.