t-Statistic Calculator
Compute the t-statistic from your sample data to use in hypothesis testing.
📖 What is the t-Statistic?
The t-statistic is the standardised test statistic used in Student's t-test. It measures the size of the difference relative to the variation in the sample data. Specifically, it tells you how many standard errors the observed sample mean is from the null hypothesis mean.
The formula t = (x̄ − μ₀) / (s/√n) has three components: the numerator (x̄ − μ₀) is the raw difference between the sample mean and the null hypothesis value; the denominator s/√n is the standard error of the mean (SEM) - a measure of how precisely the sample mean estimates the population mean. A t-statistic of 2.5 means the sample mean is 2.5 standard errors above the null hypothesis value.
The t-statistic is compared to the t-distribution (not the normal distribution) because we are using the estimated standard deviation s rather than the known population σ. The t-distribution has heavier tails than the normal distribution, reflecting the extra uncertainty from estimating σ. As sample size increases, the t-distribution approaches the standard normal distribution.
After computing the t-statistic, the next step is to find the p-value or compare to the critical value to make a conclusion about the hypothesis test. Use the p-Value Calculator or t-Test Calculator for the complete test.
📐 Formula
x̄ = sample mean | μ₀ = null hypothesis mean
s = sample standard deviation | n = sample size
SE (standard error) = s / √n = standard deviation of the sampling distribution of x̄
Degrees of freedom: df = n − 1 (one-sample and paired)
Two-sample pooled: t = (x̄₁ − x̄₂) / [sp√(1/n₁+1/n₂)], df = n₁+n₂−2
Welch's: t = (x̄₁−x̄₂)/√(s₁²/n₁+s₂²/n₂), df from Welch-Satterthwaite equation
📖 How to Use This Calculator
📝 Example Calculations
Example 1 - One-Sample
x̄ = 52.3, s = 8.4, n = 25, μ₀ = 50. SE = 8.4/√25 = 1.68. t = (52.3−50)/1.68 = 1.369, df = 24.
Example 2 - Two-Sample Pooled
Group 1: x̄=68, s=10, n=30. Group 2: x̄=62, s=11, n=28. sp = √[(29×100+27×121)/56] = √108.9 = 10.44. SE = 10.44×√(1/30+1/28) = 2.76. t = (68−62)/2.76 = 2.17, df = 56.
Example 3 - Paired
d̄ = 4.2, s_d = 6.1, n = 20 pairs. SE = 6.1/√20 = 1.364. t = 4.2/1.364 = 3.08, df = 19.
Example 4 - Welch's
Group 1: x̄=105, s=15, n=18. Group 2: x̄=95, s=25, n=12. SE = √(225/18+625/12) = √(12.5+52.08) = 8.04. t = (105−95)/8.04 = 1.24.