Statistics

Two Sample T-Test Calculator

Compare independent sample means using Welch’s test or an explicitly chosen pooled-variance t-test.

Data stays on this deviceConvention explained below
Data explorer
Data explorer

Check the dataset and sample convention before interpreting results.

See the method

Add your observations

Runs on your device

Your statistical summary

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter sample a, sample b, variance assumption, alternative hypothesis, significance level.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

Welch: SE² = sA²/nA + sB²/nB, with Welch–Satterthwaite degrees of freedom. Pooled: combine variances weighted by n−1, and use df = nA+nB−2. t = (mean A−mean B)/SE.

A WORKED EXAMPLE

Using sample a = 8, 10, 9, 12, 11, sample b = 5, 7, 6, 8, 9, variance assumption = welch, alternative hypothesis = two, significance level = 0.05, the result is 0.0170716812 probability. Change these example inputs to match your task; use the method above to check each step.

What to keep in mind

Independent samples; approximate normality is important for small samples. Pooled mode additionally assumes equal population variances. A descriptive or probability calculation under the stated assumptions. Check the sample design and model before interpreting results.

Reference: NIST: statistical methods handbook

Common questions

When should I use Welch instead of pooled?

Welch allows the groups to have different variances and sample sizes. Choose pooled only when an equal-population-variance assumption is justified by the study.

What if the measurements are before and after on the same people?

Use the paired t-test. Treating matched measurements as independent discards the relationship between observations and uses the wrong standard error for that design.

Methodology maintained by ClarityKit. How these tools are built and checked.