Student's t-Distribution Calculator

Student's t-Distribution Calculator

Growing AI Skill PRO

Enter Calculation

Formula

f(x)=Γ(ν+12)νπΓ(ν2)(1+x2ν)−ν+12f(\text{x}) = \frac{\Gamma\!\left(\frac{\nu+1}{2}\right)}{\sqrt{\nu\pi}\;\Gamma\!\left(\frac{\nu}{2}\right)}\left(1 + \frac{\text{x}^{2}}{{\nu}}\right)^{-\frac{\nu+1}{2}}
Show calculation steps (1)
  1. Cumulative Distribution Function (CDF)

    F(x)=1−12Iz(ν2,12)where{z=νν+x2ν=Degrees of freedom\begin{gathered} F(\text{x}) = 1 - \tfrac{1}{2}\,I_{z}\!\left(\tfrac{\nu}{2},\tfrac{1}{2}\right) \\[1.5em] \text{where}\quad \left\{ \begin{aligned} z &= \dfrac{{\nu}}{{\nu} + \text{x}^{2}} \\ \nu &= \text{Degrees of freedom} \end{aligned} \right. \end{gathered}

    Lower-tail probability using the regularized incomplete beta function I; z = nu / (nu + x^2). For x > 0 the value is 1 minus half of the same expression.

Usage stats

Advertisement

Results

Probability density f(x)
0.230362
value of the t-distribution density at x
Lower cumulative probability P(T ≤ x) 0.829553
Upper cumulative probability Q(T > x) 0.170447

Report an error on this page

What is the Student's t-Distribution Calculator?

This tool evaluates the Student's t-distribution for a given value x (the t statistic) and degrees of freedom ν. It returns three quantities: the probability density f(x), the lower cumulative probability P(T ≤ x), and the upper cumulative probability Q = P(T > x) = 1 − P. This is pure mathematics and applies universally; no region-specific rules are involved.

Bell-shaped t-distribution curves with different degrees of freedom compared to the normal curve
The t-distribution is bell-shaped with heavier tails; it approaches the normal curve as degrees of freedom increase.

How to use it

Enter any real number for x (it may be negative) and a positive number for the degrees of freedom \(\nu\) (commonly an integer such as 5, 10 or 30, but any \(\nu > 0\) is accepted). Press calculate to obtain the density and both tail probabilities. As \(\nu\) grows large the distribution converges to the standard normal \(N(0, 1)\).

The formula explained

The density is $$f(\text{x}) = \frac{\Gamma\!\left(\frac{\nu+1}{2}\right)}{\sqrt{\nu\pi}\;\Gamma\!\left(\frac{\nu}{2}\right)}\left(1 + \frac{\text{x}^{2}}{\nu}\right)^{-\frac{\nu+1}{2}}$$ where \(\Gamma\) is the gamma function. The cumulative probability uses the regularized incomplete beta function: with \(z = \nu/(\nu + \text{x}^{2})\), \(P(T \le \text{x}) = 1 - \tfrac{1}{2}\cdot I_{z}(\nu/2, 1/2)\) for \(\text{x} \ge 0\) and \(\tfrac{1}{2}\cdot I_{z}(\nu/2, 1/2)\) for \(\text{x} < 0\). We compute the density in log space using a Lanczos log-gamma approximation and the incomplete beta via a Lentz continued fraction for numerical stability.

Advertisement
t-distribution curve showing shaded lower CDF area and upper tail area at a value x
f(x) is the curve height, P(T≤x) is the shaded left area, and Q is the remaining right tail.

Worked example

For \(\text{x} = 1.0\) and \(\nu = 10\): the density \(f(1) \approx 0.2304\). The lower cumulative probability \(P(T \le 1.0) \approx 0.8303\), so the upper cumulative probability \(Q \approx 0.1697\), matching standard t-tables.

Critical Values of the t-Distribution

The table gives the value t such that the upper-tail probability P(T > t) equals the column heading. The two-tailed level is twice the one-tailed level. These are standard textbook values rounded to three decimals.

df (ν) 0.10 (two-tailed 0.20) 0.05 (two-tailed 0.10) 0.025 (two-tailed 0.05) 0.01 (two-tailed 0.02) 0.005 (two-tailed 0.01)
1 3.078 6.314 12.706 31.821 63.657
2 1.886 2.920 4.303 6.965 9.925
3 1.638 2.353 3.182 4.541 5.841
5 1.476 2.015 2.571 3.365 4.032
10 1.372 1.812 2.228 2.764 3.169
15 1.341 1.753 2.131 2.602 2.947
20 1.325 1.725 2.086 2.528 2.845
30 1.310 1.697 2.042 2.457 2.750
60 1.296 1.671 2.000 2.390 2.660
120 1.289 1.658 1.980 2.358 2.617
∞ (normal) 1.282 1.645 1.960 2.326 2.576

As the degrees of freedom grow, the critical values decrease toward the standard normal values in the last row.

Advertisement

Interpreting the Output

  • Density f(x) is the height of the curve at x. It is not a probability; for a continuous distribution, probabilities come from areas under the curve between values.
  • Lower cumulative P(T ≤ x) is the area to the left of x. Upper tail Q = 1 − P is the area to the right of x.
  • One-tailed p-value: for an observed t statistic, Q (for a positive statistic in a right-tailed test) is the p-value. For a left-tailed test with negative t, the p-value is P(T ≤ t).
  • Two-tailed p-value: use 2Q computed at |x|, because the distribution is symmetric and both tails count.
  • Symmetry: the t-distribution is symmetric about 0, so P(T ≤ −x) = Q(x) = 1 − P(T ≤ x), and f(−x) = f(x).
  • Comparing with critical values at α = 0.05: a two-tailed test rejects when |t| exceeds the 0.025 one-tailed critical value (for example 2.228 at df = 10, or 2.042 at df = 30). A one-tailed test at α = 0.05 uses the 0.05 column (for example 1.812 at df = 10). Equivalently, the p-value is below 0.05.
  • Heavy tails: for small ν, extreme values are more probable than under the normal curve. At x = 2, Q is about 0.0510 at df = 5 versus 0.0228 for the normal. As ν increases, the t-distribution approaches the standard normal.

Example of the two-tailed rule: with df = 5 and |t| = 2, Q ≈ 0.0510, so the two-tailed p-value is about 2 × 0.0510 = 0.102, which is above 0.05.

FAQ

Can \(\nu\) be a non-integer? Yes. The formula is valid for any real \(\nu > 0\); the calculator accepts decimal degrees of freedom.

What does the upper cumulative probability mean? It is the area in the right tail, \(P(T > \text{x})\). For a two-sided p-value with positive x you would use \(2\cdot Q\).

Why does it look like a normal curve for large \(\nu\)? As degrees of freedom increase, the t-distribution's heavy tails shrink and it approaches the standard normal distribution.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators