T Distribution Calculator
Type the degrees of freedom and a t value and this page returns all three probabilities at once: the lower cumulative P(T <= t), the upper one-sided tail P(T >= t), and the two-sided P(|T| >= |t|), each named rather than left for you to work out which one you are looking at. Switch the direction and it goes the other way, turning a probability into the critical t in the same convention. The tail is a regularized incomplete beta evaluated by a continued fraction carried in two doubles, and every tail is kept as a logarithm as well, so a probability far below the smallest number a double can hold still prints six decimals of itself instead of the zero a plain double gives. It was measured against a 120-digit reference over 294 cases, from half a degree of freedom to a million.
df 10 t = 2.228139 lower P(T <= t) 0.975000 upper P(T >= t) 0.025000 two-sided P(|T| >= |t|) 0.050000 density f(t) 0.042385 inverse df 10, one-sided 0.95 -> t = 1.812461
You have a t value and the degrees of freedom, and you want the area under the curve.
Two-sided counts both tails beyond |t|, P(|T| >= |t|), which is twice the upper tail. The other two are on the stage above, because the convention is the thing that gets mixed up: a two-sided 0.05 and a one-sided 0.05 are different cuts of the same curve.
Critical values of the t distribution
Each column is the t value with that much area in one tail. Double the heading for the two-sided probability: the one-sided 0.025 column is the familiar two-sided 0.05, which at 10 degrees of freedom is 2.228139. Every cell here is computed by the calculator above.
| df | one-sided 0.10 | one-sided 0.05 | one-sided 0.025 | one-sided 0.01 | one-sided 0.005 |
|---|---|---|---|---|---|
| 1 | 3.077684 | 6.313752 | 12.706205 | 31.820516 | 63.656741 |
| 2 | 1.885618 | 2.919986 | 4.302653 | 6.964557 | 9.924843 |
| 3 | 1.637744 | 2.353363 | 3.182446 | 4.540703 | 5.840909 |
| 4 | 1.533206 | 2.131847 | 2.776445 | 3.746947 | 4.604095 |
| 5 | 1.475884 | 2.015048 | 2.570582 | 3.364930 | 4.032143 |
| 6 | 1.439756 | 1.943180 | 2.446912 | 3.142668 | 3.707428 |
| 7 | 1.414924 | 1.894579 | 2.364624 | 2.997952 | 3.499483 |
| 8 | 1.396815 | 1.859548 | 2.306004 | 2.896459 | 3.355387 |
| 9 | 1.383029 | 1.833113 | 2.262157 | 2.821438 | 3.249836 |
| 10 | 1.372184 | 1.812461 | 2.228139 | 2.763769 | 3.169273 |
| 11 | 1.363430 | 1.795885 | 2.200985 | 2.718079 | 3.105807 |
| 12 | 1.356217 | 1.782288 | 2.178813 | 2.680998 | 3.054540 |
| 13 | 1.350171 | 1.770933 | 2.160369 | 2.650309 | 3.012276 |
| 14 | 1.345030 | 1.761310 | 2.144787 | 2.624494 | 2.976843 |
| 15 | 1.340606 | 1.753050 | 2.131450 | 2.602480 | 2.946713 |
| 16 | 1.336757 | 1.745884 | 2.119905 | 2.583487 | 2.920782 |
| 17 | 1.333379 | 1.739607 | 2.109816 | 2.566934 | 2.898231 |
| 18 | 1.330391 | 1.734064 | 2.100922 | 2.552380 | 2.878440 |
| 19 | 1.327728 | 1.729133 | 2.093024 | 2.539483 | 2.860935 |
| 20 | 1.325341 | 1.724718 | 2.085963 | 2.527977 | 2.845340 |
| 21 | 1.323188 | 1.720743 | 2.079614 | 2.517648 | 2.831360 |
| 22 | 1.321237 | 1.717144 | 2.073873 | 2.508325 | 2.818756 |
| 23 | 1.319460 | 1.713872 | 2.068658 | 2.499867 | 2.807336 |
| 24 | 1.317836 | 1.710882 | 2.063899 | 2.492159 | 2.796940 |
| 25 | 1.316345 | 1.708141 | 2.059539 | 2.485107 | 2.787436 |
| 26 | 1.314972 | 1.705618 | 2.055529 | 2.478630 | 2.778715 |
| 27 | 1.313703 | 1.703288 | 2.051831 | 2.472660 | 2.770683 |
| 28 | 1.312527 | 1.701131 | 2.048407 | 2.467140 | 2.763262 |
| 29 | 1.311434 | 1.699127 | 2.045230 | 2.462021 | 2.756386 |
| 30 | 1.310415 | 1.697261 | 2.042272 | 2.457262 | 2.749996 |
| 32 | 1.308573 | 1.693889 | 2.036933 | 2.448678 | 2.738481 |
| 35 | 1.306212 | 1.689572 | 2.030108 | 2.437723 | 2.723806 |
| 40 | 1.303077 | 1.683851 | 2.021075 | 2.423257 | 2.704459 |
| 45 | 1.300649 | 1.679427 | 2.014103 | 2.412116 | 2.689585 |
| 50 | 1.298714 | 1.675905 | 2.008559 | 2.403272 | 2.677793 |
| 60 | 1.295821 | 1.670649 | 2.000298 | 2.390119 | 2.660283 |
| 80 | 1.292224 | 1.664125 | 1.990063 | 2.373868 | 2.638691 |
| 100 | 1.290075 | 1.660234 | 1.983972 | 2.364217 | 2.625891 |
| 120 | 1.288646 | 1.657651 | 1.979930 | 2.357825 | 2.617421 |
| 200 | 1.285799 | 1.652508 | 1.971896 | 2.345137 | 2.600634 |
| 500 | 1.283247 | 1.647907 | 1.964720 | 2.333829 | 2.585698 |
| 1000 | 1.282399 | 1.646379 | 1.962339 | 2.330083 | 2.580755 |
Common questions
- Is my p value one-sided or two-sided?
- That is the choice the Read as buttons make, and the page labels whichever one it is showing. At 10 degrees of freedom a t of 2.228139 has an upper tail of 0.025000 and a two-sided probability of 0.050000: the same cut of the same curve, counted once or twice. Two-sided means both tails beyond |t|, so it is exactly twice the upper tail, and a one-sided 0.05 is a different and less demanding cut than a two-sided 0.05.
- What is the critical t value for a 95% confidence interval?
- Switch to Critical value, set Read as to Two-sided and enter 0.05, because a 95% interval leaves 0.05 spread over both tails. At 10 degrees of freedom that is 2.228139. The one-sided answer to the same level is a different number, 1.812461, which you get by setting Read as to Lower and entering 0.95; the probability view also prints it on the inverse line under the working. The table further down carries both, one column per tail size.
- What degrees of freedom should I enter?
- For a one-sample t test or a confidence interval for a mean it is n - 1, one less than the number of observations. For two independent samples pooled it is n1 + n2 - 2. A Welch test gives a fractional value, and this page accepts it: 7.5 or 13.29 are ordinary inputs here, not rounded to the nearest whole number. Degrees of freedom of zero or less are refused by name, and the ceiling is 1000000.
- Why does another calculator show 0 for a large t and this one does not?
- Because the usual route computes the tail as a double and a double cannot hold anything smaller than about 5e-324. This page computes every tail twice, once as a number and once as its natural logarithm, so at 10 degrees of freedom a t of 1e40 reports its probability to six decimals rather than collapsing to zero. The same trick is what lets a probability of 1e-300 be inverted back into a t value.
- How accurate are these numbers next to a printed t table?
- A printed table stops at three or four decimals and at a handful of degrees of freedom. These are computed for whatever you type and were measured against a 120-digit reference over 294 cases: every tail and density landed within 1e-14 of it, as did every quantile of a probability a double can hold. The table on this page is generated by the same code, cell by cell, and the tests check every cell against it.
- Does the page do a t test for me?
- No. It computes the Student t distribution and nothing else: a density, a probability or a quantile, for degrees of freedom you set. It does not take your data, does not decide what the number means and draws no conclusion for you. Everything runs in the browser, and nothing you type is sent anywhere or stored beyond the draft this browser keeps for your next visit.
Densities, tail probabilities and quantiles for the Student t distribution at the degrees of freedom you set, computed numerically to the precision shown. Lower, upper and two-sided are three different answers to three different questions, so the page labels which one is on screen rather than leave you to infer it. Degrees of freedom of zero or less, and a probability outside 0 to 1, are rejected by name.