Student t Distribution Calculator

Find Student's t probabilities below, above, between or outside values, or the t value that matches a tail probability. Enter the degrees of freedom; the mean, variance and median come with a shaded density chart.

Positive; a decimal is fine, for example from a Welch test

What the t distribution is

When you estimate a mean from a small sample and have to use the sample standard deviation in place of the unknown population one, the standardised mean follows a t distribution instead of the normal. It is symmetric and bell shaped like the standard normal but has heavier tails, and the fewer the degrees of freedom, the heavier they are. As the degrees of freedom grow it approaches the standard normal, which is why z values are a good approximation for large samples.

t = (x̄ − μ) / (s / √n), with ν = n − 1 degrees of freedom for one sample from a normal population

f(x) = Γ((ν + 1) / 2) / (√(νπ) Γ(ν / 2)) · (1 + x² / ν)^(−(ν + 1) / 2)

Mean = 0 for ν > 1 Variance = ν / (ν − 2) for ν > 2 Skewness = 0 for ν > 3

Which option gives which answer

You wantChooseEnter
Left-tail p-valueP(X ≤ x)x = your t statistic
Right-tail p-valueP(X ≥ x)x = your t statistic
Two-tailed p-valueP(X ≤ a or X ≥ b)a = −|t| and b = |t|
Critical value, one-tailed testFind x from an upper-tail probabilityp = α
Critical value, two-tailed testFind x from an upper-tail probabilityp = α / 2

The degrees of freedom depend on the test: n − 1 for a one-sample or paired test, n₁ + n₂ − 2 for a pooled two-sample test, a fractional value for a Welch test, and n − 2 for a regression slope. The degrees of freedom calculator covers each case.

Critical values for a 95% confidence level

Degrees of freedomTwo-sided (2.5% in each tail)One-sided (5% in the upper tail)
112.70626.3138
24.30272.9200
52.57062.0150
102.22811.8125
202.08601.7247
302.04231.6973
602.00031.6706
1201.97991.6577
∞ (standard normal)1.96001.6449

For other levels or degrees of freedom use the calculator above, or look values up in the t table. The critical value calculator covers the z, t, chi-square and F cases in one place.

Worked example

A sample of 11 measurements gives ν = 10 degrees of freedom. The t value with 2.5% of the area in the upper tail is 2.228139, so a 95% confidence interval is the sample mean plus or minus 2.228139 × s/√11 (see the t interval calculator). Turned around, a t statistic of 2.228139 gives a two-tailed p-value of 0.05: choose the outside option with a = −2.228139 and b = 2.228139. Load example shows the critical value, with a variance of 10/8 = 1.25 and a standard deviation of 1.118.

Software equivalents

SoftwareLeft tailRight tail and two-tailedInverse
Excel / SheetsT.DIST(x, df, TRUE)T.DIST.RT(x, df) and T.DIST.2T(x, df)T.INV(p, df) and T.INV.2T(α, df)
Rpt(x, df)pt(x, df, lower.tail = FALSE) and 2 * pt(-abs(x), df)qt(p, df)
Python (SciPy)scipy.stats.t.cdf(x, df)scipy.stats.t.sf(x, df) and 2 * scipy.stats.t.sf(abs(x), df)scipy.stats.t.ppf(p, df)
TI-84tcdf(-1E99, x, df)tcdf(x, 1E99, df)invT(p, df)

Excel's T.DIST.RT and T.DIST.2T require a non-negative x. The TI-84 functions are explained on the tcdf and invT pages, and the tests that use this distribution are the t test, the two-sample t test and the paired t test.

Frequently Asked Questions

How do I get a two-tailed p-value from a t statistic?

Choose the probability outside a and b and enter a = −|t| and b = |t|. The result is the two-tailed p-value, which equals twice the right-tail probability of |t|.

How do I find the critical t value?

Choose the option that finds x from an upper-tail probability and enter α for a one-tailed test or α/2 for a two-tailed test, together with the degrees of freedom. For 10 degrees of freedom and α = 0.05 two-tailed the critical value is 2.228139.

How does the t distribution differ from the normal distribution?

It has heavier tails, so extreme values are more likely and the critical values are larger. With 30 degrees of freedom the two-sided 95% value is 2.0423 against 1.96 for the normal, and the gap closes as the degrees of freedom increase.

Can the degrees of freedom be a decimal?

Yes. Welch's t test and other approximations produce non-integer degrees of freedom, and the t distribution is defined for any positive value. The calculator accepts any positive number.

Why does the calculator say the mean or variance is undefined or infinite?

The heavy tails of a t distribution with very few degrees of freedom make the moments diverge. The mean exists only for ν > 1, the variance is infinite for 1 < ν ≤ 2 and equals ν/(ν − 2) for ν > 2, and the skewness exists for ν > 3.

How many degrees of freedom should I use?

Use n − 1 for a one-sample or paired t test, n₁ + n₂ − 2 for a pooled two-sample test, the Welch–Satterthwaite value for unequal variances, and n − 2 for the slope in simple linear regression.

Embed This Calculator

Add this free calculator to your course page or LMS.

Adjust the height value to fit your page.