Contact

GAMMAINV Function (LibreOffice Calc)

Statistical Intermediate LibreOffice Calc

Find gamma percentiles with GAMMAINV in LibreOffice Calc, including probability zero, shape and scale parameters, and cumulative inverse checks.

Verification status: Official release source and independently calculated examples for GAMMAINV were reviewed. No new LibreOffice Calc application execution is claimed for this guide; the stated version and example limits still apply. How formula examples are checked

Quick answer: =GAMMAINV(0.8;1;1) returns approximately 1.609437912434. It is the value below which 80% of the specified gamma distribution lies.

Availability and version history

  • Introduced: First release not established. The LibreOffice 3.3 function appendix documents this name; historical presence does not prove introduction.
  • Supported in: LibreOffice 26.8.1.1. No final supported release has been established.
  • Scope: Desktop Calc. Current argument defaults are stated for the cited release, not inferred for every older version.
  • Checked: October 14, 2026. Official documentation/source and independent mathematics checked; LibreOffice Calc was not run for this guide.

What GAMMAINV calculates

GAMMAINV inverts the cumulative GAMMADIST function. Probability is a left-tail cumulative probability, Alpha is positive shape, and Beta is positive scale. The returned cutoff has the same units as Beta. Official reference.

A gamma model has mean Alpha×Beta and variance Alpha×Beta². A quantile is not the mean, a density, or the reciprocal of a probability. The inverse generally needs numerical solving; the release source uses an iterative inverse routine rather than a simple algebraic rearrangement.

Syntax and domain

=GAMMAINV(Probability; Alpha; Beta)

All three arguments are required. Use Alpha>0, Beta>0 and 0≤Probability<1. The release evaluator returns zero explicitly for Probability=0. Probability=1, values outside the stated range, or nonpositive shape/scale are invalid arguments.

The p=0 result is a meaningful difference from normal and lognormal inverse functions, whose valid finite-cutoff domains differ. Do not build one generic endpoint rule for every inverse distribution. If the iterative solver does not converge, the source reports a convergence error; this guide does not claim every extreme parameter combination will converge.

Reproducible reference cases

Enter each formula in its own numeric cell. The expected mathematical outputs are independently calculated, rounded to twelve decimal places.

Formula Expected result, approximately
=GAMMAINV(0;2;2) 0
=GAMMAINV(.5;1;1) 0.69314718056
=GAMMAINV(.8;1;1) 1.609437912434
=GAMMAINV(.9;1;2) 4.605170185988
=GAMMAINV(.5;2;2) 3.356693980033
=GAMMAINV(.8;2.5;1.4) 5.102493288654
=GAMMAINV(.95;3;1) 6.295793621872
=GAMMAINV(.25;.5;2) 0.101531044268

Practical worksheet: a target completion probability

Put target 0.8 in A2, shape 2.5 in B2 and scale 1.4 in C2. In D2 enter =GAMMAINV(A2;B2;C2). The expected cutoff is approximately 5.102493288654. If scale is measured in hours, D2 is hours; it is not 510%.

Check the result with =GAMMADIST(D2;B2;C2;1) in E2. The expected value is approximately 0.8. Keep the same shape and scale and use cumulative mode. A check with density mode does not invert GAMMAINV.

Advanced example: exploit a scale relationship

With shape and probability fixed, multiplying Beta by 3 multiplies the quantile by 3. Thus =GAMMAINV(0.8;2.5;4.2) is approximately 15.307479865963, three times the cutoff at scale 1.4. This provides a useful check when converting time or measurement units.

The relationship does not justify multiplying Alpha by 3. Shape controls a different property of the distribution, and changing it produces a different quantile relationship. Label shape and scale separately in a parameter sheet.

Advanced example: the shape-one closed form

For Alpha=1, the gamma model is exponential and the quantile is −Beta×LN(1−p). =GAMMAINV(0.9;1;2) therefore agrees mathematically with =-2*LN(1-0.9), approximately 4.605170185988.

Compare those two formulas in separate cells using the same p. The agreement is an independent check for that special case, not proof that the closed form also applies to other shapes. A rate parameter must be inverted before being used as Beta.

Precision and interpretation

Probabilities near 1 ask for increasingly large cutoffs. Retain the original probability cell rather than its rounded display. Entering 95% supplies 0.95, whereas entering 95 is invalid. A cell shown as 100% may still hold a value below 1.

A round trip tests numerical consistency for the chosen case. It does not validate the gamma assumption, parameter estimates, coercion rules or all extreme tails. Use a nonnegative model for an appropriate quantity and preserve the distinction between a source-defined boundary and a natively observed result.

Official sources