Home / Tools / t-Test Calculator

t-Test Calculator

A t-test asks a simple question: do two groups (or one group versus a known value) have meaningfully different averages, or could the gap be random chance? Drop in raw data or just the means and SDs to get a clear verdict, the effect size (Cohen's d) and a confidence interval. Everything runs in your browser.

Significance Tails
p < 0.05

Significant difference

t statistic
-
df
-
p-value
-
95% CI
-
Cohen's d
-

How this is computed
1
2
3
4The p-value comes from the t distribution with those degrees of freedom; the confidence interval and Cohen's d complete the picture.
The same test in R

  

No data leaves your browser Verified against R's t.test() to 7+ decimals Free, no sign-up

Which t-test do I need?

Three tests, one decision rule: how many groups do you have, and are the measurements connected?

One-sample

One group, compared against a known or claimed value. Is the mean delivery time really 30 minutes like the ad says?

one group vs a number
Two-sample (Welch)

Two independent groups, different subjects in each. Did students taught with the new method score higher than the control class?

group A vs group B
Paired

The same subjects measured twice, before and after. Did blood pressure drop after eight weeks of treatment?

before vs after, same people

Assumptions to check

AssumptionWhat it meansHow much it matters
IndependenceObservations do not influence each otherCritical, no fix within the t-test
Roughly normal dataEach group's values are not wildly skewedRelaxes as n grows (n ≥ 30 per group is comfortable)
Equal variancesSimilar spread in both groupsNot required here: Welch's correction handles unequal spread

Heavily skewed data with a small sample? Consider the Mann-Whitney U test (independent groups) or the Wilcoxon signed-rank test (paired data) instead.

Frequently asked questions

Which t-test should I use?

One-sample compares a single group against a fixed number. Two-sample compares two independent groups. Paired compares the same subjects measured twice. If you are unsure between two-sample and paired, ask whether row 1 in group A belongs to the same subject as row 1 in group B; if yes, it is paired.

What does the p-value mean?

It is the probability of seeing a difference at least as large as yours if the true difference were zero. It is not the probability that your hypothesis is true. Small p (below your significance level) means chance alone is an unlikely explanation.

Why Welch's test instead of Student's?

Student's t-test assumes both groups have the same variance; Welch's does not. When variances happen to be equal the two tests agree almost exactly, and when they differ Welch's stays accurate while Student's can mislead. That is why R made Welch the default, and why this calculator does too.

What is Cohen's d and why should I care?

With a big enough sample, even a trivial difference becomes statistically significant. Cohen's d measures the size of the difference in standard deviation units, so you can tell meaningful from merely detectable. Rough guide: 0.2 small, 0.5 medium, 0.8 large.

Does this calculator match R?

Yes. The t statistic, degrees of freedom, p-value and confidence interval are verified against R's t.test() across one-sample, two-sample and paired modes, including one-tailed tests and edge cases, to at least seven decimal places.

Why Welch's t-test instead of Student's?

Welch's t-test does not assume the two groups have equal variances, so it stays accurate when spreads differ. It is R's default and the safer choice in almost every situation.

What is Cohen's d?

Cohen's d expresses the difference between means in standard deviation units, so you can judge whether a statistically significant difference is practically meaningful. Roughly: 0.2 is small, 0.5 medium, 0.8 large.

Go deeper