What is the Inverse Error Function Calculator?
This tool computes the inverse error function, \(\operatorname{erf}^{-1}(y)\), and the inverse complementary error function, \(\operatorname{erfc}^{-1}(y)\), for a given dimensionless argument \(y\). The error function \(\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^{2}}\, dt\) arises throughout probability, diffusion, and signal-processing problems. Its inverse answers the reverse question: given a value \(y\), what \(x\) produces \(\operatorname{erf}(x) = y\)?
How to use it
Enter a value \(y\) and choose how many display digits you want. For \(\operatorname{erf}^{-1}\) the valid domain is \(-1 < y < 1\); for \(\operatorname{erfc}^{-1}\) the valid domain is \(0 < y < 2\). The two outputs are linked by the identity \(\operatorname{erfc}^{-1}(y) = \operatorname{erf}^{-1}(1 - y)\), because \(\operatorname{erfc}(x) = 1 - \operatorname{erf}(x)\). At the boundaries the results diverge to \(\pm\infty\) (for example \(\operatorname{erf}^{-1}(1) = +\infty\)).
The formula explained
There is no elementary closed form for \(\operatorname{erf}^{-1}\). We start from the Giles (2010) rational approximation seed, accurate to about 1e-7, then refine with Newton's method: $$x_{n+1} = x_{n} - \frac{\operatorname{erf}(x_{n}) - y}{\frac{2}{\sqrt{\pi}} e^{-x_{n}^{2}}}.$$ The derivative of erf is \(\frac{2}{\sqrt{\pi}} e^{-x^{2}}\). Iterating until the residual \(|\operatorname{erf}(x_{n}) - y|\) is below 1e-15 yields full double precision.
Worked example
For \(y = 0.3\): \(\operatorname{erf}^{-1}(0.3) \approx 0.2724627\) because \(\operatorname{erf}(0.2724627) \approx 0.3\). Then $$\operatorname{erfc}^{-1}(0.3) = \operatorname{erf}^{-1}(1 - 0.3) = \operatorname{erf}^{-1}(0.7) \approx 0.7328691,$$ so that \(\operatorname{erfc}(0.7328691) = 1 - 0.7 = 0.3\).
FAQ
Why are \(\operatorname{erf}^{-1}\) and \(\operatorname{erfc}^{-1}\) equal at \(y = 0.5\)? Because \(\operatorname{erfc}^{-1}(0.5) = \operatorname{erf}^{-1}(1 - 0.5) = \operatorname{erf}^{-1}(0.5)\); the arguments coincide only at \(y = 0.5\).
What happens at the domain edges? \(\operatorname{erf}^{-1}(\pm 1) = \pm\infty\) and \(\operatorname{erfc}^{-1}(0) = +\infty\), \(\operatorname{erfc}^{-1}(2) = -\infty\). Out-of-domain inputs return an error.
Is \(\operatorname{erf}^{-1}\) odd? Yes: \(\operatorname{erf}^{-1}(-y) = -\operatorname{erf}^{-1}(y)\).