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
LanguageName in Excel
ArabicBETA.INVn
BulgarianBETA.INVn
CzechBETA.INVn
DanishBETA.INVn
GermanBETA.INVn
GreekBETA.INVn
English (Australia)BETA.INVn
English (United Kingdom)BETA.INVn
English (United States)BETA.INVn
SpanishBETA.INVn
EstonianBETA.INVn
FinnishBEETA. KÄÄNT
FrenchBETA.INVn
HebrewBETA.INVn
CroatianBETA.INVn
HungarianINVERZ.BÉTA
IndonesianBETA.INVn
ItalianBETA.INVn
JapaneseBETA.INVn
KoreanBETA.INVn
LithuanianBETA.INVn
LatvianBETA.INVn
NorwegianBETA.INVn
DutchBETA.INVn
PolishBETA.INVn
Portuguese (Brazil)BETA. INVn
Portuguese (Portugal)BETA. INVN
RomanianBETA.INVn
RussianBETA.INVn
SlovakBETA.INVn
SlovenianBETA.INVn
Serbian (Latin)BETA.INVn
SwedishBETA.INVn
ThaiBETA.INVn
TurkishBETA.INVn
UkrainianBETA.INVn
VietnameseBETA.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

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.

=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

  1. Apply optional bounds and validate finite positive shapes, finite ordered bounds and probability under the chosen endpoint contract.
  2. Use the current regularized lower beta callback F(z), including its stored complement 1-z and internal beta-ratio approximation.
  3. 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.
  4. Store width=B-A, scaled=z*width and result=A+scaled with 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 GitHub
52 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

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