Error Function Calculator
Use this ERF calculator to easily calculate the Gauss error function erf(x) for any real-valued x and the inverse error function erf-1(y), y ∈ [-1, 1]. It can also output their complementary functions erfc(x) and erfc-1(y). High-precision calculation up to 25 significant digits. A table of x values and corresponding values of erf and erfc is included as reference.
Using the error function calculator
The erf calculator can be used to compute the error function of any number on the real line. The output also contains the complementary error function for the same number as well as a function plot showing where erf(x) lies relative to other possible function values. erf(x) returns a result between zero and one for any real value of x.
In inverse error function mode the output contains the inverse of erf and its complement. The input y needs to be a real number between minus one and one (y ∈ [-1, 1]).
What is an error function?
In mathematics and statistics, the error function a.k.a. the Gauss error function or just erf, is a complex function of a complex variable defined as [1,2]:
Aside from applied mathematics where it is used to solve differential equations and in physics in solutions of the heat equation in the case where boundary conditions are given by the Heaviside step function, it also sees use in statistics where the inverse error function is used in the calculation of critical values, p-values, confidence intervals which are all related to statistical hypothesis testing and estimation.
The function plot illustrates its sigmoid shape:
Since e-t2 is an even function and erf(-x) = -erf(x), the error function is an odd function.
Error function formula
To calculate erf(x) one performs an integration from minus infinity to x of the equation e-t2. The formula can therefore be expressed by the following integral equation:
The equation has no closed-form solution and various approximations are in use. In this calculator we use a polynomial approximation with a maximal error of 1.2 × 107 for any real argument as per reference .
Complementary error function
The equation for the complementary error function is given by:
Its solution is a simple subtraction from one. It sees application in physics problems.
Inverse error function
The inverse error function, denoted erf-1(y) takes as input the result of y = erf(x), and produces the corresponding x value. While a true inverse function would be multivalued and thus would not have a unique solution, for values of y between −1 and 1 there is a unique real number solution to the equation:
The solution can easily be found by various root-finding methods.
Error function table
An erf table contains tabulated values of real numbers and their corresponding error function values.
Table of commonly used numbers:
The inverse error function can be used to compute the quantile function (inverse distribution function) of a normal distribution. For example, if we want to find the cut-off for the top decile of a normal distribution with mean μ = 0 and standard deviation σ = 3, we would use the equation:
F-1(0.9) = μ + σ · √2 · erf-1(2 · p - 1)
Knowing that the top decile represents the top 10 percent, we need to find the cut-off at 90%, or 0.9. Replacing the known values we get:
F-1(0.9) = 0 + 3 · √2 · erf-1(2 · 0.9 - 1) = 3 · √2 · erf-1(0.8)
Using a square root calculator we find √2 equals 1.4142 and using this calculator we find erf-1(0.8) = 0.9062. Replacing once again we find the solution:
F-1(0.9) = 3 · 1.4142 · 0.9062 = 3.8446 which is accurate to four significant digits, same as the accuracy of all numbers used in obtaining the result.
 Glaisher, J.W.L. (1871) "On a class of definite integrals" London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 4 42(277): 294–302. DOI 10.1080/14786447108640568
 Glaisher, J.W.L. (1871) "On a class of definite integrals. Part II." London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 4 42(279): 421–426. DOI 10.1080/14786447108640600
 "Numerical Recipes in Fortran 77: The Art of Scientific Computing" (1992), page 214, Cambridge University Press ISBN 0-521-43064-X
Cite this calculator & page
If you'd like to cite this online calculator resource and information as provided on the page, you can use the following citation:
Georgiev G.Z., "Error Function Calculator", [online] Available at: https://www.gigacalculator.com/calculators/error-function-calculator.php URL [Accessed Date: 07 Jul, 2022].