How this calculator works
Gamma extends factorials beyond positive integers: Gamma(n) = (n - 1)! for positive integer n. This evaluator uses a Lanczos approximation and the reflection identity for the left half-plane. The defining integral converges for positive real part; analytic continuation defines other regular points. Results close to poles can be very sensitive to input rounding.
Formula
Gamma(z) = integral from 0 to infinity of t^(z-1) exp(-t) dt for Re(z) > 0. Gamma(z)Gamma(1-z) = pi/sin(pi z).
Worked example
Gamma(5) = 4! = 24. Gamma(1/2) = sqrt(pi), approximately 1.77245385091. Applying the recurrence gives Gamma(-1/2) = -2sqrt(pi).
Advertisement
Frequently asked questions
Why is Gamma(5) not 120?
The factorial identity is Gamma(n + 1) = n!, so Gamma(5) equals 4!.
Which negative inputs are invalid?
Zero and negative integers are poles. Negative non-integers can have finite values.
Are complex results exact?
No. They are floating-point approximations. Inputs near a pole and extreme components can lose accuracy.