T-Test Calculator: One, Two and Paired

This t-test calculator compares means using your raw data. Choose a one-sample t-test to compare a sample mean with a target value, a two-sample t-test to compare two independent groups (Welch's test by default, or the pooled equal-variance test), or a paired t-test for before-and-after measurements on the same subjects. Paste the numbers separated by commas or spaces. You get the t statistic, degrees of freedom, two-tailed and one-tailed p-values, the mean difference with its confidence interval, and a plain-English decision at your significance level.

T-Test Calculator

Run a one-sample, two-sample (Welch or pooled) or paired t-test from raw data.

Everything runs in your browser. Nothing you type is sent to a server.

How to use the T-Test Calculator

  1. Choose the type of t-test.
  2. Paste sample 1 (and sample 2 for two-sample or paired tests).
  3. For one-sample tests, enter the hypothesized mean.
  4. Read t, df, the p-value and the decision.

T-test formulas

One-sample: t = (x̄ − ฮผ₀) ÷ (s ÷ √n) · Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂) · Paired: t = d̄ ÷ (s_d ÷ √n)

Features

  • One-sample, Welch, pooled and paired t-tests
  • Two-tailed and one-tailed p-values
  • Confidence interval for the difference
  • Summary stats for each sample
  • Works with any sample size of 2 or more

Frequently asked questions

What does a t-test tell you?

A t-test tells you whether the difference between means is larger than you would expect from random sampling alone, using the t distribution.

Which t-test should I use?

Use a one-sample test against a known value, a paired test when the same subjects are measured twice, and a two-sample test for two separate groups. Welch's test is the safe default for two groups.

What is Welch's t-test?

It is a two-sample t-test that does not assume equal variances. It adjusts the degrees of freedom with the Welch–Satterthwaite formula.

What is a good p-value for a t-test?

By convention, p below 0.05 is called statistically significant. It does not measure how big or important the difference is.

How is the t statistic calculated?

For a one-sample test, t = (mean − ฮผ₀) ÷ (s ÷ √n). For 5, 7, 8, 6, 9 vs ฮผ₀ = 5, the mean is 7, s = 1.581 and t = 2.828 with 4 df, p = 0.047.