Statistical functions
CHISQ.INV.RT
Matches all 4 recorded answers
Recorded: 4 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | CHISQ.INV.RT |
| Bulgarian | CHISQ.INV.RT |
| Czech | CHISQ.INV.RT |
| Danish | CHI2.INV.RT |
| German | CHISQ.INV.RT |
| Greek | CHISQ.INV.RT |
| English (Australia) | CHISQ.INV.RT |
| English (United Kingdom) | CHISQ.INV.RT |
| English (United States) | CHISQ.INV.RT |
| Spanish | INV.CHICUAD.CD |
| Estonian | CHISQ.INV.RT |
| Finnish | CHINELIÖ.KÄÄNT.OH |
| French | LOI.KHIDEUX.INVERSE.DROITE |
| Hebrew | CHISQ.INV.RT |
| Croatian | CHISQ.INV.RT |
| Hungarian | KHINÉGYZET.INVERZ.JOBB |
| Indonesian | CHISQ.INV.RT |
| Italian | CHISQ.INV.RT |
| Japanese | CHISQ.INV.RT |
| Korean | CHISQ.INV.RT |
| Lithuanian | CHISQ.INV.RT |
| Latvian | CHISQ.INV.RT |
| Norwegian | CHISQ.INV.RT |
| Dutch | CHIKW.INV.RECHTS |
| Polish | ROZKŁ.CHI.ODWR.PS |
| Portuguese (Brazil) | CHISQ.INV.RT |
| Portuguese (Portugal) | INV.CHIQ.DIR |
| Romanian | CHISQ.INV.RT |
| Russian | ХИ2.ОБР.ПХ |
| Slovak | CHISQ.INV.RT |
| Slovenian | CHISQ.INV.RT |
| Serbian (Latin) | CHISQ.INV.RT |
| Swedish | CHI2.INV.RT |
| Thai | CHISQ.INV.RT |
| Turkish | KİKARE.TERS.SAĞK |
| Ukrainian | CHISQ.INV.RT |
| Vietnamese | CHISQ.INV.RT |
| Chinese (Simplified) | CHISQ.INV.RT |
| Chinese (Hong Kong) | CHISQ.INV.RT |
| Chinese (Traditional) | CHISQ.INV.RT |
Names from Microsoft's support site.
What it does
CHISQ.INV.RT(probability, deg_freedom)
CHISQ.INV.RT(probability, deg_freedom) finds the chi-square value whose right-tail probability is the requested value.
Try it
=CHISQ.INV.RT(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 64 unsuccessful search iterations. Those statements are documentation, rather than evidence that the current shared search has the same guards or iteration counter. The companion legacy CHIINV page documents 100 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.
- Truncate and validate k and require
0<p<1. LetH(x)=-Q(k/2,x/2)andtarget=-p, making H increasing. - Set
lo=0,hi=max(k,1). WhileH(hi)<target, double hi, with the source’s limit of 200 expansion checks. - 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 midpointM=L+(U-L)//2, decode it to x, and evaluate H(x). IfH(x)>=target, set U=M; otherwise set L=M. - 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.
CHISQ.INV.RT · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub24 chisq_inv_rt "CHISQ.INV.RT" (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
numscatalogue/distributionstruncate_positive_integerported/chi_f_t_familyvalidate_probability_open_unitported/chi_f_t_familysearch_upper_boundported/chi_f_t_familychisq_inv_rt_kernelported/chi_f_t_familybinary_withported/excel_numericexcel_expm1_internalported/excel_numericexpm1_internal_graphported/excel_numericexcel_x87_subported/excel_numericexcel_x87_mulported/excel_numericexcel_x87_temme_finishported/excel_numericexcel_x87_divported/excel_numericmulported/excel_numeric/x87subported/excel_numeric/x87divported/excel_numeric/x87pow2_positiveported/excel_numeric/x87_chainspow2ported/excel_numeric/x87_chainsexp_extported/excel_numeric/x87_chainsexp_withported/excel_numeric/x87_chainsexcel_expported/excel_numeric/x87_chainslog_withported/excel_numeric/x87_chainsexcel_logported/excel_numeric/x87_chainsgratio_norm_gammaported/special_math_commongratio_rexpported/special_math_commongratio_rlogported/special_math_commongratio_gam1ported/special_math_commongratioported/special_math_commonseries_prefactorported/special_math_commongratio_after40ported/special_math_commongratio_cfported/special_math_commongratio_temme_270ported/special_math_commongratio_temme_340ported/special_math_commongratio_temme_330ported/special_math_commongratio_temme_finishported/special_math_commonregularized_gamma_qported/special_math_commonbisect_inverseported/special_math_common
Argument and result plumbing
No implementation has been published with a Handbook test suite for this function.
Version differences
No 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.
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