← All functions

GAMMA.INV

Quirk found

Category: Statistical · Last tested 2026-09-01

Real compatibility results for the GAMMA.INV function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.

Support matrix

EngineDocumentedLive-testedVerdict
Excel (desktop)Yes No — documented only n/a
Excel for the web— Yes (recalc, 2026-09-01) Supported, behaves as documented
Google SheetsYes Yes (Drive import, 2026-08-31) Supported, behaves as documented
LibreOffice CalcYes Yes (25.8.7.3, 2026-08-31) Quirk found

LibreOffice version history

We executed the same test cases under each LibreOffice release to show exactly when GAMMA.INV’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
24.2.0.3 Quirk found 2026-08-31
24.8.7.2 Quirk found 2026-08-31
25.2.0.3 Quirk found 2026-08-31
25.8.7.3 Quirk found 2026-08-31

Why isn't GAMMA.INV working in LibreOffice?

GAMMA.INV exists in LibreOffice 25.8.7.3, but it is not a drop-in match for Excel — our executed tests found real behavioral differences (detailed in the test results on this page). If a formula that works in Excel or Google Sheets misbehaves in LibreOffice, compare your usage against the failing cases above before assuming your data is wrong.

Discovered quirks

Executed test cases

Excel for the web (executed 2026-09-01 via OneDrive recalculation)

These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.

FormulaDescriptionResultExpectedVerdict
=ROUND(GAMMA.INV(A2,A3,A4),7) Microsoft's documented worked example: the inverse of the gamma cumulative distribution 10.0000112 10.0000112
Provenance

Microsoft publishes '=GAMMA.INV(A2,A3,A4)' with the result 10.0000112. Derived independently, and deliberately NOT by calling an inverse-gamma routine: the regularized lower incomplete gamma P(9, x/2) was built at 50 digits with mpmath and the equation P(9, x/2) = 0.068094 solved for x by mpmath's own root finder, giving x = 10.000011191437178309. That rounds to exactly the published 10.0000112 at 7 dp, which is the precision the page prints, so 7 is the precision asserted. Note this is NOT the 10.00001131 that appears as the input on the GAMMA.DIST page: the two pages form a round trip, but Microsoft rounded the probability to six decimals (0.068094) before feeding it back, and inverting a rounded probability necessarily lands slightly off the original x. The corpus asserts the value that the published INPUT actually produces, and tests the exact round trip separately below. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=ROUND(GAMMA.INV(GAMMA.DIST(10.00001131,9,2,TRUE),9,2),6) The documented inverse relationship, without a rounded probability in the middle 10.000011 10.000011
Provenance

Excel documents the pair as exact inverses: "If p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x." Feeding the FULL-PRECISION cumulative probability back in (rather than Microsoft's 6-decimal 0.068094) must therefore return the original 10.00001131. Derived independently with mpmath: solving P(9, x/2) = 0.068094003869787331102 gives x = 10.00001131 to twenty digits. Asserted at 6 dp because Microsoft's own page warns the inverse is iterative -- "precision of GAMMA.INV depends on precision of GAMMA.DIST" and "GAMMA.INV uses an iterative search technique" -- so the last couple of digits are an implementation's convergence tolerance, not a fact about the function. This case is the one that actually tests the inverse property; the doc-example case above tests the published figure. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(0,9,2) A probability of exactly 0, the lower end of the permitted range 0 0
Provenance

Excel excludes only probability < 0 and probability > 1 ("If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value"), so 0 is IN range. The gamma distribution's support starts at 0 and its CDF is 0 there, so the inverse at probability 0 is 0. Included because a naive iterative solver can fail to converge at the boundary and return the #N/A the page describes for non-convergence. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(-0.1,9,2) A probability below 0 #NUM! #NUM!
Provenance

Excel documents: "If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value." EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(2,9,2) A probability above 1 #NUM! #NUM!
Provenance

Excel documents: "If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value." Asserted separately from the negative case because they are guards on opposite ends of the same range. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(0.5,0,2) An alpha of zero #NUM! #NUM!
Provenance

Excel documents: "If alpha <= 0 or if beta <= 0, GAMMA.INV returns the #NUM! error value." EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV("abc",9,2) A non-numeric probability #VALUE! #VALUE!
Provenance

Excel documents: "If any argument is text, GAMMA.INV returns the #VALUE! error value." Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched

Google Sheets (executed 2026-08-31 via Drive import)

Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.

FormulaDescriptionResultExpectedVerdict
=ROUND(GAMMA.INV(A2,A3,A4),7) Microsoft's documented worked example: the inverse of the gamma cumulative distribution 10.0000112 10.0000112
Provenance

Microsoft publishes '=GAMMA.INV(A2,A3,A4)' with the result 10.0000112. Derived independently, and deliberately NOT by calling an inverse-gamma routine: the regularized lower incomplete gamma P(9, x/2) was built at 50 digits with mpmath and the equation P(9, x/2) = 0.068094 solved for x by mpmath's own root finder, giving x = 10.000011191437178309. That rounds to exactly the published 10.0000112 at 7 dp, which is the precision the page prints, so 7 is the precision asserted. Note this is NOT the 10.00001131 that appears as the input on the GAMMA.DIST page: the two pages form a round trip, but Microsoft rounded the probability to six decimals (0.068094) before feeding it back, and inverting a rounded probability necessarily lands slightly off the original x. The corpus asserts the value that the published INPUT actually produces, and tests the exact round trip separately below. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=ROUND(GAMMA.INV(GAMMA.DIST(10.00001131,9,2,TRUE),9,2),6) The documented inverse relationship, without a rounded probability in the middle 10.000011 10.000011
Provenance

Excel documents the pair as exact inverses: "If p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x." Feeding the FULL-PRECISION cumulative probability back in (rather than Microsoft's 6-decimal 0.068094) must therefore return the original 10.00001131. Derived independently with mpmath: solving P(9, x/2) = 0.068094003869787331102 gives x = 10.00001131 to twenty digits. Asserted at 6 dp because Microsoft's own page warns the inverse is iterative -- "precision of GAMMA.INV depends on precision of GAMMA.DIST" and "GAMMA.INV uses an iterative search technique" -- so the last couple of digits are an implementation's convergence tolerance, not a fact about the function. This case is the one that actually tests the inverse property; the doc-example case above tests the published figure. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(0,9,2) A probability of exactly 0, the lower end of the permitted range 0 0
Provenance

Excel excludes only probability < 0 and probability > 1 ("If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value"), so 0 is IN range. The gamma distribution's support starts at 0 and its CDF is 0 there, so the inverse at probability 0 is 0. Included because a naive iterative solver can fail to converge at the boundary and return the #N/A the page describes for non-convergence. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(-0.1,9,2) A probability below 0 #NUM! #NUM!
Provenance

Excel documents: "If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value." EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(2,9,2) A probability above 1 #NUM! #NUM!
Provenance

Excel documents: "If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value." Asserted separately from the negative case because they are guards on opposite ends of the same range. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(0.5,0,2) An alpha of zero #NUM! #NUM!
Provenance

Excel documents: "If alpha <= 0 or if beta <= 0, GAMMA.INV returns the #NUM! error value." EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV("abc",9,2) A non-numeric probability #VALUE! #VALUE!
Provenance

Excel documents: "If any argument is text, GAMMA.INV returns the #VALUE! error value." Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched

LibreOffice Calc 25.8.7.3 (tested 2026-08-31)

FormulaDescriptionResultExpectedVerdict
=ROUND(GAMMA.INV(A2,A3,A4),7) Microsoft's documented worked example: the inverse of the gamma cumulative distribution 10.0000112 10.0000112
Provenance

Microsoft publishes '=GAMMA.INV(A2,A3,A4)' with the result 10.0000112. Derived independently, and deliberately NOT by calling an inverse-gamma routine: the regularized lower incomplete gamma P(9, x/2) was built at 50 digits with mpmath and the equation P(9, x/2) = 0.068094 solved for x by mpmath's own root finder, giving x = 10.000011191437178309. That rounds to exactly the published 10.0000112 at 7 dp, which is the precision the page prints, so 7 is the precision asserted. Note this is NOT the 10.00001131 that appears as the input on the GAMMA.DIST page: the two pages form a round trip, but Microsoft rounded the probability to six decimals (0.068094) before feeding it back, and inverting a rounded probability necessarily lands slightly off the original x. The corpus asserts the value that the published INPUT actually produces, and tests the exact round trip separately below. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=ROUND(GAMMA.INV(GAMMA.DIST(10.00001131,9,2,TRUE),9,2),6) The documented inverse relationship, without a rounded probability in the middle 10.000011 10.000011
Provenance

Excel documents the pair as exact inverses: "If p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x." Feeding the FULL-PRECISION cumulative probability back in (rather than Microsoft's 6-decimal 0.068094) must therefore return the original 10.00001131. Derived independently with mpmath: solving P(9, x/2) = 0.068094003869787331102 gives x = 10.00001131 to twenty digits. Asserted at 6 dp because Microsoft's own page warns the inverse is iterative -- "precision of GAMMA.INV depends on precision of GAMMA.DIST" and "GAMMA.INV uses an iterative search technique" -- so the last couple of digits are an implementation's convergence tolerance, not a fact about the function. This case is the one that actually tests the inverse property; the doc-example case above tests the published figure. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(0,9,2) A probability of exactly 0, the lower end of the permitted range 0 0
Provenance

Excel excludes only probability < 0 and probability > 1 ("If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value"), so 0 is IN range. The gamma distribution's support starts at 0 and its CDF is 0 there, so the inverse at probability 0 is 0. Included because a naive iterative solver can fail to converge at the boundary and return the #N/A the page describes for non-convergence. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GAMMA.INV(-0.1,9,2) A probability below 0 #VALUE! #NUM!
Provenance

Excel documents: "If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value." EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Mismatch
=GAMMA.INV(2,9,2) A probability above 1 #VALUE! #NUM!
Provenance

Excel documents: "If probability < 0 or probability > 1, GAMMA.INV returns the #NUM! error value." Asserted separately from the negative case because they are guards on opposite ends of the same range. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Mismatch
=GAMMA.INV(0.5,0,2) An alpha of zero #VALUE! #NUM!
Provenance

Excel documents: "If alpha <= 0 or if beta <= 0, GAMMA.INV returns the #NUM! error value." EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Mismatch
=GAMMA.INV("abc",9,2) A non-numeric probability #VALUE! #VALUE!
Provenance

Excel documents: "If any argument is text, GAMMA.INV returns the #VALUE! error value." Set up from Microsoft's own worked-example table: A2 = 0.068094 (the probability), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.

Matched

Docs & syntax