{
  "category": "Statistical functions",
  "display_name": "T.DIST.RT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.T.DIST.RT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "?"
      ],
      "larger_numeric": 1,
      "last_bit": 4,
      "matched": 1,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 6,
      "unread": 0,
      "worst_ulp": 24
    },
    "detail": "Of 10 recorded answers (6 in the answer bank and 4 workbook cells), 6 do not match: 1 differ by more than 16 ULP, 5 differ by at most 16 ULP.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 6 of 10 recorded answers",
    "workbook_corpus": {
      "cells": 4,
      "last_bit": 1,
      "matched": 3,
      "worst_ulp": 11
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L166-L169"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/chi_f_t_family::truncate_positive_integer",
        "ported/chi_f_t_family::validate_nonnegative_x",
        "ported/chi_f_t_family::t_dist_rt_kernel",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_add",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_mul_add",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::add",
        "ported/special_math_common::bratio_ftoi",
        "ported/special_math_common::bratio_spmpar1",
        "ported/special_math_common::bratio_exparg",
        "ported/special_math_common::bratio_esum",
        "ported/special_math_common::bratio_esum20",
        "ported/special_math_common::bratio_alnrel",
        "ported/special_math_common::bratio_rlog1",
        "ported/special_math_common::bratio_gam1",
        "ported/special_math_common::bratio_gamln1",
        "ported/special_math_common::bratio_gamln",
        "ported/special_math_common::bratio_algdiv",
        "ported/special_math_common::bratio_bcorr",
        "ported/special_math_common::bratio_gsumln",
        "ported/special_math_common::bratio_betaln",
        "ported/special_math_common::bratio_betaln_60",
        "ported/special_math_common::bratio_erf_nswc",
        "ported/special_math_common::bratio_erfc1",
        "ported/special_math_common::bratio_rexp",
        "ported/special_math_common::bratio_psi",
        "ported/special_math_common::bratio_fpser",
        "ported/special_math_common::bratio_apser",
        "ported/special_math_common::bratio_bpser",
        "ported/special_math_common::bratio_bup",
        "ported/special_math_common::bratio_brcomp",
        "ported/special_math_common::bratio_brcmp1",
        "ported/special_math_common::bratio_bfrac",
        "ported/special_math_common::bratio_bgrat",
        "ported/special_math_common::bratio_grat1",
        "ported/special_math_common::bratio_basym",
        "ported/special_math_common::bratio"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L166-L169",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 6 of 10 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.T.DIST.RT.json",
  "name": "T.DIST.RT",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n- **`TDIST`** is the legacy spelling, and this is the one place in the t family where the\n  Handbook holds recorded evidence about the pairing. The Handbook's alias-pairing record\n  `EV-DIST-0011` places `TDIST` and `T.DIST.RT` among five legacy/modern forward-CDF pairs found\n  to publish the same results everywhere the recorded battery probed them. Two cautions travel\n  with that, and the record states both: it is an Excel-versus-Excel identity, so **it transfers\n  no pass rate onto either surface**, and it covers forward CDFs only — no inverse pair has ever\n  been probed for identity. Note also that `TDIST(x, ν, 1)` is the corresponding call: `TDIST`\n  carries a `tails` argument, and `tails = 2` corresponds to `T.DIST.2T` instead.\n- **[T.DIST](FUNC.T.DIST.md)** is the left-tail complement and the density surface.\n- **[T.DIST.2T](FUNC.T.DIST.2T.md)** is the two-tail area; for `x ≥ 0`,\n  `T.DIST.2T(x, ν) = 2 · T.DIST.RT(x, ν)` exactly. Whether the two Excel surfaces satisfy that\n  in published bits is unprobed and is the sharpest cheap probe on the pair.\n- **[T.INV](FUNC.T.INV.md)** inverts the left tail; **[T.INV.2T](FUNC.T.INV.2T.md)** inverts the\n  two-tail area. There is no `T.INV.RT` — the right-tail inverse is spelled\n  `T.INV(1 − p, ν)`, which itself throws away precision for small `p` and is a real gap in the\n  surface set rather than an omission this page can paper over.\n- **`T.TEST`** and the regression `p`-values are the main consumers of this surface in practice.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\nThe whole engineering content of a right-tail distribution function is: *never form it by\nsubtraction*. Written as `1 − F(x; ν)` in double precision, every value below about `2^-53`\nrelative to one is gone, so the surface would saturate at zero for moderate `x` and stay there.\nComputed directly as `½ I_{ν/(ν+x²)}(ν/2, ½)`, it stays accurate to relative precision as far out\nas the power-law tail goes.\n\nThe reduction to the incomplete beta is the standard one; the continued fraction of Numerical\nRecipes' `betacf`, with the reflection `I_z(a,b) = 1 − I_{1−z}(b,a)` applied so that the fraction\nis always evaluated on its fast-converging side, is the canonical route. Cephes' `stdtr` and\nBoost.Math's `students_t_distribution` (built on `ibeta`/`ibetac`, where the `ibetac`\ncomplement entry point exists for exactly this reason) are the two implementations to read. The\nexistence of a separate complement entry point in a serious library is the same design decision\nExcel made by publishing `T.DIST.RT` as its own function.\n\nFor **integer** ν, A&S 26.7.3–26.7.4 give finite closed forms in `arctan` and powers of sine and\ncosine, and there is a companion recursion for the tail area. They are exact in exact arithmetic\nand lose digits for large ν in floating point; a switch on integer ν is defensible but has to\nname its crossover.\n\nArgument reduction has one subtlety worth stating: the beta argument `z = ν/(ν + x²)` needs care\nwhen `x²` overflows or when `ν` is huge. Computing it as `1/(1 + x²/ν)` — or, better, keeping\nthe complement `x²/(ν + x²)` and calling the complementary beta — avoids both the overflow and\nthe loss of the small quantity.\n\nNone of this is a claim about Excel's internals. The Handbook does not know Excel's algorithm.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`, a probability in `(0, 1)`.\n\n- **`x = 0`** gives exactly `½` for every ν, by symmetry.\n- **Large positive `x`** gives a small probability that remains meaningful — the power-law tail\n  means `T.DIST.RT` keeps returning distinguishable values in a range where\n  `1 − T.DIST(x, ν, TRUE)` has already collapsed to zero. This is the intended use.\n- **Large negative `x`** gives a value approaching 1 from below, where the *other* member of the\n  pair (`T.DIST`, cumulative) carries the accuracy instead. The two surfaces are accurate in\n  opposite halves of the line; neither is a superset of the other.\n- **The complement identity.** `T.DIST.RT(x, ν) + T.DIST(x, ν, TRUE) = 1` and\n  `T.DIST.RT(−x, ν) = T.DIST(x, ν, TRUE)` are exact mathematically. Whether Excel's published\n  bits satisfy them is exactly the kind of metamorphic question a suite should settle, and no\n  suite exists.\n\n\nNote also that this surface is one of the two on this page's module carrying an open upstream\ndefect stream, `BUG-FUNC-021`, whose title names a statistical numeric exactness drift. The\nHandbook cites the stream by name; it does not restate its contents or its figures.\n\n\n\n### Errors\n\n\nAs documented on Microsoft's `T.DIST.RT` page:\n\n| Error | Documented condition |\n|---|---|\n| `#VALUE!` | Any argument is nonnumeric. |\n| `#NUM!` | `deg_freedom < 1`. |\n\nNo documented `#NUM!` for negative `x` — again, unlike the legacy `TDIST`. Errors in either\nargument propagate under the universal coercion rule. The Handbook has not verified any of this\nagainst Excel.\n\n\n",
    "sources": "- Microsoft, \"T.DIST.RT function\" —\n  <https://support.microsoft.com/en-us/office/t-dist-rt-function-20a30020-86f9-4b35-af1f-7ef6ae683eda>\n  (syntax, both arguments required, the `#VALUE!` and `#NUM!` conditions, and the absence of any\n  documented restriction on the sign of `x`). Retrieved for this page.\n- Handbook evidence record `EV-DIST-0011` — the legacy/modern forward-CDF alias pairing that\n  includes `TDIST` / `T.DIST.RT`, with its reader warning that an Excel-versus-Excel identity\n  transfers no pass rate and that no inverse pair has been probed.\n- M. Abramowitz and I. A. Stegun, *Handbook of Mathematical Functions*, section 26.7 (Student's\n  t-distribution, including the finite closed forms 26.7.3–26.7.4 for integer degrees of\n  freedom).\n- W. H. Press et al., *Numerical Recipes*, incomplete beta function and its continued fraction.\n- Cephes `stdtr` and Boost.Math `ibetac` / `students_t_distribution` — complement entry points as\n  a deliberate design pattern.\n- Handbook projections `data/functions/FUNC.T.DIST.RT.json` and\n  `data/presence/FUNC.T.DIST.RT.json`.\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 6 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.T.DIST.RT.json).",
    "what-it-does": "\n`T.DIST.RT(x, deg_freedom)` returns the **right-tail** area of Student's *t*-distribution with\nν degrees of freedom:\n\n    T.DIST.RT(x, ν) = P(T > x) = 1 − F(x; ν)\n\nwhere `F` is the cumulative distribution function described on\n[T.DIST](FUNC.T.DIST.md#what-it-computes). In terms of the regularized incomplete beta function\nthe identity is exact and, importantly, *direct* — the quantity is computed as itself rather\nthan as one minus something:\n\n    T.DIST.RT(x, ν) = ½ · I_{ν/(ν+x²)}(ν/2, ½)          for x ≥ 0\n    T.DIST.RT(x, ν) = 1 − ½ · I_{ν/(ν+x²)}(ν/2, ½)      for x ≤ 0\n\nDomain and range: `x` over all reals, ν > 0; the value decreases strictly from 1 (as\n`x → −∞`) to 0 (as `x → +∞`), passing through exactly `½` at `x = 0`. No poles, no branch cuts.\n\nThe asymptotics are the reason this surface is separate from `T.DIST` rather than a convenience\nwrapper. As `x → ∞`,\n\n    P(T > x) ~ ( Γ((ν+1)/2) · ν^(ν/2) ) / ( sqrt(νπ) · Γ(ν/2) · ν/2 ) · x^(−ν)\n\n— a power law. The probability decays polynomially, so it stays representable as a double far\nout into the tail, and it stays *informative* only if it is never formed by subtracting a\nnear-one quantity from one. A right-tail surface that internally computes `1 − T.DIST(...)`\nthrows away the entire reason it exists.\n\nSpecial cases with elementary closed forms, useful as exactness probes:\n\n| ν | `T.DIST.RT(x, ν)` |\n|---|---|\n| 1 | `½ − arctan(x)/π` |\n| 2 | `½ · (1 − x / sqrt(x² + 2))` |\n| ν → ∞ | `1 − Φ(x)` |\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Required |\n|---|---|---|\n| `x` | The numeric value at which the distribution is evaluated. | Yes |\n| `deg_freedom` | ν, \"an integer indicating the number of degrees of freedom\" (Microsoft). | Yes |\n\nMicrosoft's `T.DIST.RT` page documents **no** restriction on the sign of `x`, which is a real\ndifference from the legacy `TDIST` spelling. `TDIST` documents `x ≥ 0` and returns `#NUM!`\nbelow it. If Excel honours the modern page as written, `T.DIST.RT(−1, 5)` is a number greater\nthan a half. That is a specific, cheap probe, and it appears on the list below.\n\nThe page describes `deg_freedom` as an integer but does not say what a non-integer value does.\nThe `T.INV` and `T.INV.2T` pages document truncation for the same parameter; these three\n`T.DIST*` pages do not.\n\nThe numeric slots take ordinary to-number coercion; see\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "T.DIST.RT(x, deg_freedom)",
    "parameters": [
      {
        "description": null,
        "name": "x",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "deg_freedom",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Statistical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Right-tail probability of Student's t distribution",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the Student's t-distribution",
        "microsoft_url": "https://support.microsoft.com/en-us/office/t-dist-rt-function-20a30020-86f9-4b35-af1f-7ef6ae683eda"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "T.DIST.RT"
        },
        {
          "locale": "bg-BG",
          "name": "T.DIST.RT"
        },
        {
          "locale": "cs-CZ",
          "name": "T.DIST.RT"
        },
        {
          "locale": "da-DK",
          "name": "T.FORDELING.RT"
        },
        {
          "locale": "de-DE",
          "name": "T.DIST.RT"
        },
        {
          "locale": "el-GR",
          "name": "T.DIST.RT"
        },
        {
          "locale": "en-AU",
          "name": "T.DIST.RT"
        },
        {
          "locale": "en-GB",
          "name": "T.DIST.RT"
        },
        {
          "locale": "en-US",
          "name": "T.DIST.RT"
        },
        {
          "locale": "es-ES",
          "name": "DISTR.T.CD"
        },
        {
          "locale": "et-EE",
          "name": "T.DIST.RT"
        },
        {
          "locale": "fi-FI",
          "name": "T.JAKAUMA.OH"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.STUDENT.DROITE*"
        },
        {
          "locale": "he-IL",
          "name": "T.DIST.RT"
        },
        {
          "locale": "hr-HR",
          "name": "T.DIST.RT"
        },
        {
          "locale": "hu-HU",
          "name": "T.ELOSZLÁS.JOBB"
        },
        {
          "locale": "id-ID",
          "name": "T.DIST.RT"
        },
        {
          "locale": "it-IT",
          "name": "T.DIST.RT"
        },
        {
          "locale": "ja-JP",
          "name": "T.DIST.RT"
        },
        {
          "locale": "ko-KR",
          "name": "T.DIST.RT"
        },
        {
          "locale": "lt-LT",
          "name": "T.DIST.RT"
        },
        {
          "locale": "lv-LV",
          "name": "T.DIST.RT"
        },
        {
          "locale": "nb-NO",
          "name": "T.DIST.RT"
        },
        {
          "locale": "nl-NL",
          "name": "T.VERD.RECHTS"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁ.T.PS"
        },
        {
          "locale": "pt-BR",
          "name": "T.DIST.RT"
        },
        {
          "locale": "pt-PT",
          "name": "DIST.T.DIR"
        },
        {
          "locale": "ro-RO",
          "name": "T.DIST.RT"
        },
        {
          "locale": "ru-RU",
          "name": "СТЬЮДЕНТ.РАСП.ПХ"
        },
        {
          "locale": "sk-SK",
          "name": "T.DIST.RT"
        },
        {
          "locale": "sl-SI",
          "name": "T.DIST.RT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "T.DIST.RT"
        },
        {
          "locale": "sv-SE",
          "name": "T.FÖRD.RT"
        },
        {
          "locale": "th-TH",
          "name": "T.DIST.RT"
        },
        {
          "locale": "tr-TR",
          "name": "T.DAĞ.SAĞK"
        },
        {
          "locale": "uk-UA",
          "name": "T.DIST.RT"
        },
        {
          "locale": "vi-VN",
          "name": "T.DIST.RT"
        },
        {
          "locale": "zh-CN",
          "name": "T.DIST.RT"
        },
        {
          "locale": "zh-HK",
          "name": "T.DIST.RT"
        },
        {
          "locale": "zh-TW",
          "name": "T.DIST.RT"
        }
      ],
      "signature": {
        "display": "T.DIST.RT(x, deg_freedom)",
        "parameters": [
          {
            "description": null,
            "name": "x",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "deg_freedom",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "T.DIST.RT",
      "version_marker": null,
      "xlcall": {
        "code": "514",
        "symbol": "xlfT_dist_rt"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/t-dist-rt-function-20a30020-86f9-4b35-af1f-7ef6ae683eda"
  },
  "try_it": {
    "formula": "=T.DIST.RT(1,10)"
  },
  "url": "https://handbook.dnacalc.com/functions/T.DIST.RT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "6 captured inputs are indexed for this environment. Capture dates: 2026-07-16 to 2026-07-16. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20131",
      "platform": "Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.T.DIST.RT.json"
      ]
    }
  ]
}