gizmobench

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 10t = 2.228139Two-sidedShaded: both tails
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
Read as

You have a t value and the degrees of freedom, and you want the area under the curve.

Two-sided p
0.050000
Lower CDF
0.975000
df
10
t
2.228139

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.

  • df 10, t = 2.228139two-sided
    p = 0.050000
  • df 10, t = 2.228139upper tail
    p = 0.025000
  • df 10, p = 0.95inverse, one-sided
    t = 1.812461
Accuracy. 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. The arithmetic was measured rather than assumed: against a 120-digit reference, over 294 cases from half a degree of freedom to a million and probabilities down to 1e-300, every tail, density and quantile landed within 1e-14 of it, and a quantile of a probability below the smallest double within 1e-13. A tail smaller than the smallest double, about 5e-324, is computed and printed from its logarithm rather than collapsing to zero.

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.

dfone-sided 0.10one-sided 0.05one-sided 0.025one-sided 0.01one-sided 0.005
13.0776846.31375212.70620531.82051663.656741
21.8856182.9199864.3026536.9645579.924843
31.6377442.3533633.1824464.5407035.840909
41.5332062.1318472.7764453.7469474.604095
51.4758842.0150482.5705823.3649304.032143
61.4397561.9431802.4469123.1426683.707428
71.4149241.8945792.3646242.9979523.499483
81.3968151.8595482.3060042.8964593.355387
91.3830291.8331132.2621572.8214383.249836
101.3721841.8124612.2281392.7637693.169273
111.3634301.7958852.2009852.7180793.105807
121.3562171.7822882.1788132.6809983.054540
131.3501711.7709332.1603692.6503093.012276
141.3450301.7613102.1447872.6244942.976843
151.3406061.7530502.1314502.6024802.946713
161.3367571.7458842.1199052.5834872.920782
171.3333791.7396072.1098162.5669342.898231
181.3303911.7340642.1009222.5523802.878440
191.3277281.7291332.0930242.5394832.860935
201.3253411.7247182.0859632.5279772.845340
211.3231881.7207432.0796142.5176482.831360
221.3212371.7171442.0738732.5083252.818756
231.3194601.7138722.0686582.4998672.807336
241.3178361.7108822.0638992.4921592.796940
251.3163451.7081412.0595392.4851072.787436
261.3149721.7056182.0555292.4786302.778715
271.3137031.7032882.0518312.4726602.770683
281.3125271.7011312.0484072.4671402.763262
291.3114341.6991272.0452302.4620212.756386
301.3104151.6972612.0422722.4572622.749996
321.3085731.6938892.0369332.4486782.738481
351.3062121.6895722.0301082.4377232.723806
401.3030771.6838512.0210752.4232572.704459
451.3006491.6794272.0141032.4121162.689585
501.2987141.6759052.0085592.4032722.677793
601.2958211.6706492.0002982.3901192.660283
801.2922241.6641251.9900632.3738682.638691
1001.2900751.6602341.9839722.3642172.625891
1201.2886461.6576511.9799302.3578252.617421
2001.2857991.6525081.9718962.3451372.600634
5001.2832471.6479071.9647202.3338292.585698
10001.2823991.6463791.9623392.3300832.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.