{
  "category": "Compatibility",
  "display_name": "CHIDIST",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.CHIDIST",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "?"
      ],
      "larger_numeric": 1,
      "last_bit": 137,
      "matched": 250,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 388,
      "unread": 0,
      "worst_ulp": 24
    },
    "detail": "Of 392 recorded answers (388 in the answer bank and 4 workbook cells), 140 do not match: 1 differ by more than 16 ULP, 139 differ by at most 16 ULP.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 140 of 392 recorded answers",
    "workbook_corpus": {
      "cells": 4,
      "last_bit": 2,
      "matched": 2,
      "worst_ulp": 2
    }
  },
  "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#L120-L123"
      ],
      "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::chisq_dist_rt_kernel",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_expm1_internal",
        "ported/excel_numeric::expm1_internal_graph",
        "ported/excel_numeric::excel_x87_add",
        "ported/excel_numeric::excel_x87_sub",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_temme_finish",
        "ported/excel_numeric::excel_x87_div",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::add",
        "ported/excel_numeric/x87::sub",
        "ported/excel_numeric/x87::div",
        "ported/excel_numeric/x87_chains::pow2_positive",
        "ported/excel_numeric/x87_chains::pow2",
        "ported/excel_numeric/x87_chains::exp_ext",
        "ported/excel_numeric/x87_chains::exp_with",
        "ported/excel_numeric/x87_chains::excel_exp",
        "ported/excel_numeric/x87_chains::log_with",
        "ported/excel_numeric/x87_chains::excel_log",
        "ported/normal_dist_common::stored_horner",
        "ported/normal_dist_common::erf_approx",
        "ported/normal_dist_common::erfc_upper",
        "ported/special_dist_family::erfc_of_sqrt_half_x",
        "ported/special_dist_family::erfc_kernel",
        "ported/special_dist_family::erfc_precise_kernel",
        "ported/special_math_common::gratio_norm_gamma",
        "ported/special_math_common::gratio_rexp",
        "ported/special_math_common::gratio_rlog",
        "ported/special_math_common::gratio_gam1",
        "ported/special_math_common::gratio",
        "ported/special_math_common::series_prefactor",
        "ported/special_math_common::gratio_after40",
        "ported/special_math_common::gratio_cf",
        "ported/special_math_common::gratio_temme_270",
        "ported/special_math_common::gratio_temme_340",
        "ported/special_math_common::gratio_temme_330",
        "ported/special_math_common::gratio_temme_finish",
        "ported/special_math_common::regularized_gamma_q"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L120-L123",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 140 of 392 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.CHIDIST.json",
  "name": "CHIDIST",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[CHISQ.INV.RT](FUNC.CHISQ.INV.RT.md) inverts the corresponding probability. [CHISQ.TEST](FUNC.CHISQ.TEST.md) computes a test probability from observed and expected counts.\n\n\n",
    "how-to-implement": "\nFor df=1 the current route calls ERFC.PRECISE at `sqrt(x/2)`, preserving divide-then-square-root order. For df=2 it calls the measured public EXP at `-(x/2)`. Otherwise evaluate the regularized upper gamma ratio `Q(df/2,x/2)` directly. Avoid obtaining a tiny tail by subtracting a near-one CDF. The worked df=2 value follows from `x/2=1`. The numerical outline is an implementation route, not an identification of every Excel approximation or return-rounding stage. The current problem-functions report retains unresolved distribution mismatches.\n\n\n",
    "quirks": "\nDegrees of freedom are truncated. Negative x and an admitted degree count below one or above `10^10` give `#NUM!` in the current shared family. Nonnumeric arguments give `#VALUE!`. A right tail is not a density.\n\n\n",
    "sources": "\n- [Microsoft: CHIDIST function](https://support.microsoft.com/en-us/excel/functions/chidist-function), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/chi_f_t_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=CHIDIST(2,2)` is about `0.367879441171442`. At two degrees of freedom the right tail is `exp(-x/2)`. The tail at x=0 is one.\n\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| 19929 | Windows, bitness not recorded, CPU not recorded | 41 |\n| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 388 |\n\n- XC-CHIDIST-001: build 19929 versus build 20131; 10 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.\n\nAgreement on these compared inputs does not establish agreement on unmeasured inputs.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.CHIDIST.json).",
    "what-it-does": "\n`CHIDIST(x, deg_freedom)` returns the chi-square probability to the right of x. CHIDIST is the compatibility name for the right tail.\n\n\n"
  },
  "signature": {
    "display": "CHIDIST(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": "Compatibility",
      "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 the chi-squared distribution (older form)",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the one-tailed probability of the chi-squared distribution",
        "microsoft_url": "https://support.microsoft.com/en-us/office/chidist-function-c90d0fbc-5b56-4f5f-ab57-34af1bf6897e"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "CHIDIST"
        },
        {
          "locale": "bg-BG",
          "name": "CHIDIST"
        },
        {
          "locale": "cs-CZ",
          "name": "CHIDIST"
        },
        {
          "locale": "da-DK",
          "name": "CHIFORDELING"
        },
        {
          "locale": "de-DE",
          "name": "CHIDIST"
        },
        {
          "locale": "el-GR",
          "name": "CHIDIST"
        },
        {
          "locale": "en-AU",
          "name": "CHIDIST"
        },
        {
          "locale": "en-GB",
          "name": "CHIDIST"
        },
        {
          "locale": "en-US",
          "name": "CHIDIST"
        },
        {
          "locale": "es-ES",
          "name": "DISTR.CHI"
        },
        {
          "locale": "et-EE",
          "name": "CHIDIST"
        },
        {
          "locale": "fi-FI",
          "name": "CHIJAKAUMA"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.KHIDEUX*"
        },
        {
          "locale": "he-IL",
          "name": "CHIDIST"
        },
        {
          "locale": "hr-HR",
          "name": "CHIDIST"
        },
        {
          "locale": "hu-HU",
          "name": "KHI.ELOSZLÁS"
        },
        {
          "locale": "id-ID",
          "name": "CHIDIST"
        },
        {
          "locale": "it-IT",
          "name": "CHIDIST"
        },
        {
          "locale": "ja-JP",
          "name": "CHIDIST"
        },
        {
          "locale": "ko-KR",
          "name": "CHIDIST"
        },
        {
          "locale": "lt-LT",
          "name": "CHIDIST"
        },
        {
          "locale": "lv-LV",
          "name": "CHIDIST"
        },
        {
          "locale": "nb-NO",
          "name": "KJI.FORDELING"
        },
        {
          "locale": "nl-NL",
          "name": "CHI.KWADRAAT"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁAD.CHI"
        },
        {
          "locale": "pt-BR",
          "name": "QUIDIST"
        },
        {
          "locale": "pt-PT",
          "name": "DIST.CHI"
        },
        {
          "locale": "ro-RO",
          "name": "CHIDIST"
        },
        {
          "locale": "ru-RU",
          "name": "ХИ2РАСП"
        },
        {
          "locale": "sk-SK",
          "name": "CHIDIST"
        },
        {
          "locale": "sl-SI",
          "name": "CHIDIST"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "CHIDIST"
        },
        {
          "locale": "sv-SE",
          "name": "CHI2FÖRD"
        },
        {
          "locale": "th-TH",
          "name": "CHIDIST"
        },
        {
          "locale": "tr-TR",
          "name": "KİKAREDAĞ işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "CHIDIST"
        },
        {
          "locale": "vi-VN",
          "name": "CHIDIST"
        },
        {
          "locale": "zh-CN",
          "name": "CHIDIST"
        },
        {
          "locale": "zh-HK",
          "name": "CHIDIST"
        },
        {
          "locale": "zh-TW",
          "name": "CHIDIST"
        }
      ],
      "signature": {
        "display": "CHIDIST(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": "CHIDIST",
      "version_marker": null,
      "xlcall": {
        "code": "274",
        "symbol": "xlfChidist"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/chidist-function-c90d0fbc-5b56-4f5f-ab57-34af1bf6897e"
  },
  "try_it": {
    "formula": "=CHIDIST(2,2)"
  },
  "url": "https://handbook.dnacalc.com/functions/CHIDIST.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "41 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 19929",
      "platform": "Windows, bitness not recorded, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.CHIDIST.json"
      ]
    },
    {
      "behaviour": "388 captured inputs are indexed for this environment. Capture dates: 2026-07-12 to 2026-07-17. 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.CHIDIST.json"
      ]
    }
  ]
}