T-Statistic Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter your sample mean, the mean under the null hypothesis, the sample standard deviation and the sample size.
Result
t statistic
Degrees of freedom (n − 1)
- Two-tailed p-value
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Sample mean (x̄): enter a number.
- Hypothesized mean (μ₀): enter a number.
- Sample standard deviation (s): enter 0 or more.
- Sample size (n): enter 2 or more.
- Read the result: t statistic; the panel also shows Degrees of freedom (n − 1) and Two-tailed p-value.
How this calculator works
t = (x̄ − μ₀) ÷ (s ÷ √n), with n − 1 degrees of freedom, where x̄ is the sample mean, μ₀ the hypothesized mean, s the sample standard deviation and n the sample size.
The two-tailed p-value is P(|T| ≥ |t|) under Student's t distribution, computed with the regularized incomplete beta function.
The formula
| Symbol | Meaning |
|---|---|
| Sample mean | |
| Hypothesized mean (μ₀) | |
| Sample standard deviation (s) | |
| Sample size | |
| t statistic |
Worked example
| Sample mean (x̄) | 52.3 |
|---|---|
| Hypothesized mean (μ₀) | 50 |
| Sample standard deviation (s) | 6.1 |
| Sample size (n) | 20 |
| Degrees of freedom (n − 1) | 19 |
|---|---|
| Two-tailed p-value | 0.1081 |
t statistic 1.6862
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
When do I use a t statistic instead of a z statistic?
When the population standard deviation is unknown and you use the sample's standard deviation, which is almost always the case.
What is a large t statistic?
With 19 degrees of freedom, |t| above 2.093 is significant at α = 0.05 (two-tailed).