t-test calculator

Paste your measurements, pick the type of test and tail, and set the significance level. You get t, the degrees of freedom, the p-value and whether the result is significant.

Numbers separated by commas, spaces or new lines. At least 2 values.
Used by the two-sample and paired tests. For a paired test, same length as sample 1, in matching order.
Used by the one-sample test only.
Between 0 and 1, usually 0.05.
t statistic-3.6389549
p-value0.0046478
Degrees of freedom
9.86396
Result at α
p < α: significant, reject the null hypothesis
Difference (sample 1 − sample 2, mean − μ₀, or mean difference)
-1.0166667
Standard error
0.27938424
Mean of sample 1 (or of the differences)
12.266667
Size of sample 1
6
Mean of sample 2
13.283333
Size of sample 2
6

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose the test and paste sample 1 (and sample 2 for a two-sample or paired test).
  2. For a one-sample test enter the mean to compare with.
  3. Pick the tail and the significance level and read t, df and p.

How it works

  • One-sample: t = (mean − μ₀) / (s / √n), df = n − 1.
  • Welch: t = (mean₁ − mean₂) / √(s₁²/n₁ + s₂²/n₂), with the Welch–Satterthwaite degrees of freedom.
  • Pooled: the standard error uses the pooled variance and df = n₁ + n₂ − 2.
  • Paired: a one-sample test on the differences.

The p-value comes from Student’s t distribution through the regularised incomplete beta function, shared with the confidence interval calculator.

Worked example

Sample 1 = 1, 2, 3, 4, 5 and sample 2 = 3, 4, 5, 6, 7. The means are 3 and 5, each variance is 2.5, so the standard error is √(0.5 + 0.5) = 1 and t = −2. With equal sizes and variances Welch and pooled both give df = 8, and the two-tailed p is about 0.0805, not significant at 0.05.

Tips

  • Report the t, degrees of freedom and exact p, not only “significant”.
  • Statistical significance is not the same as a large or important effect.

Frequently asked questions

Which test should I choose?

Use the one-sample test to compare a sample mean with a known value, Welch for two independent groups (the safe default when variances may differ), the pooled test if you can assume equal variances, and the paired test for before-and-after or matched measurements.

What does the p-value mean?

It is the probability, if the null hypothesis were true, of a t statistic at least as extreme as the one observed. A small p is evidence against the null hypothesis; it is not the probability that the null hypothesis is true.

One-tailed or two-tailed?

Use two-tailed unless you decided before seeing the data that only one direction matters. The one-tailed p is half the two-tailed p when the effect points in the chosen direction.

What are the assumptions?

Observations are independent and the data are roughly normal, especially for small samples. This calculator takes raw data; it does not test those assumptions.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.