Mathwords logoMathwords

Erfc (Complementary Error Function) — Definition, Formula & Examples

Erfc (the complementary error function) is the function defined as erfc(x) = 1 − erf(x), where erf is the error function. It gives the probability that a normally distributed variable falls more than x standard deviations from the mean (after appropriate scaling).

The complementary error function is defined by the integral erfc(x)=2πxet2dt\operatorname{erfc}(x) = \frac{2}{\sqrt{\pi}} \int_x^{\infty} e^{-t^2}\, dt for all real xx. It satisfies erfc(x)=1erf(x)\operatorname{erfc}(x) = 1 - \operatorname{erf}(x) and maps R(0,2)\mathbb{R} \to (0, 2), with erfc(0)=1\operatorname{erfc}(0) = 1, limxerfc(x)=0\lim_{x \to \infty} \operatorname{erfc}(x) = 0, and limxerfc(x)=2\lim_{x \to -\infty} \operatorname{erfc}(x) = 2.

Key Formula

erfc(x)=2πxet2dt=1erf(x)\operatorname{erfc}(x) = \frac{2}{\sqrt{\pi}} \int_x^{\infty} e^{-t^2}\, dt = 1 - \operatorname{erf}(x)
Where:
  • xx = Real-valued input (the lower limit of integration)
  • tt = Dummy variable of integration
  • erf(x)\operatorname{erf}(x) = The error function, defined as (2/√π) times the integral of e^{−t²} from 0 to x

How It Works

The complementary error function is used whenever you need the tail probability of a Gaussian integral. Rather than computing erf(x) and subtracting from 1 — which loses numerical precision for large x — you use erfc(x) directly. To connect it to the standard normal distribution: the probability that a standard normal variable ZZ exceeds zz is P(Z>z)=12erfc ⁣(z2)P(Z > z) = \tfrac{1}{2}\operatorname{erfc}\!\left(\tfrac{z}{\sqrt{2}}\right). Most scientific computing libraries provide erfc as a built-in function.

Worked Example

Problem: Find the probability that a standard normal random variable Z exceeds 1, using erfc.
Step 1: Use the relationship between the upper-tail probability and erfc:
P(Z>z)=12erfc ⁣(z2)P(Z > z) = \tfrac{1}{2}\operatorname{erfc}\!\left(\frac{z}{\sqrt{2}}\right)
Step 2: Substitute z = 1:
P(Z>1)=12erfc ⁣(12)=12erfc(0.7071)P(Z > 1) = \tfrac{1}{2}\operatorname{erfc}\!\left(\frac{1}{\sqrt{2}}\right) = \tfrac{1}{2}\operatorname{erfc}(0.7071)
Step 3: Look up or compute erfc(0.7071) ≈ 0.3173:
P(Z>1)12(0.3173)=0.1587P(Z > 1) \approx \tfrac{1}{2}(0.3173) = 0.1587
Answer: P(Z > 1) ≈ 0.1587, which matches the familiar 15.87% upper-tail probability from a z-table.

Why It Matters

Erfc appears throughout signal processing, heat transfer (diffusion equations), and statistics whenever Gaussian tail probabilities are needed. In communications engineering, bit error rates for many modulation schemes are expressed directly in terms of erfc. Understanding this function also strengthens your ability to work with Gaussian integrals in advanced calculus and probability courses.

Common Mistakes

Mistake: Confusing erfc(x) with 1 − Φ(x), where Φ is the standard normal CDF.
Correction: The two are related but not identical. The correct conversion is 1 − Φ(z) = (1/2) erfc(z/√2). Dropping the scaling factor z/√2 or the factor of 1/2 gives wrong answers.