Documentation/Calc Functions/GAMMALN
Appearance
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Function name:
GAMMALN
Category:
Statistical Analysis
Summary:
Calculates the natural logarithm of a gamma function value.
For positive values of x, the gamma function grows rapidly as x increases. However, the natural logarithm of the gamma function grows much more slowly with x and can often be easier to work with.
Syntax:
GAMMALN(Number)
Returns:
Returns a real number, which is the natural logarithm of the gamma function for the number passed as argument.
Arguments:
Number is a real number, or a reference to a cell containing that number, for which the natural logarithm of the gamma function is to be calculated.
- If Number is non-numeric, then GAMMALN reports a #VALUE! error.
- If Number is less than or equal to 0, then GAMMALN reports an invalid argument error (Err:502).
Additional details:
- [math]\displaystyle{ \text{GAMMALN}(x)~=~\text{LN}(\text{GAMMA}(x)) }[/math].
- The following figure shows a plot of the GAMMALN function for numbers x in the range (0, 8].

- For more information about the natural logarithm of the gamma function, visit Wikipedia's Gamma function page.
Examples:
| Formula | Description | Returns |
|---|---|---|
| =GAMMALN(A1) where cell A1 contains the number 10. | Calculates the natural logarithm of the gamma function for an input value of 10. | 12.8018274800815 |
| =GAMMALN(2) | Calculates the natural logarithm of the gamma function for an input value of 2. | 0 |
| =GAMMALN(0.5) | Calculates the natural logarithm of the gamma function for an input value of 0.5. | 0.5723649429247 |
Related LibreOffice functions:
ODF standard:
Related (or similar) Excel functions:
GAMMALN