The statistics collection

Welch’s t-test calculator

Do two independent populations have different means? Compare raw samples without assuming equal variances, then read the estimated difference alongside its uncertainty.

Compare two independent means

Paste the observations from each group. The result uses Welch’s unequal-variance method, with no pooled-variance assumption.

What are you comparing?

STATISTICAL TESTS

Differences are A − B. Choose the direction before looking at the results.

Compare the means of two independent groups. Welch’s t-test allows unequal variances. Each group needs at least two values; group sizes can differ.

Separate numbers with commas, spaces, tabs, or new lines. Sample sizes can differ. No headers, units, or thousands separators: 1,000 means two numbers, 1 and 0.

Up to 10,000 values per sample. Use a dot for decimals; negatives and scientific notation work. Values may be zero or have magnitude from 1e−100 to 1e150. Missing or invalid values must be fixed, not skipped.

Your data stays in this browser page. This tool doesn’t upload, save, or track the numbers you enter.

The result, with context.

COMPARISON

Enable JavaScript to calculate the example.

A smaller p-value means these data are less compatible with the null model, given the test’s assumptions. It is not the probability that the null hypothesis is true, and it does not measure practical importance. A large p-value does not prove equality.

Results show up to 10 significant digits. A t-test interval is always two-sided 95%, even when the selected test is one-sided. Check the assumptions and methods below before interpreting the result.

How to use this calculator

  1. 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.
  2. 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.
  3. 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.

Keep exploring

All statistics tools · Worked statistics guide