ERF

The error function maps a real value to the normalized integral of a Gaussian from zero to that value. It is widely used in probability, diffusion, and heat-transfer models.

\mathrm{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt

This wrapper evaluates \mathrm{erf}(x) for a scalar real argument using SciPy.

Excel Usage

=ERF(x)
  • x (float, required): Real argument for the error function (dimensionless).

Returns (float): Error function value at the input.

Example 1: Error function at zero

Inputs:

x
0

Excel formula:

=ERF(0)

Expected output:

0

Example 2: Error function at one

Inputs:

x
1

Excel formula:

=ERF(1)

Expected output:

0.842701

Example 3: Error function at negative half

Inputs:

x
-0.5

Excel formula:

=ERF(-0.5)

Expected output:

-0.5205

Example 4: Error function at two

Inputs:

x
2

Excel formula:

=ERF(2)

Expected output:

0.995322

Python Code

from scipy.special import erf as scipy_erf

def erf(x):
    """
    Evaluate the Gauss error function for a real input.

    See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erf.html

    This example function is provided as-is without any representation of accuracy.

    Args:
        x (float): Real argument for the error function (dimensionless).

    Returns:
        float: Error function value at the input.
    """
    try:
        x = float(x)
        return float(scipy_erf(x))
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Real argument for the error function (dimensionless).