Home · Statistics · Inference & Tests · t-test Calculator
t-test Calculator
The t-test statistic: one sample against a hypothesised mean, or two samples against each other with the equal-variance (pooled) formula.
What this calculator does
The t-test statistic: one sample against a hypothesised mean, or two samples against each other with the equal-variance (pooled) formula. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
One-sample mode (default) compares mean 1, SD 1 and n 1 against the hypothesised mean μ₀, on n₁ − 1 degrees of freedom.
Two-sample mode pools the two standard deviations and runs on n₁ + n₂ − 2 degrees of freedom; it assumes a common population variance.
Compare |t| with the t critical value for the degrees of freedom, or convert it with the p-value calculator.
Worked example
With the example inputs this page opens with (mean 1 53, mean 2 48, standard deviation 1 10, standard deviation 2 11), the result is 1.5000. Change any figure and the result updates with the same formula.
Quick reference
| Mean 1 | Result |
|---|---|
| 26.5 | -11.7500 |
| 42.4 | -3.8000 |
| 53 | 1.5000 |
| 66.25 | 8.1250 |
| 79.5 | 14.7500 |
| 106 | 28.0000 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
What is the difference between the one-sample and two-sample t-test?
The one-sample test asks whether a single group's mean differs from a fixed reference value μ₀. The two-sample test asks whether two groups' means differ from each other, so its numerator is the gap between the two sample means.
When should I avoid the pooled two-sample version?
When the two groups' spreads are clearly unequal or the group sizes differ a lot — then Welch's t-test, which keeps the variances separate and adjusts the degrees of freedom, controls the error rate better.
How does the t-test Calculator work?
The t-test statistic: one sample against a hypothesised mean, or two samples against each other with the equal-variance (pooled) formula. Mode · Means · SDs · Sample sizes · Hypothesised mean μ₀ → t-statistic. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the t-test Calculator need?
Mode · Means · SDs · Sample sizes · Hypothesised mean μ₀ → t-statistic. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.