Statistical functions
BETA.INV
Close: 1 of 6 recorded answers differ in the last bits, worst 2 ULP
Everything else matches (6 workbook cells). Last-bit means a finite number within 16 ULP of Excel's. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | BETA.INVn |
| Bulgarian | BETA.INVn |
| Czech | BETA.INVn |
| Danish | BETA.INVn |
| German | BETA.INVn |
| Greek | BETA.INVn |
| English (Australia) | BETA.INVn |
| English (United Kingdom) | BETA.INVn |
| English (United States) | BETA.INVn |
| Spanish | BETA.INVn |
| Estonian | BETA.INVn |
| Finnish | BEETA. KÄÄNT |
| French | BETA.INVn |
| Hebrew | BETA.INVn |
| Croatian | BETA.INVn |
| Hungarian | INVERZ.BÉTA |
| Indonesian | BETA.INVn |
| Italian | BETA.INVn |
| Japanese | BETA.INVn |
| Korean | BETA.INVn |
| Lithuanian | BETA.INVn |
| Latvian | BETA.INVn |
| Norwegian | BETA.INVn |
| Dutch | BETA.INVn |
| Polish | BETA.INVn |
| Portuguese (Brazil) | BETA. INVn |
| Portuguese (Portugal) | BETA. INVN |
| Romanian | BETA.INVn |
| Russian | BETA.INVn |
| Slovak | BETA.INVn |
| Slovenian | BETA.INVn |
| Serbian (Latin) | BETA.INVn |
| Swedish | BETA.INVn |
| Thai | BETA.INVn |
| Turkish | BETA.INVn |
| Ukrainian | BETA.INVn |
| Vietnamese | BETA.INVn |
| Chinese (Simplified) | BETA.INVn |
| Chinese (Hong Kong) | BETA.INVn |
| Chinese (Traditional) | BETA.INVn |
Names from Microsoft's support site.
What it does
BETA.INV(probability, alpha, beta, [A], [B])
BETA.INV(probability,alpha,beta,[A],[B]) returns the value whose beta CDF is the requested probability. Shapes alpha and beta are positive. Bounds default to zero and one; supplying other bounds rescales the value interval, while probability remains on zero to one.
Try it
=BETA.INV(0.25,2,1,2,6) is about 4. On the standard interval, these shapes give CDF z^2; probability one quarter therefore selects z one half. Rescaling gives 2+0.5*4=4.
=BETA.INV(0.25,1,1,2,6) is about 3: the uniform shape-one case has CDF z itself.
Quirks
Microsoft documents #VALUE! for nonnumeric arguments and #NUM! for nonpositive shapes or probability at/below zero or above one. The current implementation also rejects unordered bounds.
The current helper’s validation admits zero probability but has no zero-endpoint shortcut before searching adjacent binary64 values. On the standard interval this can leave a subnormal value that its publisher refuses; on two to six the affine addition rounds it to two. This code-path behaviour is not a measurement of Excel’s endpoint.
The legacy BETAINV shares the current helper. Shared code does not establish that all Excel builds compute the two names identically.
How to implement
- Apply optional bounds and validate finite positive shapes, finite ordered bounds and probability under the chosen endpoint contract.
- Use the current regularized lower beta callback F(z), including its stored complement
1-zand internal beta-ratio approximation. - Search z between zero and one by bisecting the ordered nonnegative binary64 encodings. At each midpoint, keep the upper half when F(z) is below p and the lower half otherwise. Return the upper endpoint once adjacent, as in BETAINV’s detailed search recipe.
- Store
width=B-A,scaled=z*widthandresult=A+scaledwith ordinary binary64 arithmetic and separate multiplication/addition. Apply the worksheet’s numeric publication rule.
In the first example, z is about one half and the last three stages give width four, scaled two and result four. An arithmetic-midpoint search, a residual tolerance, an FMA or an explicit endpoint shortcut can change stored results and boundary behaviour.
At p=0 the usual strict lower-bracket invariant already fails at z=0. The current search can select the smallest positive binary64 value rather than exactly zero. A mathematical inverse can handle that endpoint explicitly; reproducing this code instead requires retaining its search and publication stages.
Inverse accuracy depends on the forward surface being searched. A round trip through that same surface can hide a shared error. The beta approximation, extreme affine scaling and remaining inverse mismatches are still open; there is no published whole-function Handbook suite.
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.
BETA.INV · 6 lines · calc-func/src/catalogue/distributions.rs on GitHub52 beta_inv "BETA.INV" (3, 5) [V "probability", V "alpha", V "beta", V "A", V "B"] |s, a, sv| {
let [p, alpha, beta] = nums::<3>(s, a)?;
let lower = if given(a, 3) { num(s, a, 3)? } else { 0.0 };
let upper = if given(a, 4) { num(s, a, 4)? } else { 1.0 };
out(s, bg::beta_inv_kernel(p, alpha, beta, lower, upper))
}
Kernels shared with other functions
numscatalogue/distributionsvalidate_beta_shapeported/beta_gamma_stats_familybeta_inv_kernelported/beta_gamma_stats_familybinary_withported/excel_numericexcel_x87_addported/excel_numericexcel_x87_mulported/excel_numericexcel_x87_mul_addported/excel_numericmulported/excel_numeric/x87addported/excel_numeric/x87bratio_ftoiported/special_math_commonbratio_spmpar1ported/special_math_commonbratio_expargported/special_math_commonbratio_esumported/special_math_commonbratio_esum20ported/special_math_commonbratio_alnrelported/special_math_commonbratio_rlog1ported/special_math_commonbratio_gam1ported/special_math_commonbratio_gamln1ported/special_math_commonbratio_gamlnported/special_math_commonbratio_algdivported/special_math_commonbratio_bcorrported/special_math_commonbratio_gsumlnported/special_math_commonbratio_betalnported/special_math_commonbratio_betaln_60ported/special_math_commonbratio_erf_nswcported/special_math_commonbratio_erfc1ported/special_math_commonbratio_rexpported/special_math_commonbratio_psiported/special_math_commonbratio_fpserported/special_math_commonbratio_apserported/special_math_commonbratio_bpserported/special_math_commonbratio_bupported/special_math_commonbratio_brcompported/special_math_commonbratio_brcmp1ported/special_math_commonbratio_bfracported/special_math_commonbratio_bgratported/special_math_commonbratio_grat1ported/special_math_commonbratio_basymported/special_math_commonbratioported/special_math_commonregularized_betaported/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
BETA.DIST evaluates the forward CDF or density. BETAINV is the compatibility spelling. F.INV and T.INV use related beta-ratio mathematics with distinct wrappers.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents