Skip to content
Calcrivo

T-Test Calculator

Perform a one-sample or two-sample t-test with t statistic, degrees of freedom and p-value.

Inputs

Used only for two-sample test

Used only for one-sample test

t Statistic

3.0000

P-value (two-tailed)

0.017072

Degrees of Freedom

8.00

Step by step

  1. Values used

    Test type = Two-sample (compare two means); Sample 1 (comma separated) = 5, 7, 9, 6, 8; Sample 2 (comma separated) = 3, 5, 4, 6, 2; Hypothesised mean μ₀ = 5

  2. One-sample t

    t = (x̄ − μ₀) / (s / √n)

  3. Two-sample t (Welch)

    t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)

  4. t Statistic

    = 3.0000

  5. P-value (two-tailed)

    = 0.017072

  6. Degrees of Freedom

    = 8.00

How it works

The t-test determines whether a sample mean (or the difference between two sample means) is statistically significantly different from a hypothesised value. This calculator uses Welch's t-test for two samples, which does not assume equal variances.

Formulas

One-sample t

t = (x̄ − μ₀) / (s / √n)

Sample mean
μ₀
Hypothesised mean
s
Sample SD
n
Sample size

Two-sample t (Welch)

t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)

x̄₁,x̄₂
Sample means
s₁²,s₂²
Sample variances
n₁,n₂
Sample sizes

Frequently Asked Questions

When should I use a one-sample vs two-sample t-test?

Use one-sample when testing if a single group's mean equals a known value. Use two-sample when comparing the means of two independent groups.

What is Welch's t-test?

Welch's t-test is a modification of the two-sample t-test that does not assume equal variances between the two groups, making it more generally applicable.

You might also need