Skip to main content
KalkuNet

T-Test Calculator (One-Sample, Independent & Paired)

One-sample, independent (Welch) and paired t-tests from raw data.

Calculated in your browserStatistics
t statistic
4.032617
p-value (two-sided)
0.00084205
Decision
Reject H₀ at α = 0.05
Degrees of freedom (df)
17.2472
p-value (one-sided, in the direction of t)
0.00042102
Mean of group 1
82.7
Mean of group 2
74.7

Formula and sources

One sample: t = (x̄ − μ₀) ÷ (s ÷ √n), df = n − 1 Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂), Welch–Satterthwaite df Paired: t = d̄ ÷ (s_d ÷ √n) on the pairwise differences Two-sided p = 2 × (1 − F_t(|t|; df))

  • Welch BL (1947), Biometrika 34:28–35
  • Student (1908), Biometrika 6:1–25

When to use the T-Test

  • Comparing two groups

    The independent t-test asks whether two group means really differ, for example scores of a class using a new teaching method against a regular class.

  • Before and after a treatment

    The paired test is for the same subjects measured twice, such as blood pressure before and after an exercise programme. Both data columns must be in the same order.

  • Welch's test without equal variances

    The calculator uses Welch's test, which does not assume equal variances. It stays accurate when the groups differ in size and spread.

  • p-value and decision

    When the p-value is below α, the difference is significant and H₀ is rejected. The decision is written out so it can be copied into a research report.

Frequently asked questions

What does a t-test assume?

Roughly normal data, or a large enough sample, and independent observations. For very skewed data, consider a nonparametric test.

When should I use a one-sided test?

Only when the hypothesis states a direction in advance, such as the new method being better. The one-sided p-value applies when t points in that direction.

Why are the degrees of freedom a decimal?

Welch's test uses the Welch–Satterthwaite formula, which gives fractional degrees of freedom, and the p-value is computed with that value directly.

How small can a t-test sample be?

Technically two values per group can be computed, but the result is very unstable. Samples of 20–30 per group make the test far more reliable, especially when the data are not truly normal.

Independent or paired?

Use paired when each value in group 1 pairs with one value in group 2 from the same subject. Use independent when the two groups contain different subjects.

Related calculators