🧮
🧮 Math & statistics

Gamma, Beta & Error Function Calculator

Results update as you type.

Your numbers

Understanding the gamma, beta and error function calculator — concept and principle

The gamma function Γ(x) extends the factorial to non-integer numbers, the beta function B(x, y) is built from it, and the error function erf(x) measures areas under the bell curve. This calculator evaluates Γ(x), ln Γ(x), B(x, y), erf(x) and erfc(x) = 1 − erf(x). These special functions appear in probability and statistics (gamma, beta, chi-square and normal distributions), physics (diffusion, heat flow) and combinatorics.

Gamma of 4.5 as a factorial between 3! and 4!Γ(4.5) = 3.5 × 2.5 × 1.5 × 0.5 × √π = 6.5625 × 1.7725 = 11.6317, between Γ(4) = 6 and Γ(5) = 24.Γ fills in factorials between whole numbersΓ(4) = 3!= 6Γ(4.5)≈ 11.63Γ(5) = 4!= 24<<Γ(x) = (x − 1) · Γ(x − 1): step down to Γ(0.5)3.5×2.5×1.5×0.5×√π1.7725= 6.5625 × 1.7725Γ(4.5) = 11.6317284ln Γ = 2.4537 · B(4.5, 2) = 1 ÷ 24.75 = 0.0404
Γ(4.5) steps down by one until Γ(0.5) = √π, landing between 3! = 6 and 4! = 24.

How it is calculated

The principle

Integrating by parts gives Γ(x + 1) = x·Γ(x), the same recursion as n! = n·(n − 1)!, and Γ(1) = 1, so Γ reproduces the factorials and fills in the values between them smoothly. A key half-integer value is Γ(1/2) = √π, which comes from the Gaussian integral. The error function is the area under e⁻ᵗ² scaled so that erf(∞) = 1; it is directly linked to the normal distribution: P(|Z| ≤ z) = erf(z/√2) for a standard normal Z.

Worked example

  1. Default inputs: x = 4.5, y = 2.
  2. Gamma: Γ(4.5) = 3.5 × 2.5 × 1.5 × 0.5 × Γ(0.5) = 6.5625 × √π = 11.6317284.
  3. Log-gamma: ln 11.6317284 = 2.453736571.
  4. Beta: B(4.5, 2) = Γ(4.5)Γ(2) ÷ Γ(6.5). Since Γ(6.5) = 5.5 × 4.5 × Γ(4.5) and Γ(2) = 1, B = 1 ÷ 24.75 = 0.0404040404.
  5. Error function: erf(4.5) = 0.9999999998, and erfc(4.5) = 1.96616e-10.
How Γ(x) changes with xHow Γ changes with x010,00020,00030,00040,00050,0001.122.253.384.55.626.759Example: 11.6317284x
Each point is the calculator re-run with only “x” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
xΓ(x)
1.120.9417426998
2.251.133003096
3.382.902858374
4.511.6317284
5.6264.11928889
6.75453.0107661
940,320

How to read the result

For x > 0, Γ(x) has a minimum of about 0.8856 near x ≈ 1.4616 and grows faster than any exponential afterwards. erf(x) rises from 0 at x = 0 to about 0.8427 at x = 1 and 0.9953 at x = 2; above about 4 it is 1 to many decimal places, which is why erfc is reported separately.

Common mistakes

Keep in mind: The methods are accurate to about 15 digits for Γ and about 10⁻¹⁴ (relative) for erf and erfc in double precision. Very large arguments underflow to 0, and critical work should still be cross-checked with dedicated statistical software.

Frequently asked questions

What is 0.5 factorial?

(0.5)! = Γ(1.5) = √π/2 ≈ 0.8862.

Where is the beta function used?

It normalises the beta distribution, which models probabilities and proportions, and it appears in Bayesian statistics.

Is erf the same as the normal CDF?

They are related: Φ(z) = [1 + erf(z/√2)] ÷ 2.

Sources: NIST Digital Library of Mathematical Functions, Chapter 5 Gamma Function and Chapter 7 Error Functions (dlmf.nist.gov) · Lanczos, C. (1964), A precision approximation of the gamma function, SIAM Journal on Numerical Analysis, Ser. B, 1, 86–96 · Press, W. H., et al., Numerical Recipes, 3rd ed., §6.1 and §6.2

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →