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: .

Any real number; the gamma function has poles at 0, −1, −2, …
My ToolboxYour inputs are saved in this browser only.

Result

Result
Γ(0.5) = 1.772453851
Related values
QuantityValue
Γ(0.5)1.772453851
0.5! = Γ(0.5 + 1)0.8862269255
ln |Γ(0.5)|0.5723649429
1 / Γ(0.5)0.5641895835
Sign of Γ(x)positive
Calculated with the Lanczos approximation (g = 7) and the reflection formula, about 15 significant digits internally; whole numbers up to 171 exactly as (x − 1)!.

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:

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.253.6256099082
0.51.7724538509
1.50.8862269255
2.51.3293403882
4.511.6317283966
524
−0.5−3.5449077018
−1.52.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

As of: · Editorial policy

Related tools