Statistical functions

GAMMA.INV

Known larger differences on 155 of 209 recorded answers

Of 209 recorded answers (204 in the answer bank and 5 workbook cells), 155 do not match: 7 differ by more than 16 ULP, 148 differ by at most 16 ULP. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicGAMMA.INV
BulgarianGAMMA.INV
CzechGAMMA.INV
DanishGAMMA.INV
GermanGAMMA.INV
GreekGAMMA.INV
English (Australia)GAMMA.INV
English (United Kingdom)GAMMA.INV
English (United States)GAMMA.INV
SpanishINV.GAMMA
EstonianGAMMA.INV
FinnishGAMMA.JAKAUMA.KÄÄNT
FrenchLOI.GAMMA.INVERSE.N
HebrewGAMMA.INV
CroatianGAMMA.INV
HungarianGAMMA.INVERZ
IndonesianGAMMA.INV
ItalianGAMMA.INV
JapaneseGAMMA.INV
KoreanGAMMA.INV
LithuanianGAMMA.INV
LatvianGAMMA.INV
NorwegianGAMMA.INV
DutchGAMMA.INV.N
PolishROZKŁ.GAMMA.ODWR
Portuguese (Brazil)GAMMA.INV
Portuguese (Portugal)INV.GAMA
RomanianGAMMA.INV
RussianГАММА.ОБР
SlovakGAMMA.INV
SlovenianGAMMA.INV
Serbian (Latin)GAMMA.INV
SwedishGAMMA.INV
ThaiGAMMA.INV
TurkishGAMA.TERS
UkrainianGAMMA.INV
VietnameseGAMMA.INV
Chinese (Simplified)GAMMA.INV
Chinese (Hong Kong)GAMMA.INV
Chinese (Traditional)GAMMA.INV

Names from Microsoft's support site.

What it does

GAMMA.INV(probability, alpha, beta)

GAMMA.INV(probability,alpha,beta) returns a gamma-distribution quantile for positive shape alpha and positive scale beta. It seeks the x whose lower cumulative probability is the requested p. Beta scales x’s units, rather than supplying an exponential rate.

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.

=GAMMA.INV(0.5,1,2) is about 1.3862943611. The mathematical shape-one CDF is 1-exp(-x/2), so its median solves x=-2*ln(0.5).

=GAMMA.INV(0.5,1,4) is about 2.7725887222. Doubling the scale doubles the mathematical quantile, though the current search has its own stored path.

Quirks

Microsoft documents #VALUE! for a text argument, #NUM! for nonpositive shape or scale and for p outside zero to one. The current helper returns zero at p=0 and #NUM! at p=1, where there is no finite mathematical gamma quantile.

The opened modern page documents an iterative search limit of 64 tries followed by #N/A; the legacy GAMMAINV page describes 100 tries. This documentation difference is not a measured change between named Excel builds, and the current helper uses its own bracket and adjacent-value search.

The current inverse callback is the generic lower gamma ratio. It does not call the public GAMMA.DIST wrapper, whose half-shape and shape-one cases have separate ERF and exponential paths.

How to implement

  1. Validate finite positive alpha and beta and finite p. Return zero for p=0; reject p<0 or p>=1 under the current endpoint rule.
  2. With ordinary binary64 operations, initialize lo=0 and hi=beta*max(alpha+10*sqrt(alpha)+10,1).
  3. Evaluate F(x)=regularized_gamma_p(alpha,D(x/beta)). While F(hi) is below p, double hi. The current source permits 200 expansion checks; extreme-parameter bracketing and nonfinite callbacks remain explicit limitations.
  4. Bisect the nonnegative binary64 encodings of lo and hi, as in the shared ordered-value inverse recipe. If F(mid)>=p keep the midpoint as the upper endpoint; otherwise keep it as lower. Return the upper value when the endpoint encodings are adjacent.
  5. Apply worksheet numeric publication. The candidate searches x on its scaled interval; it does not simply solve once at scale one and multiply an already rounded answer by beta.

For alpha=1, beta=2 and p=0.5, the mathematical equation gives about 1.38629436111989. That explains the example. Its numerical candidate still depends on the generic forward callback and upper-adjacent return, rather than an exact inverse exponential formula.

A bracketed Newton method or a residual-based stopping rule is another reasonable mathematical solver. Changing the callback to the public CDF’s special branches is also a separate numerical candidate. Forward-ratio errors, conditioning in the tails, bracket extremes and remaining inverse mismatches remain open; no whole-function Handbook suite is published.

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.

GAMMA.INV · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub
56 gamma_inv "GAMMA.INV" (3, 3) [V "probability", V "alpha", V "beta"] |s, a, sv| {
    let [p, alpha, beta] = nums::<3>(s, a)?;
    out(s, bg::gamma_inv_kernel(p, alpha, beta))
}

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 Graphics204

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

204 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

GAMMA.DIST supplies the forward distribution. GAMMAINV is the compatibility spelling. CHISQ.INV uses gamma shape df/2 and scale two; BETA.INV inverts a bounded distribution.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents