How to use
- Choose one sample, two independent samples or paired samples.
- Paste the data, or switch to entering each group's mean, SD and n.
- Choose the alternative hypothesis and confidence level; results update instantly.
Options explained
- Welch vs Student
- Welch's t-test is the default because it doesn't assume equal variances, which is the current recommendation. Untick it for Student's equal-variance test.
- Effect size
- Cohen's d = mean difference ÷ pooled SD; for paired samples, mean difference ÷ SD of the differences.
A worked example
The default data are the two groups of extra sleep hours from R’s built-in sleep data set (10 values each). With Two independent samples selected:
| Result | Welch (default) | Student (box unticked) |
|---|---|---|
| Group means | 0.75 and 2.33 | 0.75 and 2.33 |
| Mean difference (1 − 2) | −1.58 | −1.58 |
| t | −1.861 | −1.861 |
| Degrees of freedom | 17.776 | 18 |
| p-value (two-sided) | 0.0794 | 0.0792 |
| 95% confidence interval | −3.365 … 0.205 | −3.364 … 0.204 |
| Cohen’s d | −0.832 | −0.832 |
Welch’s standard error is √(s₁²/n₁ + s₂²/n₂), with the Welch–Satterthwaite formula for the degrees of freedom. Student’s uses the pooled variance and n₁ + n₂ − 2 degrees of freedom. Cohen’s d is the same in both because it always uses the pooled SD.
The same numbers become much more significant if you treat them as the same ten people measured twice. Choose Paired samples and the test runs on the ten differences: t = −4.062 with 9 degrees of freedom and p = 0.0028. Pairing removes the variation between people, which is why it can detect a difference that the independent test cannot. Paired data need the same number of values in both boxes, in the same order.
Frequently asked questions
Can I trust the results?
They are checked against R's built-in sleep data set — t, degrees of freedom, p-value and confidence interval all match t.test().
What if my data aren't normal?
With larger samples the t-test is fairly robust. For small, clearly skewed samples consider non-parametric tests such as Mann–Whitney U or Wilcoxon.
Is my data uploaded?
No. Calculations run in your browser.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.