T.DIST Function (LibreOffice Calc)
Learn the T.DIST function in LibreOffice Calc: Returns the t-distribution.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in LibreOffice Calc. How formula examples are checked
Historical validation scope: Native observations refer to saved LibreOffice Calc 25.2.3.2 Linux import/recalculation evidence from 13 October 2026. All 118 XLSX/result records agree; the ODS agrees numerically and records eight error displays as Err:502 or Err:511 where XLSX exports #VALUE!. This review independently recalculated all 106 numerical outputs, including integer-df interpretations of diagnostics. Calc was not rerun.
T.DIST evaluates Student’s t distribution at a given t statistic and positive number of degrees of freedom. Its third argument determines whether the answer is a cumulative probability (the area to the left of the t value) or a probability density (the height of the probability curve at that point). The distinction is critical: a density is not itself the probability of seeing an exact continuous value.
At a glance
| Question | T.DIST answer |
|---|---|
| How much t-distribution probability lies at or below a value? | =T.DIST(1;10;TRUE()) → 0.82955343384897 |
| What is the curve height at that value? | =T.DIST(1;10;FALSE()) → 0.230361989229139 |
| How much probability is to the right? | =T.DIST.RT(1;10) → 0.17044656615103; equivalently 1-T.DIST(1;10;TRUE()) for ordinary-sized tails |
| How do I calculate a two-sided p-value? | =2*T.DIST.RT(ABS(A2);B2) for a valid observed t statistic and degrees of freedom |
The first two numeric examples and the right-tail value were native-executed in Calc 25.2.3.2; the last expression follows the distribution’s mathematical symmetry and should be treated as a formula pattern, not as an independently executed A2/B2 cell-reference case. The official Help itself gives 0.8295534338 for the CDF example. Official LibreOffice Help: Statistical Functions Part Five.
Syntax and required arguments
=T.DIST(Number;DegreesFreedom;Cumulative)
All three arguments are required. The separator is a semicolon in the English-language Calc/OpenFormula examples, including the current OpenDocument 1.4, §5.6; settings and localizations can affect displayed separators or function names, so follow the syntax indicated by your installed Calc.
| Argument | Required | What to enter | Important constraint |
|---|---|---|---|
Number |
Yes | Real-valued t statistic (negative, zero, or positive), not a probability. | A finite numeric value; avoid ambiguous text data. |
DegreesFreedom |
Yes | Positive degrees of freedom (commonly n-1 for a one-sample t statistic with n observations). |
Use a positive integer for portable, verified results. See version-specific fractional-degree warning below. |
Cumulative |
Yes | TRUE()/TRUE or 1 for cumulative distribution; FALSE()/FALSE or 0 for probability density. |
Choose the mode explicitly; omission is not a documented default. |
The official wording is T.DIST(Number; DegreesFreedom; Cumulative) and describes 0/FALSE as density and 1/TRUE as cumulative. Unlike a legacy two-tail TDIST formula, this function does not have a parameter for the number of tails. Official LibreOffice Help.
What the two modes mean
For a Student t random variable T with ν degrees of freedom, T.DIST(t;ν;TRUE()) gives the CDF, P(T ≤ t); T.DIST(t;ν;FALSE()) gives the PDF, written f(t). The PDF is a density, so values are not direct event probabilities. The curve is symmetric around zero: F(-t)=1-F(t), and its height is symmetric: f(-t)=f(t).
For readers who want the mathematical definition, the density is
f(t;ν) = Γ((ν+1)/2) / [sqrt(νπ) Γ(ν/2)] × (1+t²/ν)^(-(ν+1)/2), for ν>0.
The cumulative probability is the area beneath this density from negative infinity to t. Use built-in t functions for routine spreadsheets instead of numerically integrating this expression. These definitions explain the distinction between the numeric outputs; they are mathematical context, not a claim that Calc uses this expression internally.
Example 1 — calculate the left-side probability
- Enter
1in A2, the t statistic. - Enter
10in B2, the degrees of freedom. - Enter
=T.DIST(A2;B2;TRUE())in C2.
The expected result is 0.82955343384897, or 82.9553433849% if C2 is formatted as a percentage. The corresponding direct-argument formula =T.DIST(1;10;TRUE()) was executed natively, with result 0.82955343384897; the cell-reference layout is a reproducible worksheet arrangement derived from that calculation.
| Cell | Enter | Purpose |
|---|---|---|
| A2 | 1 |
t statistic |
| B2 | 10 |
degrees of freedom |
| C2 | =T.DIST(A2;B2;TRUE()) |
left-cumulative probability |
| D2 | =T.DIST(A2;B2;FALSE()) |
curve height, expected 0.230361989229139 |
| E2 | =1-C2 |
right-side probability, expected 0.17044656615103 |
A common misinterpretation is that D2 is a 23% chance of an exact t=1 result. For a continuous random variable, an exact point has probability zero: density controls probability over intervals, not points.
Example 2 — calculate the probability between two t scores
For degrees of freedom 10, find P(-1 < T ≤ 1) by subtracting two CDF values:
=T.DIST(1;10;TRUE())-T.DIST(-1;10;TRUE())
Expected result: 0.65910686769794 (about 65.91%). The two constituent CDF calculations were both included among the native numerical assertions. For reusable worksheets, put the low bound in A2, the high bound in B2, degrees of freedom in C2, and use:
=T.DIST(B2;C2;TRUE())-T.DIST(A2;C2;TRUE())
Validate A2<=B2 and C2 as a positive integer so a reversed interval is not silently presented as a negative probability.
Example 3 — one-sample t-test worksheet
Suppose a sample of 25 independent observations has mean 16, sample standard deviation 2, and you want to compare its population mean to a hypothesized 15. Under the standard one-sample t-test assumptions, the statistic is (16-15)/(2/sqrt(25)) = 2.5, and the degrees of freedom are 25-1 = 24.
| Cell | Input or formula | Expected calculation |
|---|---|---|
| B2 | 16 |
sample mean |
| B3 | 15 |
null-hypothesis mean |
| B4 | 2 |
sample standard deviation |
| B5 | 25 |
sample size |
| B6 | =(B2-B3)/(B4/SQRT(B5)) |
t statistic 2.5 |
| B7 | =B5-1 |
degrees of freedom 24 |
| B8 | =T.DIST(B6;B7;TRUE()) |
left-cumulative probability 0.99017291244171 |
| B9 | =T.DIST.RT(B6;B7) |
right-tailed p-value 0.00982708755828939 |
| B10 | =2*T.DIST.RT(ABS(B6);B7) |
two-sided p-value 0.0196541751165788 |
The values in B8–B10 are independently calculated statistical expectations from SciPy, not claims that the full ten-cell layout was natively executed; direct T.DIST and T.DIST.RT formulas were executed in the native test workbook for many other t/df combinations. This illustration is only appropriate when the underlying test model, independence, and sample assumptions justify the t distribution. Avoid deciding scientific significance from p-values alone.
How to choose a one-sided versus two-sided probability
- Left-tail hypothesis (smaller means):
=T.DIST(observed_t;df;TRUE()). - Right-tail hypothesis (larger means): prefer
=T.DIST.RT(observed_t;df). - Two-sided hypothesis (difference in either direction):
=2*T.DIST.RT(ABS(observed_t);df).
For right-tail probabilities extremely close to zero, 1-T.DIST(...;TRUE()) may round to zero from floating-point subtraction. The saved direct right-tail result remains nonzero for an extreme example; the subtraction expression itself was not separately executed. Official T.DIST / T.DIST.RT help.
Advanced: examine the t-distribution curve
Use a two-column table to construct a smooth series: put -4 in A2 and =A2+0.25 in A3, fill downward through 4, set B1 to a positive integer such as 10, and enter in B2:
=T.DIST(A2;10;FALSE())
Fill B2 downward. Plot the A and B columns as a scatter chart. For a cumulative curve instead, use =T.DIST(A2;10;TRUE()); it should rise from near zero to near one. A curve-height column must not be used as if each row were a discrete probability. To approximate interval probabilities from a density by numerical quadrature requires appropriate cell-width weighting; CDF differences are generally easier and more accurate.
Verified results and interpretation
The following direct formulas were part of native Calc numerical tests (Calc 25.2.3.2, Linux; independently compared to SciPy stats.t):
| Native-executed formula | Native result | Interpretation |
|---|---|---|
=T.DIST(0;10;TRUE()) |
0.5 |
t distribution is symmetric |
=T.DIST(1;10;TRUE()) |
0.82955343384897 |
left-tail probability |
=T.DIST(-1;10;TRUE()) |
0.17044656615103 |
left-tail for negative t |
=T.DIST(1;10;FALSE()) |
0.230361989229139 |
density at +1 |
=T.DIST(-1;10;FALSE()) |
0.230361989229139 |
symmetric density at −1 |
=T.DIST(1;1;TRUE()) |
0.75 |
Cauchy case (ν=1) |
=T.DIST(1;1;FALSE()) |
0.159154943091895 |
Cauchy curve height |
Validation distinction: 51/51 predefined T.DIST numerical assertions agreed with SciPy within the archived tolerance; 19 additional diagnostic observations were recorded separately and were not included in the 51 passed assertions. This documents Calc 25.2.3.2 behavior, not a claim that every Calc edition or every manual sample layout was tested.
Errors, limits, and troubleshooting
| Symptom | Likely cause / fix |
|---|---|
#VALUE! in the saved native test workbook |
Zero or negative degrees of freedom, omitted required argument, or nonnumeric string. Validate all three inputs. The saved ODS uses Err:502 for invalid degrees of freedom and Err:511 for the omitted argument; the XLSX export maps these to #VALUE!. |
| Result near 0 or 1 | An extreme t statistic; review the sign, df, and whether you wanted the CDF or the right tail. |
| Value near 0.2 interpreted as 20% chance | The third argument was FALSE; this is PDF, not an interval probability. |
| Unexpected fractional-df result | Observed Calc 25.2.3.2 truncation to the integer part, rather than the mathematically continuous Student t degrees parameter. Use positive integer df unless a different edition has been explicitly validated. |
| Unexpected result from imported worksheet | Numeric-looking text, decimal separator, Boolean coercion, or file-format function mapping. Format/import cells as numbers and recompute in Calc. |
#NAME? on import |
Function name was not recognized by the importing/exporting application or file format mapping. Do not type OOXML _xlfn. prefixes directly into Calc. |
| Formula does not parse | English examples use semicolons; check Tools → Options → LibreOffice Calc → Formula or equivalent localized settings for separators and names. |
Important tested discrepancy: noninteger degrees of freedom
Although Student’s t distribution is mathematically defined for positive real degrees of freedom, Calc 25.2.3.2 used the truncated integer for these tested inputs:
| Formula | Native Calc 25.2.3.2 | Independent real-df mathematical CDF/PDF |
|---|---|---|
=T.DIST(1;2.5;TRUE()) |
0.788675134594813 |
0.797969486360863 |
=T.DIST(1;2.5;FALSE()) |
0.192450089729875 |
0.200795960670920 |
The native numbers match the t distribution with 2 degrees of freedom, not 2.5. This was a diagnostic observation, not a passing continuous-df assertion or an assertion that all releases behave identically. Official T.DIST Help does not explicitly say to truncate fractional df in its own T.DIST entry (it does document truncation for the separate legacy TDIST function). Follow the documented function and an integer-df validated workflow instead of assuming noninteger behavior from a different spreadsheet application. Official Help: compare T.DIST and TDIST.
The native diagnostic workbook also found =T.DIST(1;10;2), =T.DIST(1;10;-1), and =T.DIST(1;10;0.5) gave the CDF in this version. Do not rely on these undocumented truth-value coercions: pass TRUE()/FALSE() or 1/0 as officially described. Numeric-looking text and TRUE() in the Number field were also coerced by that version; do not build instructions around implicit coercion.
A defensive input gate for a worksheet with t value in A2 and df in B2 is:
=IF(NOT(ISNUMBER(A2));NA();IF(NOT(ISNUMBER(B2));NA();IF(AND(B2>0;B2=INT(B2));T.DIST(A2;B2;TRUE());NA())))
That guard is a documented spreadsheet design pattern, not one of the executed native test cases. It prevents silently interpreting fractional degrees of freedom as if they had been validated.
Version support, file formats, and compatibility
LibreOffice Help documents T.DIST since LibreOffice 4.3. Its Help explicitly says T.DIST is not part of OpenFormula 1.3 and assigns the vendor-specific namespace COM.MICROSOFT.T.DIST. OpenDocument 1.4 §5.7 describes how nonstandard functions receive a defining prefix in stored formulas; this does not, by itself, guarantee that other applications calculate the function or use the same arguments. LibreOffice statistical Help; OASIS OpenDocument 1.4, Part 4, §§5.6–5.7.
In the saved tests, Calc 25.2.3.2 on Linux recalculated a test OOXML workbook that contained OOXML _xlfn.T.DIST import tokens; these are file-interchange encoding details, not syntax you should enter in a Calc cell. Microsoft Excel’s native runtime was not executed, and parity with Excel for fractional degrees or invalid arguments is unverified. Function display names, separators, formula namespace serialization, and error displays may vary by file format and locale. Check a saved ODS with the target version of Calc before publishing cross-platform claims.
Related Calc function guides
- T.DIST.RT — right-tail t probability: direct survival probability and numerical stability.
- T.DIST.2T — two-tailed t probability: use when the statistic is nonnegative and the two-tail interpretation is intended.
- TDIST — older t-distribution interface: legacy tails/mode signature, not a same-arguments alias.
- T.INV — inverse cumulative t value and T.INV.2T — two-tailed critical value: invert probabilities.
- T.TEST — student t-test function: calculates a test probability from input samples, with a different signature.
FAQs
Does the result need to be formatted as a percentage? No. The CDF returns a decimal probability between zero and one. Percentage formatting changes only its display. PDF values are densities and should not be labeled a percent probability.
Can I omit the last argument? No. The official T.DIST syntax requires the cumulative argument, and the omitted-argument native diagnostic returned an error in the tested version.
Are negative t values allowed? Yes. They represent locations to the left of zero. T.DIST with TRUE() still computes the left-cumulative probability, not a two-tail probability.
Should I use T.DIST for right-tail p-values? Prefer T.DIST.RT, especially at extreme positive t values where 1-T.DIST(...;TRUE()) can lose precision through subtraction.
Official documentation
See LibreOffice statistical function documentation for syntax, examples, version availability and compatibility details.