Compatibility

CHIINV

Known larger differences on 69 of 104 recorded answers

Of 104 recorded answers (100 in the answer bank and 4 workbook cells), 69 do not match: 3 differ by more than 16 ULP, 66 differ by at most 16 ULP. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicCHIINV
BulgarianCHIINV
CzechCHIINV
DanishCHIINV
GermanCHIINV
GreekCHIINV
English (Australia)CHIINV
English (United Kingdom)CHIINV
English (United States)CHIINV
SpanishPRUEBA.CHI.INV
EstonianCHIINV
FinnishCHIJAKAUMA.KÄÄNT
FrenchKHIDEUX.INVERSE
HebrewCHIINV
CroatianCHIINV
HungarianINVERZ.KHI
IndonesianCHIINV
ItalianCHIINV
JapaneseCHIINV
KoreanCHIINV
LithuanianCHIINV
LatvianCHIINV
NorwegianCHIINV
DutchCHI.KWADRAAT.INV
PolishROZKŁAD.CHI.ODW
Portuguese (Brazil)QUIINV
Portuguese (Portugal)INV.CHI
RomanianCHIINV
RussianХИ2ОБР
SlovakCHIINV
SlovenianCHIINV
Serbian (Latin)CHIINV
SwedishCHI2INV
ThaiCHIINV
TurkishKİKARETERS işlevi
UkrainianCHIINV
VietnameseCHIINV
Chinese (Simplified)CHIINV
Chinese (Hong Kong)CHIINV
Chinese (Traditional)CHIINV

Names from Microsoft's support site.

What it does

CHIINV(probability, deg_freedom)

CHIINV(probability, deg_freedom) finds the chi-square value whose right-tail probability is the requested value. CHIINV is the compatibility right-tail inverse.

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.

=CHIINV(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. Nonnumeric arguments give #VALUE!; invalid degrees or probabilities give #NUM!. The current helper accepts truncated degrees from one through 10^10 and requires 0<p<1; it rejects both probability endpoints.

The opened Microsoft page describes an out-of-range probability test below zero or above one, and degrees below one. It also documents #N/A after 100 unsuccessful search iterations. Those statements are documentation, rather than evidence that the current shared search has the same guards or iteration counter. The companion CHISQ.INV.RT page documents 64 iterations; this wording difference does not establish a measured change between Excel builds.

How to implement

The current candidate inverts the decreasing regularized upper gamma ratio Q(k/2,x/2) directly. Do not first replace p by 1-p: a tiny p can disappear in that subtraction.

  1. Truncate and validate k and require 0<p<1. Let H(x)=-Q(k/2,x/2) and target=-p, making H increasing.
  2. Set lo=0,hi=max(k,1). While H(hi)<target, double hi, with the source’s limit of 200 expansion checks.
  3. For nonnegative finite binary64 values, their unsigned 64-bit encodings have the same order as their values. Let L and U be the encodings of lo and hi. While U-L>1, take the integer midpoint M=L+(U-L)//2, decode it to x, and evaluate H(x). If H(x)>=target, set U=M; otherwise set L=M.
  4. Decode and return U. This chooses the upper endpoint of the maintained adjacent-value bracket, rather than a floating arithmetic midpoint or a nearest-root rounding rule.

At k=2 the mathematical right tail is exp(-x/2). Setting it to one half gives about 1.38629436111989. In the current code, however, this inverse callback remains the generic upper-gamma ratio; it does not call the public right-tail wrapper’s separate df=1 ERFC and df=2 EXP branches.

This is an implementable description of the current search, conditional on its numerical forward callback. That callback’s approximation and monotonic behaviour, its remaining mismatches and whole-domain Excel return choices are separate unresolved questions.

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.

CHIINV · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub
25 chiinv "CHIINV" (2, 2) [V "probability", V "deg_freedom"] |s, a, sv| {
    let [p, df] = nums::<2>(s, a)?;
    out(s, cft::chisq_inv_rt_kernel(p, df))
}

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
19929Windows, bitness not recorded, CPU not recorded14
20131Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics100
  • XC-CHIINV-001: build 19929 versus build 20131; 5 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.

Agreement on these compared inputs does not establish agreement on unmeasured inputs.

Recorded environments and comparison details.

Excel 16.0 build 19929

Windows, bitness not recorded, CPU not recorded

14 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.

Excel 16.0 build 20131

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

100 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.RT 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