T-Test Calculator

Paste one or two samples and get the t statistic, degrees of freedom, p-value and confidence interval, with the steps behind them.

Separate numbers with commas, spaces or line breaks. You can paste a column from Excel or Sheets. 10 values read.

Separate numbers with commas, spaces or line breaks. You can paste a column from Excel or Sheets. 10 values read.

t
4
p-value
0.0010

Statistically significant at α = 0.05.

Degrees of freedom16.2
Mean difference4
Standard error1
95% CI for the difference1.8822 to 6.1178
Cohen’s d (approx.)1.789

x̄₁ = 26, s₁ = 2.582, n₁ = 10; x̄₂ = 22, s₂ = 1.8257, n₂ = 10. t = 4 ÷ 1 = 4.

Explain my result

An AI tutor reads your numbers and explains what they mean in plain words. Sends only the inputs and results shown above.

The t statistic

t = (observed difference) ÷ (standard error of that difference)

Every version of the t-test is this ratio: how big the difference is compared with how much it would wobble from sample to sample. W. S. Gosset developed it at the Guinness brewery in 1908 and published under the pen name “Student” for testing small batches of barley.

Have a t statistic from elsewhere? Convert it with the p-value calculator. Comparing counts in categories rather than means? Use the chi-square test.

Frequently asked questions

Which t-test should I use?

One-sample: compare one group’s mean with a known value. Independent two-sample: compare the means of two separate groups, such as a treatment and a control group. Paired: compare two measurements on the same subjects, such as before and after, or left and right hand.

Welch or pooled (Student’s) t-test?

Welch’s test does not assume equal variances and loses almost nothing when they are equal, so many statisticians (and R’s t.test default) recommend it. Use the pooled version only if your course requires it or you have good reason to believe the variances are equal.

What are the assumptions of a t-test?

Independent observations, and data (or differences, for paired tests) roughly normal. With 30 or more per group, the central limit theorem makes the test robust to moderate skew. Strong outliers in small samples are the main danger.

How do I report a t-test result?

APA style: t(df) = value, p = value, with means and SDs, and ideally a confidence interval and effect size. For example: t(17.9) = 3.42, p = .003, d = 1.53.

What is Cohen’s d?

A standardised effect size: the difference in means divided by a standard deviation. Jacob Cohen suggested 0.2 as small, 0.5 medium and 0.8 large, though what matters in practice depends on the field.