Written by Dackohn; last reviewed November 2026.

To do a two-sample t-test by hand: find the standard error of the difference, divide the difference in means by it to get t, then compare t with the t-distribution. For means of 24.1 and 20.5, SDs of 3.2 and 4.1 and 20 in each group, t = 3.10 and p = .004.

The data

A tutoring group (M = 24.1, SD = 3.2, n = 20) and a control group (M = 20.5, SD = 4.1, n = 20). Did tutoring make a difference?

Step 1: The standard error of the difference

Divide each variance by its sample size and add: 3.2² / 20 = 0.512 and 4.1² / 20 = 0.8405. Then SE = √(0.512 + 0.8405) = 1.163.

Step 2: The t statistic

t = (24.1 − 20.5) / 1.163 = 3.6 / 1.163 = 3.10. The difference is about three standard errors from zero.

Step 3: Degrees of freedom

Welch’s test, the safer default, uses the Welch–Satterthwaite formula:

df = (0.512 + 0.8405)² / (0.512² / 19 + 0.8405² / 19) = 35.88

Student’s test simply uses n₁ + n₂ − 2 = 38, but it assumes equal variances. See Welch vs Student.

Step 4: The p-value

With a t-table, round df down to 35 or use the nearest row below. The two-sided critical value at α = .05 is about 2.03, and 3.10 exceeds it, so the result is significant. Software gives the exact value: p = .004. In Excel: =T.DIST.2T(3.0955,35.88).

Step 5: Confidence interval

Difference ± tcrit × SE = 3.6 ± 2.028 × 1.163, which is 1.24 to 5.96. It excludes 0, matching the test.

Step 6: Effect size

The pooled SD is √((19 × 3.2² + 19 × 4.1²) / 38) = 3.68, so Cohen’s d = 3.6 / 3.68 = 0.98, a large effect.

Writing it up

“A Welch’s t-test showed significantly higher test scores for the tutoring group (M = 24.10, SD = 3.20) than for the control group (M = 20.50, SD = 4.10), t(35.88) = 3.10, p = .004, d = 0.98.”

Common mistakes

Try it yourself

T-Test From Means and SDs →Check this example, or run your own from summary statistics. T-Test Calculator →Run the test from raw data.

Frequently asked questions

What is the formula for a two-sample t-test?

t = (mean 1 - mean 2) / square root of (s1 squared / n1 + s2 squared / n2). This is the Welch version.

Do I need raw data for a t-test?

No. The means, SDs and sample sizes are enough for an independent-samples test.

Why does the pooled test give the same t here?

With equal group sizes, the pooled and Welch standard errors are identical. Only the degrees of freedom differ.

Related reading: Welch vs Student t-test · How to calculate a p-value · Paired vs independent samples


Sources & further reading: NIST/SEMATECH e-Handbook of Statistical Methods · OpenStax Introductory Statistics. How we compute & validate: methodology. Written & reviewed by Dackohn; last reviewed August 2026.