T-Test Calculator

Run a one-sample, two-sample (Welch or pooled) or paired t-test from raw data. You get the t statistic, degrees of freedom, p-value and every intermediate step.

t
−3.7417
p-value
0.0023
df
13.651
Mean difference
−5
Standard error
1.3363

Significant at α = 0.05: reject H₀.

Step-by-step working

  1. Means and sample variances of each groupx̄₁ = 27.5, s₁² = 8.2857, n₁ = 8 x̄₂ = 32.5, s₂² = 6, n₂ = 8
  2. Standard error (Welch, unequal variances)SE = √(s₁²/n₁ + s₂²/n₂) = 1.3363
  3. Welch–Satterthwaite degrees of freedomdf = 13.651
  4. t statistict = (x̄₁ − x̄₂) ÷ SE = −5 ÷ 1.3363 = −3.7417
  5. p-value (two-tailed, df = 13.651)p = 0.0023

Formula one-sample: t = (x̄ − μ₀) ÷ (s ÷ √n) Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂)

Ask the tutor about your result

An AI tutor reads your inputs and results above and explains them in plain English. The numbers come from the calculator; the explanation is AI-written, so check it against your notes.

Which t-test?

  • One-sample: compare one mean with a fixed value (does this machine fill bottles with 500 ml on average?).
  • Two independent samples: compare the means of two separate groups (treatment vs control). Welch’s version does not assume equal variances and is the recommended default.
  • Paired: the same subjects measured twice, or matched pairs (before vs after). It is a one-sample t-test on the differences.

Conditions

Random samples or random assignment, independent observations, and approximately normal data or differences (less important once each group has around 30 or more values, thanks to the central limit theorem). Check for strong skew or outliers with the outlier calculator first.

Frequently asked questions

Welch or pooled?

Welch’s t-test is accurate whether or not the variances are equal, and loses almost nothing when they are equal. Use pooled only if your course requires it.

Why are Welch degrees of freedom not a whole number?

The Welch–Satterthwaite formula approximates the degrees of freedom from both sample variances, so it usually gives a decimal. That is normal.

What is the difference between paired and two-sample?

Paired data come in natural pairs (the same person twice). Treating them as independent throws away that pairing and usually makes the test much less powerful.