Statistical functions

CHISQ.INV

Known larger differences on 29 of 44 recorded answers

Of 44 recorded answers (40 in the answer bank and 4 workbook cells), 29 do not match: 1 differ by more than 16 ULP, 28 differ by at most 16 ULP. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicCHISQ.INV
BulgarianCHISQ.INV
CzechCHISQ.INV
DanishCHI2.INV
GermanCHISQ.INV
GreekCHISQ.INV
English (Australia)CHISQ.INV
English (United Kingdom)CHISQ.INV
English (United States)CHISQ.INV
SpanishINV.CHICUAD
EstonianCHISQ.INV
FinnishCHINELIÖ.KÄÄNT
FrenchLOI.KHIDEUX.INVERSE
HebrewCHISQ.INV
CroatianCHISQ.INV
HungarianKHINÉGYZET.INVERZ
IndonesianCHISQ.INV
ItalianCHISQ.INV
JapaneseCHISQ.INV
KoreanCHISQ.INV
LithuanianCHISQ.INV
LatvianCHISQ.INV
NorwegianCHISQ.INV
DutchCHIKW.INV
PolishROZKŁ.CHI.ODWR
Portuguese (Brazil)CHISQ.INV
Portuguese (Portugal)INV.CHIQ
RomanianCHISQ.INV
RussianХИ2.ОБР
SlovakCHISQ.INV
SlovenianCHISQ.INV
Serbian (Latin)CHISQ.INV
SwedishCHI2.INV
ThaiCHISQ.INV
TurkishKİKARE.TERS
UkrainianCHISQ.INV
VietnameseCHISQ.INV
Chinese (Simplified)CHISQ.INV
Chinese (Hong Kong)CHISQ.INV
Chinese (Traditional)CHISQ.INV

Names from Microsoft's support site.

What it does

CHISQ.INV(probability, deg_freedom)

CHISQ.INV(probability, deg_freedom) finds the chi-square value whose left cumulative probability is the requested value.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=CHISQ.INV(0.5,2) is about 1.38629436111989. At two degrees of freedom, a half right tail solves exp(-x/2)=0.5; the same point also has a half left CDF.

Quirks

Degrees of freedom are truncated. Microsoft documents #NUM! below one or above 10^10, and for probabilities outside zero to one; nonnumeric arguments give #VALUE!.

The current left inverse returns zero at probability zero and #NUM! at one. Probability one has no finite mathematical quantile, despite being inside the range described by the page’s out-of-range test. The companion right-tail inverse uses a different endpoint policy and is not obtained by relabelling the same probability.

How to implement

  1. Truncate and validate the degree count k, including the current upper limit 10^10. Validate finite p and handle its endpoints.
  2. Call the current GAMMA.INV kernel with probability p, shape k/2 and scale two. This shared composition is supported by the source’s retained 63 interior pairs; it is not a claim that any gamma library can be substituted unchanged.
  3. That inverse uses its own generic lower incomplete-gamma forward callback. It expands an upper x bound and bisects the ordered binary64 encodings until the endpoints are adjacent, then returns the upper one. Preserve its callback and return rule rather than stopping when an arbitrary real-valued residual looks small.

At k=2, the mathematical CDF is 1-exp(-x/2). Probability one half therefore gives x=-2*ln(0.5), about 1.38629436111989. This identity explains the example; the implementation still goes through the shared inverse.

The public GAMMA.DIST wrapper has special-case branches that the inverse callback does not automatically inherit. Complete forward last bits and all inverse edge cases remain open; the 63-pair composition does not identify private Excel source or settle the whole domain.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

CHISQ.INV · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub
23 chisq_inv "CHISQ.INV" (2, 2) [V "probability", V "deg_freedom"] |s, a, sv| {
    let [p, df] = nums::<2>(s, a)?;
    out(s, cft::chisq_inv_kernel(p, df))
}
chisq_inv_kernel · 16 lines · calc-func/src/ported/chi_f_t_family.rs on GitHub
pub fn chisq_inv_kernel(probability: f64, deg_freedom: f64) -> Result<f64, WorksheetErrorCode> {
    let k = truncate_positive_integer(deg_freedom)?;
    // Inverse-problem identity, live Excel 16.0 b20228: CHISQ.INV(p, df)
    // == GAMMA.INV(p, df/2, 2) on 63/63 interior pairs. Endpoints also
    // match: CHISQ.INV(0,2)=0 and CHISQ.INV(1,2)=#NUM!. CHIINV /
    // CHISQ.INV.RT is the right-tail inverse, not GAMMA.INV(1-p,...) (34/63).
    if !probability.is_finite() {
        return Err(WorksheetErrorCode::Num);
    }
    crate::ported::beta_gamma_stats_family::gamma_inv_kernel(probability, k / 2.0, 2.0).map_err(
        |e| match e {
            code => code,
            _ => WorksheetErrorCode::Value,
        },
    )
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

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.

Excel 16.0 buildPlatform and CPUCaptured inputs
20131Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics40

The 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.

Recorded environments and comparison details.

Excel 16.0 build 20131

Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics

40 captured inputs are indexed for this environment. Capture dates: 2026-07-17 to 2026-07-17. This is a reading count, not a comparison with another build.

Alternatives

CHISQ.DIST supplies the forward probability; CHISQ.TEST returns a test p-value directly.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents