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.
Significant difference
How this is computed
✓ 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 group, compared against a known or claimed value. Is the mean delivery time really 30 minutes like the ad says?
Two independent groups, different subjects in each. Did students taught with the new method score higher than the control class?
The same subjects measured twice, before and after. Did blood pressure drop after eight weeks of treatment?
Assumptions to check
| Assumption | What it means | How much it matters |
|---|---|---|
| Independence | Observations do not influence each other | Critical, no fix within the t-test |
| Roughly normal data | Each group's values are not wildly skewed | Relaxes as n grows (n ≥ 30 per group is comfortable) |
| Equal variances | Similar spread in both groups | Not 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.