Skip to main content

GAMMA_INV

Returns the inverse of the gamma cumulative distribution: if p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x.

Syntax

expression.GAMMA_INV(arg1, arg2, arg3);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe probability associated with the gamma distribution, a number between 0 and 1, inclusive.
arg2RequiredApiRange | ApiName | numberThe alpha parameter of the distribution, a positive number.
arg3RequiredApiRange | ApiName | numberThe beta parameter of the distribution, a positive number. If this parameter is equal to 1, the function returns the standard gamma distribution.

Returns

number

Example

Return the inverse of the gamma cumulative distribution: if p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x in a spreadsheet.

// How to calculate the inverse of the gamma cumulative distribution in a spreadsheet.

// Use a function to get the inverse of the gamma cumulative distribution in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let ans = func.GAMMA_INV(0.4, 9, 2);
worksheet.GetRange("B2").SetValue(ans);