T-Distribution Calculator

Find probabilities for the Student's t-distribution, or look up a critical value — a quick replacement for a printed t-table. Enter your values below, and see the formula, a worked example, and ready-to-use Python code underneath.

Enter your values

Please check your inputs.

Result

What the t-distribution tells you

The t-distribution is what you use instead of the normal distribution when working with a sample whose true standard deviation is unknown and has to be estimated. It's shaped like the normal curve but with heavier tails, and that shape is controlled entirely by one parameter: degrees of freedom.

This calculator works as a t-table replacement: give it degrees of freedom and either a t-value (to get a probability) or a target tail probability (to get the corresponding critical t-value). The t-test calculator is the tool to reach for when you have raw data and want a full hypothesis test.

T-distribution notes

P(T ≤ t) and P(T ≥ t) are read from the t-distribution's cumulative distribution function for the given degrees of freedom (df).
The critical value t₍α, df₎ is the value where the tail probability beyond it equals α.
As df → ∞, the t-distribution converges to the standard normal distribution.

Python code

from scipy.stats import t
df = 20

t.cdf(1.725, df)              # P(T \u2264 1.725)
1 - t.cdf(1.725, df)          # P(T \u2265 1.725)
t.cdf(2.086, df) - t.cdf(-2.086, df)  # P(-2.086 \u2264 T \u2264 2.086)
t.ppf(0.975, df)              # two-tailed critical value at \u03b1=0.05

Worked example

With df = 20, find the two-tailed critical t-value for α = 0.05, and check the probability beyond t = 1.725.

  1. 1
    Find the critical value.
    For a two-tailed test with α = 0.05 and df = 20, t = 2.0860 — the familiar t-table value.
  2. 2
    Check a specific t-value.
    P(T ≥ 1.725) with df = 20 comes out to 0.0500 — 1.725 is in fact the one-tailed 5% critical value for df = 20.
  3. 3
    Central probability.
    P(−2.086 ≤ T ≤ 2.086) with df = 20 is 0.9500, confirming the two-tailed 95% interval.

Frequently asked questions

How is the t-distribution different from the normal distribution?

The t-distribution looks like the normal distribution but has heavier tails, which accounts for the extra uncertainty of estimating the standard deviation from a small sample rather than knowing it exactly. As degrees of freedom increase, the t-distribution gets closer and closer to the standard normal distribution.

What are degrees of freedom in a t-distribution?

Degrees of freedom control the exact shape of the t-distribution and typically equal sample size minus 1 for a one-sample situation, or a more complex expression for two-sample tests. Lower degrees of freedom mean heavier tails and a wider spread; the shape converges to normal as degrees of freedom grow large.

When would I use this instead of the t-test calculator?

Use the t-test calculator when you have raw sample data and want to run a full hypothesis test. Use this calculator when you already have a t-statistic and degrees of freedom (from your own work or another tool) and just need the probability, or when you need a critical value for a table, without entering any data.

What does a "critical value" mean here?

The critical value is the t-value that cuts off a specified probability in the tail(s) of the distribution — the same numbers you'd look up in a printed t-table for a given significance level and degrees of freedom.

Advertisement