HomeMath › T Test Calculator

T Test Calculator

Choose one-sample, paired, or Welch two-sample, enter the means, standard deviations, and sample sizes, and get the t statistic, degrees of freedom, and two-tailed p-value with a decision at α = 0.05.

Example: with Test type Two-sample (Welch) · Mean (group 1 / sample / differences) 5.2 · Standard deviation (group 1 / sample) 1.1 · Sample size n1 (or number of pairs) 30 · Hypothesized mean μ0 (one-sample; 0 for paired) 0 → t statistic: 1.93.

  • Degrees of freedom56.45
  • p-value0.0587 (two-tailed)
  • Decision (α = 0.05)Fail to reject H0 at α = 0.05

Computed by the calculator below using its default values. Change any input to see your own numbers.

t statistic
Degrees of freedom
p-value
Decision (α = 0.05)

t = (difference in means) ÷ (standard error): signal over noise. Welch df is fractional by design.

What the t statistic compares

A t test asks whether a difference in means is bigger than the noise in your data. The t statistic is that difference divided by its standard error: signal over noise. A t near 0 means the gap is well within what sampling wobble could produce; a large absolute t means the gap stands out. Degrees of freedom track how much information the sample carries, and they set the exact shape of the t distribution you compare against.

One-sample, paired, and Welch

A one-sample test checks a mean against a fixed value. A paired test does the same on the differences between matched pairs, so enter the mean and SD of those differences with a hypothesized mean of 0. The two-sample form here uses Welch's method, which does not assume the two groups share a variance and computes an adjusted degrees of freedom, the safer default when group spreads or sizes differ.

How it’s calculated

One-sample and paired: t = (x̄ - μ0) / (s/√n), df = n - 1 (paired uses the differences with μ0 = 0). Welch two-sample: t = (x̄1 - x̄2) / √(s1²/n1 + s2²/n2), with Welch-Satterthwaite df = (s1²/n1 + s2²/n2)² / [ (s1²/n1)²/(n1-1) + (s2²/n2)²/(n2-1) ]. The two-tailed p-value is the Student's t tail area I_x(df/2, 1/2) with x = df/(df + t²), computed via the regularized incomplete beta function.

Assumes roughly normal data (or large samples) and, for the two-sample test, independent groups. The p-value uses a standard numerical approximation of the t distribution accurate to about four decimals.

Two-tailed t critical values (α = 0.05)

dfCritical t
52.571
102.228
202.086
302.042
602.000
∞ (z)1.960

Student's t distribution; reject H0 when the absolute t exceeds the critical value for your degrees of freedom.

Common mistakes

  • Feeding raw data instead of summary statistics. This tool takes means, standard deviations, and sample sizes.
  • Using a one-sample test on paired data. Compute the differences first, then test their mean against 0.
  • Reading a large p-value as proof of no effect. It means the data do not show a significant difference, not that none exists.
  • Confusing the two-tailed p reported here with a one-tailed test; halve it only if your hypothesis is directional.

Frequently asked questions

What does this t test calculator compute?

It returns the t statistic, degrees of freedom, and a two-tailed p-value for a one-sample, paired, or Welch two-sample test, plus a reject or fail-to-reject decision at α = 0.05. Enter summary statistics, not raw data.

What is the t statistic formula?

For one sample, t = (x̄ - μ0) / (s/√n) with df = n - 1. For two independent samples it uses Welch's t = (x̄1 - x̄2) / √(s1²/n1 + s2²/n2) with an adjusted degrees of freedom.

How do I run a paired t test here?

Compute the difference for each pair, then enter the mean and standard deviation of those differences and the number of pairs, testing against a hypothesized mean of 0 in one-sample mode.

What does the p-value mean?

It is the probability of seeing a t at least this extreme if the null hypothesis were true. Below your significance level (commonly 0.05) you reject the null; above it you fail to reject.

Why Welch instead of a pooled t test?

Welch's test does not assume the two groups have equal variances, so it stays accurate when spreads or sample sizes differ. It is widely recommended as the default two-sample test.