Free statistics tool

T Test Calculator

A t-test calculator tells you whether a mean, or the difference between two means, is statistically significant. Run a one-sample, two-sample (Welch or pooled), or paired t-test from raw data or summary statistics and get the t statistic, degrees of freedom, p-value, confidence interval, and Cohen's d.

Choose a t-test

Separate numbers with commas, spaces, semicolons, or new lines.

t-test result

Welch two-sample t-test · H0: μ1 − μ2 = 0 · H1: μ1 − μ2 ≠ 0

Conclusion at alpha = 0.05

Statistically significant

Reject the null hypothesis: a difference this large is unlikely if H0 were true.

t statistic
-4.9497
p-value
0.000104
Degrees of freedom
17.943
Mean difference
-6.9
Standard error
1.394
Cohen's d
-2.214

95% confidence interval for the difference: [-9.8294, -3.9706]Critical t = 2.1014

Sample statistics

SamplenMeanStd. deviationStd. error
Sample 11049.63.20421.0132
Sample 21056.53.02770.9574

Statistical results are educational and should be reviewed alongside study design, assumptions, effect sizes, and domain context.

T-test formulas

One-sample
t = (x̄ − μ0) / (s / √n), df = n − 1
Paired
t = (d̄ − Δ0) / (s_d / √n), df = n − 1
Welch two-sample
t = (x̄1 − x̄2 − Δ0) / √(s1²/n1 + s2²/n2), Welch–Satterthwaite df
Pooled two-sample
t = (x̄1 − x̄2 − Δ0) / (s_p √(1/n1 + 1/n2)), df = n1 + n2 − 2

T-test assumptions

  • Independent observations: each value (or each pair, for a paired test) should not influence another.
  • Roughly normal data: matters most for small samples; with about 30 or more per group the t-test is fairly robust.
  • Numeric outcome: the measurement should be on an interval or ratio scale, such as time, revenue, or a rating average.
  • Equal variances (pooled test only): Welch's test drops this assumption, which is why it is the default.

T test calculator FAQ

What is a t-test?

A t-test checks whether a mean, or the difference between two means, is far enough from a hypothesized value that random sampling noise is an unlikely explanation. It uses the Student t distribution, which accounts for the extra uncertainty of estimating the standard deviation from the sample.

Which t-test should I use?

Use a one-sample t-test to compare one group's mean with a fixed target, a two-sample t-test for two independent groups such as control and variant users, and a paired t-test when the same people or items are measured twice, such as before and after a change.

Should I use Welch's t-test or the pooled (Student) t-test?

Use Welch's t-test by default. It does not assume equal variances and loses very little power when variances are equal. The pooled Student t-test is only appropriate when you have good reason to believe both groups have the same variance.

How do I interpret the t-test p-value?

The p-value is the probability of a t statistic at least this extreme if the null hypothesis were true. If p is below your alpha, commonly 0.05, the difference is statistically significant. A p-value does not measure how large or important the difference is; check the confidence interval and Cohen's d for that.

What does Cohen's d mean?

Cohen's d is the difference in means divided by the standard deviation. Roughly, 0.2 is a small effect, 0.5 medium, and 0.8 large. For a paired test this calculator reports d_z, the mean difference divided by the standard deviation of the differences.