T-Test Calculator

StatisticsLast updated: August 17, 2026

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.

For two measurements on the same people (pretest-posttest), enter the difference scores in one-sample mode with μ₀ = 0.
The sample standard deviation (with the n−1 denominator).
The fixed or theoretical value the mean is compared against.

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

Bounds valid under the Cohen (1988) classification and the APA 7 (2020) reporting rulesKaynak: Cohen, J. (1988) — Statistical Power Analysis for the Behavioral Sciences; APA Publication Manual (7th edition)

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

  1. Choose the test type: one sample or independent samples? (For pretest-posttest, use the difference scores in one-sample mode with μ₀ = 0.)
  2. Enter the summary statistics: mean, standard deviation, and sample size (for both groups in the independent samples test).
  3. In the independent samples test, choose the variance assumption; tick the Welch correction when Levene's test gives p < 0.05.
  4. Review the t value, the degrees of freedom, the p-value, and the Cohen d effect size in the results section.
  5. 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

Frequently Asked Questions

What should I do if the p-value comes out above 0.05?
A result of p > 0.05 does not prove that there is no difference between the groups; it only shows that the data at hand does not provide enough evidence for a significant one. Report the finding as it is, together with Cohen d and the descriptive statistics. If the sample is small, note in the limitations section that the study may have had low statistical power.
When is the Welch correction used?
In an independent samples test, when the variances of the groups differ markedly (Levene's test p < 0.05 in SPSS), the classical test's assumption of homogeneity of variance is violated. In that case the Welch test, which adjusts the degrees of freedom with the Welch–Satterthwaite formula, is used. The correction matters especially when the group sizes are also unequal; many statisticians recommend the Welch test as the default.
How is Cohen d interpreted?
Cohen d is the size of the difference between the means expressed in standard deviation units. The common cutoffs are: below 0.20 negligible, 0.20–0.50 small, 0.50–0.80 medium, and 0.80 or above large. The p-value only tells you whether the difference could be due to chance; Cohen d shows its practical importance, which is why the two are reported together.
Can I run a paired (dependent) t-test with this calculator?
Yes. A paired test is a one-sample t-test applied to the difference scores. Take the second measurement minus the first for each participant; enter the mean and standard deviation of those difference scores in one-sample mode and set the test value to μ₀ = 0. The result is identical to the SPSS Paired-Samples T Test output.
Which test should I use if the normality assumption fails?
If the data is not normally distributed and the sample is small, nonparametric alternatives are preferred: the Mann-Whitney U test for two independent groups and the Wilcoxon signed-rank test for paired measurements. With roughly 30 or more observations per group, the central limit theorem makes the t-test quite robust to departures from normality.
Can I compare more than two groups with a t-test?
No; comparing more than two group means with a series of pairwise t-tests inflates the Type I error rate. For three or more groups, use a one-way ANOVA and, if the result is significant, follow it with post-hoc tests to see which groups differ. You can use our ANOVA calculator for that.