t-Test Calculator
Paste your numbers and run a one-sample, two-sample (Welch) or paired t-test in your browser. You get the t statistic, degrees of freedom, p-value and a confidence interval — the same results as R’s t.test().
How to use it
Which t-test?
- One-sample: is a single group’s mean different from a known value (μ₀)?
- Two-sample (Welch): do two independent groups have different means? This calculator uses Welch’s version by default — it doesn’t assume equal variances and is the safer default.
- Paired: two measurements on the same subjects (before/after) — the test works on the differences.
The p-value answers “how surprising is this difference under the null?” Pair it with an effect size so you also know how big the difference is, not just whether it’s significant. And a t-test assumes roughly normal data — if that fails, consider a nonparametric alternative.
Do it in R
t.test(a, b) # two-sample Welch
t.test(a, b, paired = TRUE) # paired
t.test(a, mu = 0) # one-sampleFAQ
Frequently asked questions
Welch or Student’s t-test?
Use Welch (the default here). It doesn’t assume the two groups have equal variances and performs just as well when they do — so there’s rarely a reason to prefer Student’s.
My degrees of freedom aren’t a whole number — is that a bug?
No. Welch’s t-test uses a fractional (Satterthwaite) degrees of freedom, so a value like 12.7 is expected and matches R.
A t-test is one step. Need the full analysis, assumption checks and a report? We can help.