T-Test Calculator
A one-sample or two-sample t-test with the exact p-value — whether a mean differs from a claimed value, or two groups differ from each other.
A t-test asks whether a difference in means is larger than sampling noise would comfortably produce.
How the t-test calculator works
A t-test asks whether a difference in means is larger than sampling noise would comfortably produce. The t statistic is the difference divided by its standard error, and the p-value is the probability of seeing a difference at least that large if there were really no difference at all.
The p-value here is exact, from the incomplete beta function, rather than a normal approximation — which matters most with small samples, exactly where t-tests are used. A p below 0.05 is the conventional threshold, but it is a convention, not a discovery: it says the data would be unusual under the null hypothesis, not that the effect is large or important.
Formula: one sample: t = (x̄ − μ) ÷ (s ÷ √n); two sample: t = (x̄₁ − x̄₂) ÷ SE
Worked examples
| Inputs | t statistic | Note |
|---|---|---|
| One sample against a claimed mean of 5 | 1.7219 | t = 1.83, p = 0.11 — not significant |
| Two groups that clearly differ | -5.2754 | p well below 0.001 |
| A sample centred exactly on the claim | 0 | t = 0, p = 1 |
FAQFrequently asked questions
What does a t-test tell me?
Whether a difference in means is bigger than sampling noise would comfortably produce. It does not tell you the difference matters.
What does p < 0.05 mean?
That data this extreme would occur less than 5% of the time if there were really no difference. It is a convention, not a proof.
Is a p-value the probability the null is true?
No, and this is the commonest misreading. It is the probability of the data given the null, not of the null given the data.
One-sample or two-sample?
One sample compares a group against a claimed value; two samples compare two groups with each other.
Does this assume equal variances?
No — the two-sample test uses Welch's correction, which does not, and is the safer default.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Australian Curriculum (ACARA) — Mathematics — the terms and methods taught in Australian schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.