T-Test Calculator
The t-test (Student's t-test) is a parametric hypothesis test that checks whether a difference between means is statistically significant. The test statistic is the ratio of the observed difference to its standard error: the further the difference exceeds the fluctuation you would expect by chance, the larger t becomes and the smaller the p-value. Pretest-posttest comparisons, treatment-control designs, and comparing a mean against a benchmark value are the typical uses.
This calculator works from summary statistics (mean, standard deviation, n) and needs no raw data. In one-sample mode it compares a group mean against a fixed test value; in independent samples mode it compares the means of two separate groups. If the variances are unequal, the Welch correction can be applied. The output gives the t statistic, the degrees of freedom, the p-value, the Cohen d effect size, and a results sentence in APA format ready for your paper.
Accepted Cutoffs in a T-Test
A t-test result is judged against two criteria: the p-value shows whether the difference could be due to chance, while Cohen d shows how large it is in practical terms. The bounds below are the cutoffs this calculator uses in its decision and interpretation sentences.
- Significance level (α)
- 0.05
- The standard threshold in the social sciences; if p < 0.05 the difference is accepted as statistically significant. The calculator bases its decision on this level.
- Cohen d — negligible effect
- |d| < 0.20
- Even when the difference comes out significant, its practical counterpart is small enough to be negligible
- Cohen d — small effect
- 0.20 – 0.50
- The difference between the means is between one fifth and one half of a standard deviation
- Cohen d — medium effect
- 0.50 – 0.80
- The typical range of effects regarded as meaningful in applied studies
- Cohen d — large effect
- |d| ≥ 0.80
- The difference is at least eighty percent of a standard deviation; the groups separate clearly
- Welch correction threshold
- Levene p < 0.05
- When the assumption of homogeneity of variance is rejected or the group sizes are unequal, the Welch–Satterthwaite corrected result is reported
Formula
One sample: t = (x̄ − μ₀) / (s / √n), df = n − 1 Independent (equal variances): t = (x̄₁ − x̄₂) / √( s²p · (1/n₁ + 1/n₂) ), df = n₁ + n₂ − 2 s²p = [ (n₁−1)s₁² + (n₂−1)s₂² ] / (n₁ + n₂ − 2) Welch: t = (x̄₁ − x̄₂) / √( s₁²/n₁ + s₂²/n₂ ), df = Welch–Satterthwaite Cohen d = difference / (pooled) standard deviation
Using the classical pooled formula when the variances differ markedly (Levene's test p < 0.05 in SPSS) is a common mistake; in that case the Welch-corrected result should be reported.
How to Calculate
- Choose the test type: one sample or independent samples? (For pretest-posttest, use the difference scores in one-sample mode with μ₀ = 0.)
- Enter the summary statistics: mean, standard deviation, and sample size (for both groups in the independent samples test).
- In the independent samples test, choose the variance assumption; tick the Welch correction when Levene's test gives p < 0.05.
- Review the t value, the degrees of freedom, the p-value, and the Cohen d effect size in the results section.
- Copy the APA-style results sentence from the interpretation line (e.g. t(29) = 3.65; p = 0.001; d = 0.67) into your report.
Worked Examples
One sample: comparing an exam mean against a benchmark
Thirty students have an exam mean of 78 and a standard deviation of 12; the benchmark value is 70. The result is t(29) = 3.65; p = 0.001; d = 0.67. The difference is significant and the effect is medium.
t statistic: 3.651 · Degrees of freedom (df): 29 · p-value (two-tailed): p = 0.001
Independent samples: treatment versus control
Comparing the treatment group (n₁ = 25, x̄₁ = 82, s₁ = 8) with the control group (n₂ = 25, x̄₂ = 76, s₂ = 9) gives t(48) = 2.49; p = 0.016; d = 0.70: the 6-point difference is significant (a medium effect).
t statistic: 2.491 · Degrees of freedom (df): 48 · p-value (two-tailed): p = 0.016
Welch-corrected test (unequal variances)
For two groups whose standard deviations differ markedly (15 and 8), the Welch correction gives t(61.07) = 2.56; p = 0.013; d = 0.57; the degrees of freedom can come out fractional.
t statistic: 2.564 · Degrees of freedom (df): 61.07 · p-value (two-tailed): p = 0.013