T Distribution Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter a t score and its degrees of freedom to get the cumulative probability and the p-value, and a significance level to get the critical values of Student's t distribution.
Result
P-value
P(T ≤ t), left tail
- P(T ≥ t), right tail
- Critical t, two-tailed (t such that P(|T| ≥ t) = α)
- Critical t, one-tailed (t such that P(T ≥ t) = α)
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.
- t score: enter a number.
- Degrees of freedom (df): enter 1 or more.
- Test: choose Two-tailed, Left-tailed or Right-tailed.
- Significance level α (for critical values): enter a number from 0.0001 to 0.5.
- Read the result: P-value; the panel also shows P(T ≤ t), left tail, P(T ≥ t), right tail, Critical t, two-tailed (t such that P(|T| ≥ t) = α) and Critical t, one-tailed (t such that P(T ≥ t) = α).
How this calculator works
Student's t distribution with ν degrees of freedom has the cumulative distribution F(t) = 1 − ½ I_x(ν/2, ½) for t ≥ 0, with x = ν ÷ (ν + t²) and I the regularized incomplete beta function; by symmetry F(−t) = 1 − F(t).
Two-tailed p-value = 2 × (1 − F(|t|)); left-tailed = F(t); right-tailed = 1 − F(t). Critical values invert F: the two-tailed critical t is F⁻¹(1 − α/2), the one-tailed one F⁻¹(1 − α).
The incomplete beta function is evaluated by continued fractions (Numerical Recipes, chapter 6), and the inverse by bisection, accurate well beyond the four decimals shown. Degrees of freedom may be fractional, as in Welch's test.
The formula
| Symbol | Meaning |
|---|---|
| t score | |
| Degrees of freedom (df) | |
| One if Test is Two-tailed, zero otherwise | |
| One if Test is Left-tailed, zero otherwise | |
| P-value | |
tcdf(t, d) | the probability that a Student's t variable with d degrees of freedom is at most t. |
Worked example
| t score | 2.1 |
|---|---|
| Degrees of freedom (df) | 15 |
| Test | Two-tailed |
| Significance level α (for critical values) | 0.05 |
| P(T ≤ t), left tail | 0.9735 |
|---|---|
| P(T ≥ t), right tail | 0.0265 |
| Critical t, two-tailed (t such that P(|T| ≥ t) = α) | 2.1314 |
| Critical t, one-tailed (t such that P(T ≥ t) = α) | 1.7531 |
P-value 0.0531
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the critical t for 95% confidence with 10 degrees of freedom?
About 2.2281 (two-tailed, α = 0.05).
When does the t distribution look like the normal distribution?
As the degrees of freedom grow. With df above about 30, critical values are close to the normal ones (1.96 for 95% two-tailed), and they equal them in the limit.
How do I get the degrees of freedom?
For a one-sample t-test, df = n − 1. For a pooled two-sample test, df = n₁ + n₂ − 2.