Error Function Calculator

Enter a value of x to get erf(x), erfc(x) = 1 − erf(x), and the equivalent standard normal probability and CDF Φ(x).

Quick Facts

Definition
erf(x) = (2/√π) ∫₀ˣ e⁻ᵗ² dt
Twice the area under the standard Gaussian curve from 0 to x, normalized so erf(∞) = 1.
Complementary function
erfc(x) = 1 − erf(x)
Gives the remaining tail area from x to infinity.
Symmetry & bounds
erf(−x) = −erf(x)
erf(0) = 0 and erf(x) stays between −1 and 1 for every real x.
Link to the normal distribution
Φ(z) = ½[1 + erf(z/√2)]
Connects erf to the standard normal CDF used throughout statistics.

Your Results

Calculated
erf(x)
-
Error function value
erfc(x)
-
Complementary: 1 − erf(x)
P(|Z| ≤ |x|)
-
Normal-distribution probability = erf(|x|/√2)
Φ(x)
-
Standard normal CDF = ½[1 + erf(x/√2)]

Ready

Enter a value for x, then press Calculate.

Formula and Method for the Error Function

The error function erf(x) is defined as erf(x) = (2/√π) ∫₀ˣ e−t² dt — twice the area under the standard Gaussian curve e−t² between 0 and x, scaled so the total area from 0 to infinity equals 1. It has no elementary closed-form antiderivative, so every calculator — including this one — evaluates it numerically. This tool also reports the complementary error function erfc(x) = 1 − erf(x) and the equivalent standard normal distribution values, since erf is the mathematical backbone of the normal (Gaussian) probability distribution.

How the calculation works

Given x, the calculator numerically integrates e−t² from 0 to x using composite Simpson's rule with 2,000 subintervals, then multiplies by 2/√π to get erf(x). Because erf is an odd function, erf(−x) = −erf(x), so negative inputs are handled by integrating |x| and flipping the sign. From erf(x) the calculator derives erfc(x) = 1 − erf(x), the probability that a standard normal variable falls within |x| standard deviations of the mean, P(|Z| ≤ |x|) = erf(|x|/√2), and the standard normal cumulative distribution function Φ(x) = ½[1 + erf(x/√2)].

Common mistakes

  • Confusing erf(x) with Φ(x): the standard normal CDF is not erf(x) directly — it's Φ(x) = ½[1 + erf(x/√2)], which rescales the input by 1/√2.
  • Mixing up erf and erfc: erfc(x) = 1 − erf(x), not −erf(x); erfc(x) is always between 0 and 2.
  • Expecting values outside [−1, 1]: erf(x) is bounded between −1 and 1 for every real x — if a computed value falls outside that range, double-check the inputs.

Real-world applications

  • Statistics: converting z-scores to probabilities and building confidence intervals for normally distributed data.
  • Heat conduction and diffusion: the temperature profile in a semi-infinite solid after a sudden surface temperature change follows T(x,t) = Ts + (T₀ − Ts)·erf(x / (2√(αt))).
  • Semiconductor fabrication: dopant concentration from a constant-source diffusion follows C(x,t) = Cs·erfc(x / (2√(Dt))), from Fick's second law.
  • Digital communications: bit-error-rate for signals in Gaussian noise is often written as ½·erfc(√(Eb/N₀)).

Frequently Asked Questions

What is the error function erf(x)?
The error function is defined as erf(x) = (2/√π) ∫₀ˣ e⁻ᵗ² dt. It measures the area under the bell-shaped Gaussian curve e⁻ᵗ² between 0 and x, scaled so that erf(x) approaches 1 as x → ∞ and −1 as x → −∞.
What is the difference between erf(x) and erfc(x)?
erfc(x), the complementary error function, is simply 1 − erf(x). While erf(x) gives the area under the Gaussian curve from 0 to x, erfc(x) gives the remaining tail area from x to infinity, which shows up often in diffusion and heat-transfer equations.
How does the error function relate to the normal distribution?
For a standard normal variable Z, the cumulative distribution function is Φ(z) = ½[1 + erf(z/√2)], and the probability that Z falls within a standard deviations of the mean is P(|Z| ≤ a) = erf(a/√2). This is why erf appears throughout statistics and confidence-interval calculations.
Can erf(x) be solved exactly, or is it always approximated?
erf(x) has no closed-form elementary antiderivative, so it is always evaluated numerically — from tables, a polynomial approximation, or, as this calculator does, numerical integration of the Gaussian curve using Simpson's rule, which is accurate to many decimal places for typical inputs.