Gamma function calculator
This gamma function calculator gives Γ(x) for any real x except 0, −1, −2, … – including fractions such as Γ(0.5) = √π and huge values written as powers of ten.
Example: x 0.5 → Result: Γ(0.5) = 1.772453851. Source: NIST Digital Library of Mathematical Functions §5.2: Euler’s integral Γ(z) = ∫₀^∞ e^(−t)·t^(z−1) dt (read 14.10.2026). Updated: .
How it is calculated
The gamma function extends the factorial to real numbers: Γ(n) = (n − 1)! for whole numbers n, and Γ(x + 1) = x·Γ(x) for every x. For example Γ(5) = 4! = 24 and Γ(0.5) = √π ≈ 1.7724538509.
Definition and rules
For x > 0 the gamma function is Euler’s integral Γ(x) = ∫₀^∞ e^(−t)·t^(x−1) dt. Two rules from the NIST Digital Library of Mathematical Functions carry it everywhere else:
- Recurrence: Γ(x + 1) = x·Γ(x), so Γ(1.5) = 0.5·Γ(0.5) ≈ 0.8862269255.
- Reflection: Γ(x)·Γ(1 − x) = π / sin(πx), which gives the values for negative x, e.g. Γ(−0.5) = −2√π ≈ −3.5449077018.
At 0, −1, −2, … the function has poles and no value. Between the poles on the negative axis its sign alternates.
Values of the gamma function
| x | Γ(x) |
|---|---|
| 0.25 | 3.6256099082 |
| 0.5 | 1.7724538509 |
| 1.5 | 0.8862269255 |
| 2.5 | 1.3293403882 |
| 4.5 | 11.6317283966 |
| 5 | 24 |
| −0.5 | −3.5449077018 |
| −1.5 | 2.3632718012 |
The NIST reference value Γ(1/3) = 2.67893 85347… is matched as well. Above x ≈ 171.6 the result no longer fits a normal floating-point number; the tool then shows it from ln Γ(x), for example Γ(200) = 199! ≈ 3.943289 × 10³⁷². For whole numbers the factorial calculator gives every digit, and the factor 1/√(2π) of the normal distribution follows from Γ(1/2) = √π.
Accuracy
The Lanczos approximation is accurate to about 15 significant digits; the tool shows ten. Very large values come from ln Γ(x), whose rounding error grows with its size: from about x = 3500 the tool therefore shows nine digits, at x = 1,000,000 seven. Very close to a pole the result becomes huge, and the rounding of the input alone costs relative accuracy there.
Frequently asked questions
What is the gamma function of 0.5?
Γ(0.5) = √π ≈ 1.7724538509.
How is the gamma function related to the factorial?
Γ(n) = (n − 1)! for whole numbers, so Γ(5) = 24. Conversely x! = Γ(x + 1) for any real x that is not a negative integer.
Can the gamma function be negative?
Yes, for some negative x: Γ(−0.5) ≈ −3.5449077018, while Γ(−1.5) ≈ 2.3632718012 is positive again.
Why does Γ(0) have no value?
The gamma function has poles at 0 and every negative integer; near them the values grow without limit.
What is 0.5 factorial?
0.5! = Γ(1.5) = √π / 2 ≈ 0.8862269255.
Sources and legal basis
- NIST Digital Library of Mathematical Functions §5.2: Euler’s integral Γ(z) = ∫₀^∞ e^(−t)·t^(z−1) dt (read 14.10.2026)
- NIST DLMF §5.4: Γ(1) = 1, n! = Γ(n+1), Γ(1/2) = √π = 1.77245 38509…, Γ(1/3) = 2.67893 85347… (read 14.10.2026)
- NIST DLMF §5.5: recurrence Γ(z+1) = z·Γ(z) and reflection Γ(z)·Γ(1−z) = π/sin(πz) (read 14.10.2026)
- Wikipedia, Lanczos approximation: coefficients for g = 7, n = 9 used for the numerical value (read 14.10.2026)
As of: · Editorial policy
Related tools
- Factorial calculatorFactorial calculator: n! exactly with every digit up to n = 5,000, plus digit count, trailing zeros and Stirling’s approximation – and big powers like 2^100.
- Combination CalculatorCombination calculator for nCr and nPr, with or without repetition: exact results even for huge numbers, the formula, working and all four cases side by side.
- Normal Distribution CalculatorNormal distribution calculator: probability of at most, at least or between two values, z-score and percentile (inverse), with steps and the 68-95-99.7 rule.
- Beta Distribution CalculatorBeta distribution calculator: enter α, β and x to get the density, the CDF P(X ≤ x), mean, median, mode, variance, skewness and any quantile.
- Poisson Distribution CalculatorPoisson distribution calculator: probability of exactly, at most, at least or between k events at average rate λ, with the steps and a table of values.
- Weibull distribution calculatorWeibull distribution calculator: enter shape k, scale λ and x to get the CDF, PDF, reliability, hazard rate, mean, median, standard deviation and B10 life.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Clock Angle CalculatorClock angle calculator: the angle between the hour and minute hand for any time, with the formula |30h − 5.5m|, the smaller and larger angle and every step.
- Drag force calculatorDrag force calculator: enter drag coefficient, area, speed and altitude to get the air resistance in newtons and the power needed, with the drag equation.