Excel functions / Math
GAMMALN function
The natural logarithm of the gamma function. It stays small where GAMMA itself would overflow.
Syntax
=GAMMALN(x)
Arguments
x: A number greater than 0.
When to use it
GAMMALN gives the natural logarithm of GAMMA. It stays small where GAMMA would overflow, so ratios of huge factorials can be worked out with EXP of a difference.
Examples
GAMMALN of 4
A B C 1 x 2 4 1.7918 In C2:
=GAMMALN(A2)→ 1.7918200 choose 100, too large for FACT
A B C 1 n 2 200 9.05E+58 In C2:
=EXP(GAMMALN(A2+1)-2*GAMMALN(A2/2+1))→ 9.05E+58
Common mistakes
- Zero and negatives. GAMMALN needs a number greater than 0.
GAMMALN in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: GAMMALN
- Danish: GAMMALN
- Dutch: GAMMA.LN
- Finnish: GAMMALN
- French: LNGAMMA
- German: GAMMALN
- Hungarian: GAMMALN
- Italian: LN.GAMMA
- Norwegian: GAMMALN
- Polish: ROZKŁAD.LIN.GAMMA
- Portuguese (Brazil): LNGAMA
- Portuguese (Portugal): LNGAMA
- Russian: ГАММАНЛОГ
- Spanish: GAMMA.LN
- Swedish: GAMMALN
- Turkish: GAMALN
Also written as GAMMALN.PRECISE.