When you need this calculator

Often you only have summary statistics: a table in a paper, or means and SDs from a report. This calculator runs the t-test from those numbers, with no raw data. If you have the raw values, use the t-test calculator.

Worked example

Group 1 has M = 24.1, SD = 3.2, n = 20, and group 2 has M = 20.5, SD = 4.1, n = 20. Welch’s test gives t(35.88) = 3.10, p = .004, with a mean difference of 3.6 (95% CI 1.24 to 5.96) and Cohen’s d = 0.98. The full calculation is in how to do a t-test by hand.

Welch or Student?

Student’s test assumes equal variances. In our simulation with group sizes 10 and 40, where the smaller group was the more variable, Student’s test gave false positives 29.4% of the time at α = .05, while Welch’s stayed at 5.1%. See Welch vs Student t-test.

Paired data

For a paired test you need the mean and SD of the differences, not of each condition. Choose the one-sample option with a test value of 0. See paired vs independent samples.

Accuracy

t and p match SciPy’s ttest_ind_from_stats on random inputs to at least 12 decimal places.

Frequently asked questions

Can I run a t-test with only means and standard deviations?

Yes. A two-sample t-test needs only the two means, SDs and sample sizes. The result is identical to running it on the raw data.

Standard deviation or standard error?

This calculator needs standard deviations. If a paper reports standard errors, multiply each by the square root of n to get the SD.

Can I do a paired t-test from the two means and SDs?

Not without the correlation between the measurements. You need the mean and SD of the differences.

What is Hedges' g?

Cohen's d with a small correction for bias, which matters mainly in small samples.