Saved

Press the star next to a tool's name to save it.

All my tools

Special Functions Calculator

Use this special functions calculator to find the gamma function, beta function, error function and Bessel functions of the first kind and modified kind.

Restored your last values ·

Choose a function. For gamma and the error function, enter x. For the beta function, enter x and y, both above 0. For a Bessel function, enter x and the order n. Results are worked out with accurate series and approximations.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose what you want, fill in the boxes, then press Calculate.

See full result

A special functions calculator finds the values of the gamma function, the beta function, the error function and the Bessel function. Choose the function, enter the numbers and press the button. The definitions follow the Wikipedia pages on the gamma, beta and error functions and the Bessel function, and the work is done in your browser. It serves as a gamma function calculator, an error function calculator and a Bessel function calculator.

How to use the special functions calculator

  1. Choose the function: gamma, beta, error function or Bessel.
  2. Enter x, and also y for the beta function or the order n for a Bessel function.
  3. Press Calculate.

The gamma function

The gamma function extends the factorial to numbers that are not whole. The Wikipedia page gives Γ(n) equal to (n − 1)! for positive whole numbers, so Γ(5) is 24, and the rule Γ(z + 1) = zΓ(z). It also states Γ(1/2) is the square root of pi, which is 1.7724539. The calculator gives these exactly, and finds other values by a Lanczos approximation, so Γ(1.5) is 0.886227 and Γ(10.5) is about 1,133,278. For negative numbers that are not whole, a reflection formula is used: Γ(−1.5) is 2.36327. The function has no value at 0 or at negative whole numbers.

The beta function

The beta function is the integral of t to the power x − 1 times (1 − t) to the power y − 1 from 0 to 1. The page shows that it equals Γ(x)Γ(y) divided by Γ(x + y). For whole numbers, it is (m − 1)!(n − 1)! divided by (m + n − 1)!, so B(2, 3) is 1! × 2! divided by 4!, which is 1/12 or 0.0833333. Also B(1, x) is 1/x, and the function is symmetric in x and y. The calculator shows the three gamma values it uses.

The error function

The error function is defined as 2 over the square root of pi, times the integral of e to the power −t² from 0 to z. It is zero at 0, is odd, and approaches 1 as z grows, as the page notes. It is closely linked to the normal distribution: it gives the probability that a normal variable lies within a certain distance of the mean. The calculator gives erf(1) as 0.842701, erf(2) as 0.995322 and erf(3) as 0.999978, together with erfc, the complement 1 − erf, which stays accurate for large x: erfc(3) is 2.20905e-5.

The Bessel function

Bessel functions solve the equation x²y″ + xy′ + (x² − α²)y = 0, where α is the order. The page gives the first kind as an infinite series: J_α(x) is the sum over m of (−1)ᵐ divided by m! times Γ(m + α + 1), times (x/2) to the power 2m + α. The calculator uses this series. J₀(1) is 0.765198 and J₁(1) is 0.440051. The first zero of J₀ is at about 2.4048, where the value is close to 0. For negative whole orders, J₋ₙ equals (−1)ⁿ Jₙ. The modified function Iₙ has the same series without the alternating sign, and it grows instead of oscillating.

Where these functions are used

The gamma and beta functions appear in probability, for the gamma, beta and chi-squared distributions, and in combinatorics. The error function appears in statistics and in the solution of heat flow problems. Bessel functions describe waves in circular drums, vibrations of cylindrical shafts, heat in cylinders and the radiation of antennas, anywhere a problem has circular symmetry.

Accuracy and limits

The calculator is accurate to at least 12 digits for the gamma, beta and error functions inside its ranges. Gamma is limited to numbers up to 171, since Γ(172) exceeds the largest number a computer can store. Bessel values are limited to x up to 20, because the series loses accuracy for large x. For a negative x, the order must be a whole number, because a non-integer power of a negative number is not real.

A worked example with the gamma function

To find 4.5 factorial in the extended sense, use Γ(5.5). By the recursion Γ(z + 1) = zΓ(z), Γ(5.5) equals 4.5 × 3.5 × 2.5 × 1.5 × 0.5 × Γ(0.5), and since Γ(0.5) is the square root of pi, this is 52.3428. The calculator gives the same value for x = 5.5. This kind of calculation lets statisticians work out the normalizing constants of distributions without needing whole-number arguments.

The special functions are closely related. The beta function is built from gamma values, as shown above. The error function is a gamma function in disguise: the integral that defines it is a special case of the incomplete gamma function. Bessel functions of half-integer order reduce to sines and cosines, so that J with order 1/2 equals the square root of 2 over pi x, times sin x. At x = 1 this is 0.671397, which you can check in the calculator by entering order 0.5.

Typing the numbers

Use a decimal point for fractions and a minus sign for negatives. Leave boxes that your chosen function does not use empty.

Common mistakes

  • Taking Γ(n) as n!. It is (n − 1)!.
  • Using the gamma function at 0 or a negative whole number. It has no value there.
  • Using negative arguments in the beta function. It needs positive x and y.
  • Mixing up erf and erfc. They add up to 1.
  • Confusing the Bessel order with the argument. The order is n, the argument is x.

What next

Use this often? Add Special Func to your Home screen.

Frequently asked questions

What is a special functions calculator?

A tool that evaluates functions such as gamma, beta, the error function and Bessel functions, which have no simple formula.

What is the gamma function?

An extension of the factorial: Γ(n) = (n − 1)! for whole numbers, and Γ(1/2) = √π ≈ 1.77245.

What is the beta function?

B(x, y) = Γ(x)Γ(y)/Γ(x + y). For example B(2, 3) = 1/12.

What is the error function?

erf(z) = (2/√π) ∫₀ᶻ e^(−t²) dt. It is 0 at 0 and approaches 1. erf(1) ≈ 0.842701.

What are Bessel functions?

Solutions of Bessel's equation, used for problems with circular symmetry. J₀(1) ≈ 0.765198.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools