T.DIST.2T Function (LibreOffice Calc)
Learn the T.DIST.2T function in LibreOffice Calc: Returns the two-tailed 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 evidence from 13 October 2026 at 13:13 UTC. All 95 ODS/result pairs and manifest hashes agree. This review independently recalculated the 68 numerical assertions and the worked sample statistics. Calc was not rerun. The proposed input guards and full example layouts remain mathematical constructions, not separately native-tested worksheets.
Quick answer: what does T.DIST.2T calculate?
T.DIST.2T returns the two-tailed probability outside both tails of a Student’s t distribution for a nonnegative t magnitude and a positive number of degrees of freedom. It is commonly used as a two-sided p-value after you have independently obtained a valid t statistic. It is not a density, a critical t cutoff, or an automatic t-test of two cell ranges.
For an observed absolute t statistic t ≥ 0 and degrees of freedom ν > 0, the two-sided probability is
p = P(T_ν ≤ −t) + P(T_ν ≥ t) = 2 × P(T_ν ≥ t)
Here T_ν denotes a Student’s t random variable with ν degrees of freedom. The two tails are symmetric; their combined area is between 0 and 1. A smaller result indicates that a statistic at least this extreme in magnitude is less likely under the applicable null model. It does not give the probability that the null hypothesis is true. Source: LibreOffice Calc Help, Statistical Functions Part Five, “T.DIST.2T” and “T.DIST.RT”; accessed 2026-10-13.
Native test: =T.DIST.2T(1;10) returned 0.3408931323020605 (roughly 34.09%). The current LibreOffice Help example reports 0.3408931323, consistent with that measured result. Official function example.
Exact syntax and arguments
=T.DIST.2T(Number; DegreesFreedom)
| Argument | Required? | Meaning and validation |
|---|---|---|
Number |
Yes | The nonnegative magnitude of the t statistic. For a negative calculated statistic, pass ABS(...); directly supplying a negative first argument returned Err:502 in the tested Calc version. |
DegreesFreedom |
Yes | Positive degrees of freedom for the t distribution; often sample_size-1 in a one-sample t-test. Use an appropriate distribution-specific value and check whether fractional values are intended. |
Defaults: There are no optional parameters and no omitted-argument defaults. Both arguments must be provided. The syntax on the official English Help page uses semicolons; that is the separator used by the English Calc installation in the native tests. Decimal commas, function translations, and argument delimiters may vary with a user’s locale/settings. Do not paste the semicolon formula into a different locale without checking the function wizard/formula bar. Official syntax.
Input notes: Supply a cell reference (A2), constant (1), or expression (ABS(B4/C4)) in the first argument. Use an integer degree-of-freedom value for portable, reproducible behavior in this guide. The tested engine silently truncated 2.5 to 2, which is consequential for methods such as Welch’s t-test; see the version warning below.
Reproducible native-tested examples
The following formulas were actually entered and recalculated in Calc 25.2.3.2 on Linux on 2026-10-13. The displayed precision in a spreadsheet depends on number formatting; the right-hand values are taken from the native numerical cell values, not just their formatted display.
| Formula | Native numeric result | Interpretation |
|---|---|---|
=T.DIST.2T(0;10) |
1 |
Statistic zero, the entire distribution is at least this far from zero. |
=T.DIST.2T(1;10) |
0.3408931323020605 |
Two-sided tail area at t = 1 with 10 degrees of freedom. |
=T.DIST.2T(2;5) |
0.1019394788298583 |
Approximately 10.19% combined area. |
=T.DIST.2T(3;30) |
0.005389964065651954 |
Approximately 0.539% combined area. |
=T.DIST.2T(1.96;60) |
0.05464492973652922 |
Slightly above a 0.05 significance threshold. |
=T.DIST.2T(100;30) |
1.9846117967270043E-39 |
Tiny tail probability, not rounded to zero in the tested case. |
=T.DIST.2T(1;2) |
0.4226497308103742 |
Two-sided probability changes materially with degrees of freedom. |
Exact calculation cross-checks (native tests): =T.DIST.2T(1;10)-2*T.DIST.RT(1;10) and five other selected cases all returned numerical 0 in the native test workbook. They corroborate the two-tail/right-tail relationship in the tested release. They do not prove equality for every input or implementation. LibreOffice Help: both functions.
First worksheet: reusable p-value calculator
Enter the following labels or values in a blank sheet, using numeric formatting for the numbers:
| Cell | Enter | Meaning |
|---|---|---|
| A1 | Observed t |
Label. |
| B1 | 3 |
Example absolute t statistic. |
| A2 | Degrees of freedom |
Label. |
| B2 | 30 |
Example degrees of freedom. |
| A3 | Two-sided p-value |
Label. |
| B3 | =T.DIST.2T(ABS(B1);B2) |
Two-tail probability. |
| A4 | Significance level |
Label. |
| B4 | 0.05 |
Chosen alpha, not inferred by Calc. |
| A5 | Rule (p < alpha) |
Label. |
| B5 | =IF(B3<B4;"Reject H0";"Do not reject H0") |
Decision indicator; assumes the test assumptions are valid. |
Expected output: B3 ≈ 0.00538996406565 and B5 Reject H0. The direct function =T.DIST.2T(3;30) was native-verified. The surrounding five-cell worksheet layout is a reproducible formula construction based on that result; this exact pasted layout was not separately run as a native worksheet test. Interpret “reject” solely as shorthand for the chosen decision rule, not proof of practical importance, a large effect, or a valid model.
Worked statistical case: one-sample t-test
Suppose sample measurements are 12, 14, 11, 10, 13, 9, 15, 12, 14, 10. The null hypothesis compares the sample mean to 10 with a two-sided alternative. Place those ten values in A2:A11 and the proposed mean 10 in D2.
D3: =COUNT(A2:A11)
D4: =AVERAGE(A2:A11)
D5: =STDEV.S(A2:A11)
D6: =(D4-D2)/(D5/SQRT(D3))
D7: =D3-1
D8: =T.DIST.2T(ABS(D6);D7)
D9: =IF(D8<0.05;"Reject H0";"Do not reject H0")
Expected independently computed values: n = 10; mean = 12; sample SD = 2; signed t ≈ 3.162277660168379; df = 9; two-sided p ≈ 0.01150798516594; decision using alpha = .05 is Reject H0. These values were independently checked with sample-standard-deviation arithmetic and SciPy’s Student-t survival function on 2026-10-13; the complete pasted case worksheet was not natively executed in the saved tests, so do not confuse the calculation check with a Calc integration test. This common one-sample t-test assumes relevant observations are independent and the test’s distribution assumptions are reasonable.
If your result is negative (sample below the null mean), retain the signed statistic for interpretation but take its absolute value for T.DIST.2T. For paired samples, calculate within-pair differences and then the one-sample t statistic on those differences; merely treating paired observations as independent is inappropriate.
Advanced uses and related calculations
Cross-check with the right tail
For nonnegative B1 and valid integer B2, the mathematical equality is
=T.DIST.2T(B1;B2)
=2*T.DIST.RT(B1;B2)
Both represent the two-sided probability for a symmetric Student’s t distribution. Six test-case differences were recomputed natively as zero in the saved test. T.DIST.RT yields one tail; do not forget to double it for a two-sided test. Check the reference T.DIST.RT guide and the official LibreOffice Help.
Avoid subtracting a CDF near 1
You may encounter the textbook identity 2*(1-T.DIST(t;df;TRUE())) for nonnegative t. While correct algebraically, subtracting a rounded cumulative probability close to 1 can lose small tail probabilities. For very large t, use T.DIST.2T directly rather than 2*(1-CDF). The native evaluation of =T.DIST.2T(100;30) retained approximately 1.98E-39 and =T.DIST.2T(1000;30) retained approximately 2.07E-69; this is evidence for those specific inputs, not a universal accuracy guarantee. Official T.DIST and T.DIST.2T functions.
Compare a p-value with a two-tail critical value
A two-sided significance test at alpha = 0.05 with 30 df may use either
=T.DIST.2T(ABS(ObservedT);30)<0.05
=ABS(ObservedT)>T.INV.2T(0.05;30)
The second cutoff, 2.0422724563012378, was independently checked and natively returned by Calc 25.2.3.2 (=T.INV.2T(0.05;30)). Exact equality at a decision boundary should be handled consistently. For a two-sided confidence interval, the same critical magnitude multiplies the standard error (not the standard deviation without scaling).
Degrees of freedom: the Welch caution
A simple one-sample or ordinary equal-variance t-test often yields whole-number df. Welch’s unequal-variance approximation commonly yields a fractional effective df. Observed version behavior: =T.DIST.2T(1;2.5) in the tested Calc 25.2.3.2 returned 0.4226497308103742, identical to =T.DIST.2T(1;2). This demonstrates truncation to integer df in that tested implementation. It does not establish whether other editions follow this rule. The mathematical t distribution is defined for many positive real df values, so a formula that truncates can change Welch test results. If your analysis requires fractional df, validate the exact version’s behavior or use a method explicitly supporting fractional df. Do not silently assume native Calc evaluated 2.5 exactly.
Guard user-supplied input
This workbook-friendly guard rejects common invalid inputs, including fractional df in the intended integer-df workflow:
=IF(NOT(ISNUMBER(B1));NA();IF(NOT(ISNUMBER(B2));NA();IF(OR(B2<1;B2<>INT(B2));NA();T.DIST.2T(ABS(B1);B2))))
This is a recommended formula, not a separately measured native result. Check whether a spreadsheet function or a named variable uses the relevant locale name. Using ABS intentionally transforms negative signed t statistics into admissible magnitudes; it is not evidence that the native two-tail function itself accepts a negative first argument.
Errors, limits, and troubleshooting
| Input or symptom | Observed Calc 25.2.3.2 behavior | What to check |
|---|---|---|
=T.DIST.2T(-1;10) |
Err:502 (native error code 502) |
Pass ABS(t) if the negative number represents a signed t statistic. |
=T.DIST.2T(1;0) or (1;-10) |
Err:502 |
Degrees of freedom must be positive. |
=T.DIST.2T(1) or =T.DIST.2T() |
Err:511 |
Both required arguments are missing/incomplete. |
=T.DIST.2T("abc";10) |
#VALUE! (native error code 519) |
Replace nonnumeric text; inspect imported CSV contents. |
=T.DIST.2T(1;2.5) |
Same numeric value as df = 2 | Native tested build truncated fractional df; verify if fractions matter. |
=T.DIST.2T("1";10) |
Numeric text was coerced in this test | Coercion can be locale-dependent; prefer genuine number cells. |
=T.DIST.2T(1;TRUE()) |
Computed using a numeric-Boolean coercion (df = 1) | A Boolean is not a meaningful user-supplied df; reject it upstream. |
| Very large positive t | Tiny positive number for tested examples | Scientific notation may be needed; don’t round away statistical detail. |
The table reports actual tested results, not an exhaustive compatibility or error contract. An apparently plausible p-value can still be misleading if the t statistic, sampling design, or degrees of freedom are wrong.
Availability, ODF names, and compatibility
- Native evidence: Function successfully executed in LibreOffice Calc 25.2.3.2 on Linux, with 28 independent numerical checks, six native cross-function checks, and 13 additional diagnostic observations (2026-10-13). Independent expected probabilities were produced with
scipy.stats.t.sf, not copied from Microsoft Excel or another spreadsheet. - Official release scope: LibreOffice’s latest English Help (page currently labeled LibreOffice 26.8 Help when accessed on 2026-10-13) says
T.DIST.2Thas been available since LibreOffice 4.3. We did not run 4.3, Windows, macOS, web/mobile variants, or the current 26.8 runtime. Official 26.8 Help. - OpenFormula/name information: Current LibreOffice Help explicitly states this name is not part of OpenDocument 1.3 OpenFormula, and assigns the compatibility namespace
COM.MICROSOFT.T.DIST.2T. See the official Help technical section and the OASIS OpenDocument 1.4 Part 4 standard for standards context. This namespace does not establish tested support in Excel, Google Sheets, other spreadsheet software, or every ODF consumer. - Alias/legacy behavior:
TDIST(number;df;2)is documented by LibreOffice as the traditional two-tail mode. Treat it as a related function/legacy syntax, without assuming identical behavior across all versions. TDIST official documentation. - Formatting: A cell containing
.05displays5%if formatted as Percent. The underlying probability is 0.05; change the number format without multiplying by 100 in the formula.
Related LibreOffice Calc functions
Official documentation
See LibreOffice statistical function documentation for syntax, examples, version availability and compatibility details.