T-Test Calculator

One-sample, two-sample (Welch or pooled) and paired t-tests from raw data.

About this tool

Choose the test, paste your samples as numbers separated by spaces, commas or new lines, and optionally set a hypothesised mean or difference. The calculator shows the t statistic, degrees of freedom, two-tailed and one-tailed p-values, the mean difference with its 95% confidence interval, Cohen's d effect size, and each sample's size, mean and standard deviation.

How t-tests work

A t-test asks whether a difference in means is bigger than you'd expect from random sampling. It divides the difference by its standard error to get t, then uses Student's t distribution to find the p-value. Use the two-sample test for two independent groups. Welch's version is the safest default because it doesn't assume the groups have equal variances; the pooled Student version does, and gives slightly more power when that's true. Use the paired test when the same subjects are measured twice, such as before and after, because it works on the differences within each pair. Use the one-sample test to compare a mean with a fixed value. With the sample data, group A has a mean of 5.47 and group B 4.77. Welch's test gives t โ‰ˆ 3.49 with about 8.3 degrees of freedom and a two-tailed p โ‰ˆ 0.008, and Cohen's d of about 2.0 is a large effect. Honest limits: t-tests assume independent observations and roughly normal data, or samples large enough for the central limit theorem to help. Outliers can distort them. A small p-value says a difference is unlikely to be chance alone, not that it's large or important, which is why the effect size and interval matter too. The confidence interval calculator, the standard deviation calculator and the chi-square calculator cover related statistics. How A/B testing works โ€” and the three ways it lies explains significance in practice.

Frequently asked questions

Should I use Welch's or Student's t-test?

Welch's is the safer default; it stays accurate when the groups have different variances or sizes.

When do I use a paired t-test?

When each value in one sample is linked to one in the other, such as the same person measured before and after.

What is Cohen's d?

The mean difference divided by the standard deviation. Around 0.2 is small, 0.5 medium and 0.8 or more large.

Is my data saved?

No. The calculation runs in your browser and nothing is stored or sent.