Quick Navigation
GAMMALN Function
Summary
The GAMMALN function computes the natural logarithm of the gamma function, Γ(x), providing essential functionality for statistical calculations, probability distributions, and advanced mathematical analysis in Excel.
Syntax
GAMMALN(x)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| x | Number |
Yes | The value at which to evaluate the gamma function's natural logarithm. Must be greater than zero. |
Using the GAMMALN Function
GAMMALN serves as a foundational mathematical function for advanced Excel analysis, particularly in statistics and engineering. It efficiently computes the logarithm of the gamma function, which extends the factorial concept to real numbers and forms the basis for many probability density functions.
Common GAMMALN Examples
Basic GAMMALN Calculation
=GAMMALN(4)
Returns approximately 1.7917595, which is ln(Γ(4)) = ln(6) since Γ(4) = 3! = 6.
Factorial Approximation
=EXP(GAMMALN(6))
Approximates 5! = 120. Returns approximately 120 since EXP(GAMMALN(n+1)) ≈ n!.
Statistical Application
=GAMMALN(B2)
Calculates ln(Γ(x)) where B2 contains shape parameter values for gamma distribution analysis.
Frequently Asked Questions
Common Errors and Solutions
#NUM! error
Cause: Input value x ≤ 0
Solution: Ensure x > 0. Gamma function is undefined for non-positive numbers.
#VALUE! error
Cause: Non-numeric input
Solution: Verify x contains a valid positive number, not text or blank cells.
Notes
- For integer n, EXP(GAMMALN(n+1)) produces the same result as FACT(n)
- GAMMALN is more numerically stable than computing ln(FACT(x)) directly
- Use GAMMALN.PRECISE for higher precision in Excel 2010+
- Essential for gamma, chi-squared, and exponential distribution calculations
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 365
Not available in: Excel 2003 and earlier
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+, Excel 2010+, Excel 2013+, Excel 2016+, Excel 2019+, Excel 365