{
  "category": "Statistical functions",
  "display_name": "CHISQ.DIST",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.CHISQ.DIST",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 5 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 5 recorded answers",
    "workbook_corpus": {
      "cells": 5,
      "matched": 5
    }
  },
  "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#L112-L115",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/chi_f_t_family.rs#L37-L52",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/chi_f_t_family.rs#L54-L81"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/beta_gamma_stats_family::validate_gamma_shape",
        "ported/beta_gamma_stats_family::gamma_dist_kernel",
        "ported/chi_f_t_family::truncate_positive_integer",
        "ported/chi_f_t_family::validate_nonnegative_x",
        "ported/discrete_dist::finite",
        "ported/discrete_dist::expon_dist_kernel",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_expm1_internal",
        "ported/excel_numeric::excel_expm1_spilled",
        "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::erf_precise_kernel",
        "ported/special_math_common::ln_gamma",
        "ported/special_math_common::gamma",
        "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_p"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L112-L115",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 5 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.CHISQ.DIST.json",
  "name": "CHISQ.DIST",
  "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](FUNC.CHISQ.INV.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 the cumulative branch the current kernel calls the gamma CDF at shape `df/2`, scale two. Its df=1 route is ERF.PRECISE of `sqrt(x/2)`; its df=2 route uses the exponential CDF. For a density at positive x the mathematical expression is `x^(df/2-1)*exp(-x/2)/(2^(df/2)*Gamma(df/2))`; handle x=0 limits explicitly. 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 density is not the probability of the exact input value; use a CDF difference for an interval.\n\n\n",
    "sources": "\n- [Microsoft: CHISQ.DIST function](https://support.microsoft.com/en-us/excel/functions/chisq-dist-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`=CHISQ.DIST(2,2,TRUE)` is about `0.632120558828558`. At two degrees of freedom the right tail is `exp(-x/2)`. The CDF is its mathematical complement, while density at x=2 is about `0.183939720585721`.\n\n\n",
    "version-differences": "\nNo same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.\n\n\n",
    "what-it-does": "\n`CHISQ.DIST(x, deg_freedom, cumulative)` returns a chi-square CDF when cumulative is TRUE, or its density when FALSE.\n\n\n"
  },
  "signature": {
    "display": "CHISQ.DIST(x, deg_freedom, cumulative)",
    "parameters": [
      {
        "description": null,
        "name": "x",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "deg_freedom",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "cumulative",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "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": "Chi-squared distribution: the density or the left-tail probability",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the cumulative beta probability density function",
        "microsoft_url": "https://support.microsoft.com/en-us/office/chisq-dist-function-8486b05e-5c05-4942-a9ea-f6b341518732"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "bg-BG",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "cs-CZ",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "da-DK",
          "name": "CHI2.FORDELING"
        },
        {
          "locale": "de-DE",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "el-GR",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "en-AU",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "en-GB",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "en-US",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "es-ES",
          "name": "DISTR.CHICUAD"
        },
        {
          "locale": "et-EE",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "fi-FI",
          "name": "CHINELIÖ.JAKAUMA"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.KHIDEUX.N*"
        },
        {
          "locale": "he-IL",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "hr-HR",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "hu-HU",
          "name": "KHINÉGYZET.ELOSZLÁS"
        },
        {
          "locale": "id-ID",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "it-IT",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "ja-JP",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "ko-KR",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "lt-LT",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "lv-LV",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "nb-NO",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "nl-NL",
          "name": "CHIKW.VERD"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁ.CHI"
        },
        {
          "locale": "pt-BR",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "pt-PT",
          "name": "DIST.CHIQ"
        },
        {
          "locale": "ro-RO",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "ru-RU",
          "name": "ХИ2.РАСП"
        },
        {
          "locale": "sk-SK",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "sl-SI",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "sv-SE",
          "name": "CHI2.FÖRD"
        },
        {
          "locale": "th-TH",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "tr-TR",
          "name": "KİKARE.DAĞ"
        },
        {
          "locale": "uk-UA",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "vi-VN",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "zh-CN",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "zh-HK",
          "name": "CHISQ.DIST"
        },
        {
          "locale": "zh-TW",
          "name": "CHISQ.DIST"
        }
      ],
      "signature": {
        "display": "CHISQ.DIST(x, deg_freedom, cumulative)",
        "parameters": [
          {
            "description": null,
            "name": "x",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "deg_freedom",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "cumulative",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "CHISQ.DIST",
      "version_marker": null,
      "xlcall": {
        "code": "527",
        "symbol": "xlfChisq_dist"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/chisq-dist-function-8486b05e-5c05-4942-a9ea-f6b341518732"
  },
  "try_it": {
    "formula": "=CHISQ.DIST(2,2,TRUE)"
  },
  "url": "https://handbook.dnacalc.com/functions/CHISQ.DIST.html",
  "variants": [],
  "versions": []
}