Error Function Calculator
Evaluate the error function erf(x) for any real x from -8 to 8, and use it for normal-distribution probabilities, diffusion profiles and erfc = 1 - erf.
Error Function Calculator
Background.
The bell curve has no tidy antiderivative. Integrate e^(−t²) from zero up to some point x and no combination of polynomials, exponentials or logarithms gives the answer, so the result was given a name of its own. Scaled by 2/√π so that it runs from −1 to 1, it is the error function, erf(x).
Its home ground is probability. A normal distribution's cumulative probability is Φ(z) = ½[1 + erf(z/√2)], and the chance of a value landing within k standard deviations of the mean is simply erf(k/√2). Enter 1/√2 (0.7071) and the page returns 0.6826894723, the familiar 68.27%; enter √2 and it returns 0.9544998742, the two-sigma 95.45%. The same function in its complementary form, erfc = 1 − erf, describes how heat or a dissolved substance spreads into a thick body from a surface held at a fixed level, so it turns up in heat-transfer and diffusion work as often as in statistics.
The curve is easy to picture. It is odd, so erf(−x) = −erf(x). It climbs through the origin with slope 2/√π ≈ 1.1284 and then flattens quickly toward ±1: by x = 2 it has reached 0.9953, by x = 3 0.99998, and from about 5 onward the page simply shows 1.
The value comes from Abramowitz and Stegun's formula 7.1.26, a five-term rational approximation whose error never exceeds 1.5 × 10⁻⁷. That is ample for probabilities and engineering, but the display carries ten decimal places, so treat everything from the seventh decimal place on as approximate. Inputs are real numbers from −8 to 8; the complex error function and the inverse erf are not computed.
What is error function calculator?
The error function is erf(x) = (2/√π) ∫₀ˣ e^(−t²) dt: the area under the curve e^(−t²) from 0 to x, scaled so that erf(x) approaches 1 as x grows without bound. It is an odd function with values between −1 and 1 and erf(0) = 0. Its complement is erfc(x) = 1 − erf(x). In probability terms, erf(x) is the chance that a normally distributed variable with mean 0 and variance ½ falls between −x and x.
How to use this calculator.
- Enter x, any real number from −8 to 8. Negative inputs are fine and return the negative of erf(|x|).
- For a normal-distribution question, convert first. The probability within k standard deviations of the mean is erf(k/√2), so enter k × 0.70711. For the cumulative probability Φ(z), enter z/√2 and then take ½ × (1 + result).
- For erfc(x), the form used in diffusion and heat-conduction solutions, subtract the result from 1. Beyond about x = 3 that subtraction keeps only a few correct digits, because erfc is tiny there.
- For |x| below about 0.001, the approximation's small fixed error becomes a large share of the answer; 2x/√π, about 1.12838 × x, is the more accurate figure there.
The formula.
The defining integral has no closed form, so the page uses approximation 7.1.26 from Abramowitz and Stegun's Handbook of Mathematical Functions. For x ≥ 0 it sets t = 1 ÷ (1 + 0.3275911x) and computes erf(x) ≈ 1 − (a₁t + a₂t² + a₃t³ + a₄t⁴ + a₅t⁵) × e^(−x²), with a₁ = 0.254829592, a₂ = −0.284496736, a₃ = 1.421413741, a₄ = −1.453152027 and a₅ = 1.061405429. Negative x is handled through the symmetry erf(−x) = −erf(x). The Gaussian factor e^(−x²) carries most of the shape and the polynomial in t corrects it. The published error bound, 1.5 × 10⁻⁷ for all x ≥ 0, is absolute, so it matters most where erf itself is small, close to the origin. The five coefficients add up to 0.999999999 rather than 1, which is why x = 0 is treated separately and returned as exactly 0.
A worked example.
The page's default input is x = 0, the centre of the curve. An integral from 0 to 0 encloses no area, so erf(0) is exactly 0. Pushed through formula 7.1.26 it would not quite be: there t = 1, the five coefficients add to 0.999999999, and 1 − 0.999999999 × e⁰ leaves a residue of 0.000000001. The page sets x = 0 aside and returns 0. A more revealing case is x = 1. Then t = 1 ÷ (1 + 0.3275911) = 0.7532440. The polynomial a₁t + a₂t² + a₃t³ + a₄t⁴ + a₅t⁵ comes to 0.4275839, and multiplying by e^(−1) = 0.3678794 gives 0.1572993. Subtracting from 1 leaves erf(1) = 0.8427006897, against a true value of 0.8427007929, an error of about 1.0 × 10⁻⁷ and inside the published bound. Read as a probability, a normal variable falls within √2 ≈ 1.414 standard deviations of its mean about 84.27% of the time.
Frequently asked questions.
How do I turn erf into a normal-distribution probability?
Why is it called the error function?
What is erfc, and where does it come up?
Can this page find the inverse error function?
Why does erf of a very small number look slightly off?
Why does the page show exactly 1 for x = 6?
References& sources.
- [1]OpenStax, Rice University. College Algebra 2e, 2021. Algebra and function chapters. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- erf(x)=2/sqrt(pi) integral from 0 to x of exp(-t^2)dt
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled