GAMMA Function in LibreOffice Calc — Tested Examples
An explanation of LibreOffice Calc GAMMA, including tested formulas, examples, expected results and common mistakes.
Tested: Examples checked in LibreOffice Calc 25.2.3.2. What this means
Returns the value of the Gamma function. For positive integers n, GAMMA(n) equals (n−1)!, so GAMMA(5)=24 and GAMMA(4)=6.
Syntax and arguments
=GAMMA(Number)
LibreOffice Calc formulas generally separate arguments with semicolons (;).
| Argument | Explanation |
|---|---|
Number |
The value for which the Gamma function is to be calculated. |
Worked examples
Example 1: Compute the gamma function at a positive integer
=GAMMA(5)
Expected result: 24. This value was returned in the LibreOffice Calc 25.2 test.
Example 2: Gamma(4) is 3 factorial
=GAMMA(4)
Expected result: 6. This value was returned in the LibreOffice Calc 25.2 test.
How to interpret the result
For positive integers n, GAMMA(n) equals (n−1)!, so GAMMA(5)=24 and GAMMA(4)=6.
Mistakes and troubleshooting
- Check inputs and assumptions: The function is undefined at zero and negative integers.
- Check argument order and format: Strings go in quotes, cell references do not. Functions that return arrays may require special entry.
- Verify your own data: Reproduce the example first. If your formula returns an error, inspect the referenced cells and individual argument values.
Related functions
Tested version and primary reference
2 example(s) on this page passed real calculations in LibreOffice Calc 25.2.3.2. This is not a claim about every possible input or other spreadsheet applications.