Calculate Log Gamma Function

Online calculator and formulas for computing the logarithmic Gamma function ln Γ(x)

Log Gamma Function Calculator

Logarithmic Gamma Function

The ln Γ(x) or Log-Gamma function is the natural logarithm of the Gamma function and is numerically more stable for large arguments.

Real number > 0 for the Log-Gamma function
Result
ln Γ(x):

Log Gamma Function Curve

Mouse pointer on the graph shows the values.
The Log-Gamma function grows slower than the Gamma function and is numerically more stable.

Formulas for the Log Gamma Function

Definition
\[\ln \Gamma(x) = \log(\Gamma(x))\]

Natural logarithm of the Gamma function

Stirling Approximation
\[\ln \Gamma(x) \approx x \ln x - x + \frac{1}{2} \ln(2\pi x)\]

For large x

Recurrence Formula
\[\ln \Gamma(x+1) = \ln \Gamma(x) + \ln x\]

Logarithmic recurrence

Integral Representation
\[\ln \Gamma(x) = \int_0^{\infty} \left[e^{-t} t^{x-1}\right] \frac{dt}{t}\]

For Re(x) > 0

Complete Stirling Formula
\[\ln \Gamma(z) = \left(z - \frac{1}{2}\right) \ln z - z + \frac{1}{2} \ln(2\pi) + \sum_{n=1}^{\infty} \frac{B_{2n}}{2n(2n-1)z^{2n-1}}\]

With Bernoulli numbers B₂ₙ

Properties

Special Values
ln Γ(1) = 0 ln Γ(2) = 0 ln Γ(1/2) = ln√π
Numerical Stability
More stable than Γ(x)

Avoids overflow for large x

Convexity
\[\ln \Gamma(x) \text{ is convex}\]

for x > 0

Applications

Statistics, probability theory, numerical mathematics and computer science.

Detailed Description of the Log Gamma Function

Mathematical Definition

The Log-Gamma function is the natural logarithm of the Eulerian Gamma function. It is particularly important in numerical mathematics because it is numerically more stable than the Gamma function itself for large arguments.

Definition: ln Γ(x) = log(Γ(x))
Using the Calculator

Enter the argument x and click 'Calculate'. The function is defined for x > 0 and is particularly useful for large values.

Numerical Advantages

The Log-Gamma function was developed to avoid overflow problems that occur when directly computing the Gamma function for large arguments. It is frequently used in statistics and probability theory.

Properties and Applications

Mathematical Applications
  • Numerical computation of factorials
  • Statistical distributions (Beta, Gamma)
  • Bayesian statistics and machine learning
  • Asymptotic expansions
Physical Applications
  • Statistical mechanics (entropy calculations)
  • Quantum mechanics (wave functions)
  • Thermodynamics (partition functions)
  • Nuclear physics (decay processes)
Special Properties
  • Convexity: ln Γ(x) is convex for x > 0
  • Monotonicity: Strictly increasing for x > x₀ ≈ 1.46
  • Asymptotics: Stirling approximation for large x
  • Stability: Numerically robust for large arguments
Interesting Facts
  • ln Γ(x) has a global minimum at x ≈ 1.46163
  • The Stirling formula provides excellent approximations
  • Important for computing binomial coefficients
  • Central to modern statistical software

Calculation Examples

Example 1

ln Γ(1) = 0

Since Γ(1) = 1 and ln(1) = 0

Example 2

ln Γ(1/2) = ln(√π) ≈ 0.5724

Half-integer value

Example 3

ln Γ(10) ≈ 12.80

Numerically stable for large arguments

Stirling Formula and Asymptotics

Asymptotic Expansion

For large x, the Stirling formula provides an excellent approximation:

\[\ln \Gamma(x) \approx \left(x - \frac{1}{2}\right) \ln x - x + \frac{1}{2} \ln(2\pi) + O\left(\frac{1}{x}\right)\]

This formula is particularly useful in statistical inference and for computing probabilities of large samples.

Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?


More special functions

AiryDerivative AiryBessel-IBessel-IeBessel-JBessel-JeBessel-KBessel-KeBessel-YBessel-YeSpherical-Bessel-J Spherical-Bessel-YHankelBetaIncomplete BetaIncomplete Inverse BetaBinomial CoefficientBinomial Coefficient LogarithmErfErfcErfiErfciFibonacciFibonacci TabelleGammaInverse GammaLog GammaDigammaTrigammaLogitSigmoidDerivative SigmoidSoftsignDerivative SoftsignSoftmaxStruveStruve tableModified StruveModified Struve tableRiemann Zeta