T-Test Calculator
One-sample, two-sample and paired t-tests from raw data or summary statistics — with the t statistic, degrees of freedom, exact p-value, critical value, effect size and confidence interval, not just a verdict.
Try an example:
🕘 Your recent calculations
Step-by-step working
Which t-test do you need?
The one-sample test asks whether one group's mean differs from a known value — a class average against the national average, a fill weight against the label claim. The two-sample (independent) test compares two separate groups: new method vs old, treatment vs control. The paired test compares two measurements on the same subjects — before and after — by testing whether the mean of the differences is zero; because each subject is their own control, it is usually far more sensitive. All three produce a t statistic (how many standard errors the observed difference sits from zero) and a p-value: the probability of seeing a difference at least this large if the null hypothesis were true.
Two choices matter. Pooled vs Welch: the classic two-sample test assumes both groups share a variance and pools them; Welch's version drops that assumption and adjusts the degrees of freedom — when in doubt, Welch is the safer default in modern practice. Tails: a two-tailed test detects a difference in either direction and is the honest default; one-tailed tests double your sensitivity in one direction but are blind in the other and should be chosen before seeing the data, not after. Alongside the p-value this calculator reports Cohen's d (the difference in standard-deviation units: 0.2 small, 0.5 medium, 0.8 large) and a confidence interval, because "significant" alone says nothing about whether an effect is big enough to matter.
Worked example
Sample 1 (12, 15, 14, 10, 13, 16, 11, 14) has mean 13.125 and SD 2.031; sample 2 (9, 11, 10, 8, 12, 9, 10, 11) has mean 10 and SD 1.309. Pooled SD = 1.709, standard error = 1.709 × √(1/8 + 1/8) = 0.854, so t = (13.125 − 10) ÷ 0.854 = 3.658 on 14 degrees of freedom, giving p = 0.0026 — significant at α = 0.05, with a large effect (Cohen's d = 1.83).
Frequently asked questions
What does the p-value actually mean?
It is the probability of getting a difference at least as extreme as the one observed, in the direction(s) tested, if the null hypothesis (no real difference) were true. p = 0.0026 means such data would arise about 26 times in 10,000 by chance alone. It is not the probability that the null hypothesis is true, and it says nothing about the size or importance of the effect — that is what Cohen's d and the confidence interval are for.
Pooled or Welch — which should I choose?
Welch's t-test unless you have a good reason to believe the two population variances are equal. Welch behaves almost identically when variances are equal and much better when they are not, at the cost of fractional degrees of freedom. Many statisticians now recommend it as the default two-sample test; the pooled version remains common in textbooks and courses, so both are here.
What if my result is not significant?
It means the data do not rule out "no difference" at your chosen α — not that no difference exists. Small samples have low power: a real effect can easily hide in n = 8. Look at the confidence interval: if it spans both zero and differences you would care about, the honest conclusion is "not enough data yet", and the interval tells you how large an effect remains plausible.
CalcLion's t-test calculator is an original tool. P-values are computed from the t distribution via the regularised incomplete beta function. The t-test assumes approximately normally distributed data (or large enough samples) and independent observations.