The Excel GAMMALN.PRECISE function returns the natural logarithm of the gamma function, ln(Γ(x)), using a more accurate algorithm than the legacy GAMMALN — the recommended choice in modern workbooks.
Syntax
| Argument | Description | |
|---|---|---|
x | Required | A positive number at which to evaluate ln(Γ(x)). Must be > 0. |
How to use it
GAMMALN.PRECISE returns exactly the same quantity as GAMMALN — the natural log of the gamma function — but Microsoft introduced it (Excel 2013) with a higher-precision algorithm for demanding numerical work:
Like GAMMALN, it is the workhorse behind log-likelihoods and large combinatorial sums, where you add logarithms instead of multiplying gigantic factorials. Use EXP to convert the result back to a gamma value.
Which to use: for new formulas prefer GAMMALN.PRECISE; reach for plain GAMMALN only when a workbook must open in Excel 2010 or earlier, where the dotted name doesn't exist.
Try it: interactive demo
Pick a GAMMALN.PRECISE example to see the formula and its result.
Practice workbook
Frequently asked questions
How is GAMMALN.PRECISE different from GAMMALN?
Which one should I use?
GAMMALN.PRECISE in new workbooks for its accuracy. Use plain GAMMALN only if the file must run in Excel 2010 or earlier, where the dotted name isn't available.How do I recover the gamma value?
=EXP(GAMMALN.PRECISE(x)) returns Γ(x). For x=4 it gives 6, since Γ(4) = 3! = 6.Does it accept zero or negative numbers?
#NUM!.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class