T statistic calculator
- p-value
- —
- Critical t*
- —
- Decision
- —
Effect size
Critical values
Your data
The working, step by step
In plain words
—
Report it
—
—
—
A t statistic measures how many standard errors (SE) a sample result sits from the value stated in the null hypothesis. It is the signal (the observed difference) divided by the noise (the standard error of that difference). A t statistic of 2.19 means the sample mean is 2.19 standard errors away from the hypothesized mean.
William Sealy Gosset published the t distribution in 1908 under the pen name "Student", while working on small samples at the Guinness brewery in Dublin. The t statistic replaces the z statistic whenever the population standard deviation (σ) is unknown and has to be estimated from the sample. This calculator is part of the Z Test Calculator suite and shows every t value on a live t curve.
To find a t statistic, follow 3 steps in the panels on the left:
The t statistic, degrees of freedom (df), p-value, critical t, decision, both charts and the 4 detail cards update on every keystroke. All calculations run in your browser, and no data leaves your device.
The one-sample t statistic formula is t = (x̄ − μ₀) / (s / √n), with n − 1 degrees of freedom.
The numerator is the difference between the sample mean and the hypothesized mean. The denominator, s / √n, is the estimated standard error of the mean. The formula changes with the type of t statistic:
| T statistic | Formula | Degrees of freedom |
|---|---|---|
| One sample | (x̄ − μ₀) / (s / √n) | n − 1 |
| Paired | (d̄ − μd) / (sd / √n) | n − 1 (n = pairs) |
| Two sample, Welch | (x̄₁ − x̄₂ − Δ₀) / √(s₁²/n₁ + s₂²/n₂) | Welch–Satterthwaite |
| Two sample, pooled | (x̄₁ − x̄₂ − Δ₀) / (sp √(1/n₁ + 1/n₂)) | n₁ + n₂ − 2 |
Use Welch's t statistic by default, and the pooled version only when both groups have similar standard deviations. Welch's formula does not assume equal variances and gives almost the same answer as the pooled formula when the variances are equal. Tick "Assume equal variances" to switch to the pooled formula and n₁ + n₂ − 2 degrees of freedom.
Degrees of freedom set the shape of the t distribution: fewer degrees of freedom give heavier tails and larger critical values. The two-tailed critical value at α = 0.05 is 2.228 with 10 degrees of freedom, 2.042 with 30, 1.984 with 100 and 1.960 for the normal distribution. The dashed curve in the main chart is the normal distribution, so you can watch the t curve close in on it as the sample grows.
Find t* for any α and degrees of freedom with the critical value calculator.
Read a t statistic in 3 steps: its size, its p-value and its confidence interval.
The Signal ÷ noise chart draws the observed difference as a bar and marks every standard error as a tick. The number of ticks that fit inside the bar is the t statistic. The red dashed line shows how many standard errors the difference needs to reach significance at the chosen α.
The p-value is the probability of a t statistic at least as extreme as yours if the null hypothesis is true. The hatched area in the main chart is the p-value. Reject H₀ when p ≤ α, which is the same as t falling in the red rejection region. Convert any t, z, χ² or F statistic with the p-value calculator.
A 95% confidence interval for the mean is x̄ ± t* × SE, the range of plausible values for the true mean. A two-tailed test at α = 0.05 rejects H₀ exactly when the 95% interval excludes the hypothesized value. Build intervals for means and proportions with the confidence interval calculator.
Cohen's d puts the difference in standard deviation units: 0.2 is small, 0.5 is medium and 0.8 is large. A large sample makes a tiny difference significant, so report d next to every t statistic. Compare more effect size measures with the effect size calculator.
There are 3 worked examples below, one for each type of t statistic.
One sample: 25 students average 79.2 (s = 9.6). Does the mean differ from 75?
Two sample: group 1 averages 82.5 (s = 8.1, n = 30), group 2 averages 77.9 (s = 9.4, n = 28).
Paired: 15 people improve by 3.2 points on average after training (sd = 4.5).
A t statistic uses the sample standard deviation and the t distribution, while a z statistic uses a known population standard deviation and the normal distribution. Both divide a difference by its standard error. With small samples, the t statistic needs a larger value to reach significance: 2.064 with 24 degrees of freedom against 1.960 for z. Above about 100 observations, the two give nearly the same p-value.
There are 3 assumptions behind a valid t statistic:
Paste raw data to see each value on the strip plot and spot outliers before you trust the result. Calculate the spread of your data with the standard deviation calculator.
Find the t statistic by subtracting the hypothesized mean from the sample mean and dividing by the standard error, s / √n. For x̄ = 79.2, μ₀ = 75, s = 9.6 and n = 25, t = 4.2 / 1.92 = 2.19.
A negative t statistic means the sample mean is below the hypothesized value. The sign shows the direction and the size shows the distance in standard errors. A negative t is significant in a two-tailed or left-tailed test when it passes the critical value.
There is no fixed good t statistic, but |t| above 2 is significant at α = 0.05 for most samples larger than 30. The exact cut-off depends on the degrees of freedom and the tail: 2.064 for a two-tailed test with 24 degrees of freedom and 1.711 for a one-tailed test.
Yes, a t statistic is 0 when the sample mean equals the hypothesized value exactly. A t of 0 gives a two-tailed p-value of 1, the weakest possible evidence against H₀.
No, the t statistic is the number a t-test produces, and the t-test is the full procedure built around it. The test adds the hypotheses, the p-value, the decision and the conclusion. Run the full test from raw data or summaries with the t-test calculator.
Report a t statistic as t(df) = value, followed by the p-value, the confidence interval and the effect size. Example: t(24) = 2.19, p = .039, 95% CI [75.24, 83.16], d = 0.44. Give t to 2 decimals and p to 3 decimals without a leading zero.