Understanding the error function calculator — concept and principle
This calculator evaluates the error function erf(x) and its complement erfc(x), or finds x for a given erf value. It also links the result to the normal distribution: the standard normal probability Φ(x√2) and the share of a normal population within ±x√2 standard deviations. Use it in statistics, heat conduction, diffusion and signal-processing problems.
How it is calculated
erf(x) = (2/√π) ∫₀ˣ e^(−t²) dt
erfc(x) = 1 − erf(x)
Normal link: Φ(z) = ½(1 + erf(z/√2)); share within ±z σ = erf(z/√2)
- Values come from the Maclaurin series for |x| < 2 and a continued fraction for erfc beyond, so tiny tails keep full precision.
- The inverse option solves erf(x) = y by Newton's method.
The principle
e^(−t²) is the bell curve; erf measures the area under it from 0 to x, scaled so that the total from −∞ to ∞ maps to −1 to 1. It is an odd function: erf(−x) = −erf(x). Because the normal density is a stretched version of e^(−t²), every normal probability can be written with erf, which is why it appears wherever randomness or diffusion spreads things out, from measurement errors (hence the name) to heat flowing into a cold block.
Worked example
Default inputs: erf and erfc for x = 0.5.
- erf(0.5) = 0.5204998778; erfc(0.5) = 1 − 0.5205 = 0.4795001222.
- Equivalent z-score = 0.5 × √2 = 0.7071067812.
- Standard normal Φ(0.7071) = ½(1 + 0.5205) = 0.7602499389.
- Share of a normal distribution within ±0.7071 σ = 52.05 %.
| x (first option) | Answer |
|---|---|
| 0.125 | 0.1403162048 |
| 0.25 | 0.2763263902 |
| 0.375 | 0.4041169094 |
| 0.5 | 0.5204998778 |
| 0.625 | 0.6232408822 |
| 0.75 | 0.7111556337 |
| 1 | 0.8427007929 |
How to read the result
erf(x) approaches 1 quickly: erf(1) ≈ 0.843, erf(2) ≈ 0.995. erfc gives the small tail that is left, important for rare events. To get the familiar normal shares, use z/√2: erf(1/√2) ≈ 0.6827, the 68 % of the empirical rule.
Common mistakes
- Treating erf(z) as the normal probability within ±z σ; it is erf(z/√2).
- Computing erfc(x) as 1 − erf(x) for large x in low precision, which loses the tiny tail.
- Expecting an inverse for values outside −1 to 1.
- Confusing erf with the normal CDF Φ.
Frequently asked questions
What is the error function used for?
Normal-distribution probabilities, diffusion and heat-conduction solutions, and signal processing.
What is erf(1)?
About 0.8427.
How is erf related to the normal distribution?
Φ(z) = ½(1 + erf(z/√2)).
Sources: NIST Digital Library of Mathematical Functions (DLMF), Chapter 7 Error Functions