Special Functions Calculator

Evaluate the gamma, log-gamma, beta and error functions with a documented Lanczos approximation.

100% FreeNo sign-upPrivate — runs in your browser
—

Function value

Value
—
Factorial connection
—
Method
—

Copied to clipboard

How to use this tool

1
Pick a function

Choose gamma, log-gamma, beta or the error function.

2
Enter x (and y for beta)

Beta needs both arguments; the others need only x.

3
Read the value

The headline value is shown to six decimals.

4
Check the connection

For whole-number gamma inputs, the factorial equivalent is shown.

Formula & worked example

Γ(z) by the Lanczos approximation; B(x, y) = Γ(x)Γ(y) / Γ(x + y); erf(x) by Abramowitz–Stegun 7.1.26.

Γ(5) = 24, Γ(½) = √π ≈ 1.77245, and B(2, 3) = 1/12.

Limitations — read this before you rely on it

Gamma and log-gamma are undefined at zero and negative integers. Very large inputs overflow to out-of-range rather than returning a misleading number; erf is an approximation, not an exact evaluation.

Frequently asked questions

It extends the factorial to non-integers: Γ(n) = (n − 1)! for whole numbers n, and it is defined for all other numbers except zero and negative integers.

√π, about 1.77245 — one of the most famous special values.

B(x, y) = Γ(x)Γ(y) / Γ(x + y). It appears in probability, especially the beta distribution.

The error function gives normal-distribution probabilities: the chance a normal variable falls within a range is an erf value.

Gamma and beta use the Lanczos approximation (near machine precision for ordinary inputs); erf uses Abramowitz–Stegun, accurate to about 1.5 × 10⁻⁷.