GAMMALN Function in Excel: Natural Log of the Gamma Function

GAMMALN Function in Excel: Natural Log of the Gamma Function 1
⏱ 1 min readUpdated 5 October 2026

StatisticsLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. GAMMALN in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions

GAMMALN returns ln(GAMMA(x)); useful when GAMMA itself would overflow for large x.

Advertisement

Syntax

=GAMMALN(x)
Argument What it means
x Positive number

Examples

Example 1

=ROUND(GAMMALN(A2),4)

Result: 3.1781. See the worked example table below for more cases.

GAMMALN in practice

Where you will use it

  • Large factorial maths without overflow
  • Likelihood calculations
  • Combinatorics

Worked example

xFormulaResult
5=ROUND(GAMMALN(A2),4)3.1781
100=ROUND(GAMMALN(A3),4)359.1342
0.5=ROUND(GAMMALN(A4),4)0.5724

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
x of 0 or less#NUM!
Forgetting EXPEXP(GAMMALN(x)) = GAMMA(x)

GAMMALN.PRECISE · GAMMA

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

Advertisement
✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong