GAMMADIST Function (Gnumeric)
Calculate Gnumeric gamma probabilities and densities with required cumulative mode, scale parameters and shape-dependent behavior at zero.
Verification status: Selected formulas were recalculated with Gnumeric 1.12.57 using ssconvert and retained workbook results. Gnumeric 1.12.62 was source-checked only; this does not establish every edge case. How formula examples are checked
Quick answer: =GAMMADIST(2,1,2,1) gives approximately 0.632120558829.
Availability and version history
- Introduced: Gnumeric 0.25, explicitly named in its release notes.
- Supported in: Gnumeric 1.12.62, confirmed by its function registration. No retirement is established.
- Scope: Desktop Gnumeric with the Statistics Functions plugin. Tables use English comma-separated formulas.
- Checked: October 14, 2026. Tables were recalculated in 1.12.57 and finite reference values independently checked. Version 1.12.62 was source-checked, not executed.
What the function calculates
GAMMADIST evaluates a gamma model with positive shape α and scale β. Its mean is αβ and variance αβ². At positive x, the density is x^(α−1)×exp(−x/β)/(Γ(α)×β^α). Cumulative mode integrates that density from zero to x. A density is a curve height with reciprocal measurement units, not the probability of one exact continuous outcome. Official function reference.
Syntax and arguments
=GAMMADIST(x,alpha,beta,cumulative)
| Argument | Meaning |
|---|---|
| x | Nonnegative value. |
| alpha | Positive shape parameter. |
| beta | Positive scale parameter, not rate. |
| cumulative | Required: TRUE for left-tail CDF, FALSE for density. |
All arguments shown are required. The version-pinned help and evaluator establish the Gnumeric contract.
Reproducible reference cases
The table records the tested release’s outputs, with finite mathematical references rounded to twelve decimal places. Keep full precision when using a result in a later calculation.
| Formula | Result in Gnumeric 1.12.57, approximately |
|---|---|
=GAMMADIST(2,1,2,1) |
0.632120558829 |
=GAMMADIST(2,1,2,0) |
0.183939720586 |
=GAMMADIST(3,2,2,1) |
0.442174599629 |
=GAMMADIST(3,2,2,0) |
0.167347620111 |
=GAMMADIST(0,2,2,0) |
0 |
=GAMMADIST(0,1,2,0) |
0.5 |
=GAMMADIST(4,3,1,1) |
0.761896694446 |
=GAMMADIST(4,3,1,0) |
0.14652511111 |
Practical worksheet
For a duration model with shape 2 and scale 2, put a threshold of 3 in A2 and the parameters in B2:C2. =GAMMADIST(A2,B2,C2,TRUE()) gives approximately 0.442174599629. Using FALSE() instead gives density 0.167347620111. Those values must not be used interchangeably. The scale has the duration’s units; if a model supplies rate λ, use β=1/λ.
Advanced examples and independent checks
For shape 2 and scale 3, the probability between 3 and 9 is =GAMMADIST(9,2,3,TRUE())-GAMMADIST(3,2,3,TRUE()), approximately 0.536610608871. An interval probability comes from CDF differences, not from subtracting two density heights.
Changing scale from β to cβ multiplies measurement-scale quantiles by c. At corresponding thresholds cx, the CDF is unchanged; density at cx is divided by c. For shape 1 the gamma model reduces to an exponential model with rate 1/β, giving a useful independent check on the first two table rows.
Input boundaries and common mistakes
All four arguments are required. Unlike some other implementations, an omitted cumulative selector is not a supported default here. At x=0, density depends on shape: the tests give 0 for shape 2 and 0.5 for shape 1 with scale 2. Shape 0.5 at zero yields #NUM!, reflecting an infinite mathematical density that cannot be represented as an ordinary worksheet number. Negative x and nonpositive shape or scale are invalid. Nonfinite numerical results are converted to worksheet errors.
These additional outcomes were observed in the same native recalculation. F5 was genuinely empty; it is not an omitted argument. Missing inputs still need deliberate validation, even if they are converted to a numeric zero.
| Formula | Observed in 1.12.57 |
|---|---|
=GAMMADIST(0,0.5,2,FALSE()) |
#NUM! |
=GAMMADIST(-1,2,2,TRUE()) |
#NUM! |
=GAMMADIST(1,0,2,TRUE()) |
#NUM! |
=GAMMADIST(1,2,2) |
#N/A |
=GAMMADIST(F5,2,2,TRUE()) |
0 |
The worked calculations do not certify every locale, imported text value, extreme parameter or later binary version. Shared numerical helpers can change even when a function’s wrapper remains the same.
Sources and verification
The reference and boundary tables use recorded 1.12.57 command-line recalculation. Further model examples were independently calculated from their stated inputs; they are not additional native test claims.