Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

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

Error function erf(x)
0
The error function of x, a pure number between −1 and 1, accurate to about 1.5 × 10⁻⁷.

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.

  1. Enter x, any real number from −8 to 8. Negative inputs are fine and return the negative of erf(|x|).
  2. 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).
  3. 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.
  4. 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.

erf(x)=2/sqrt(pi) integral from 0 to x of exp(-t^2)dt

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.

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.

x0

Frequently asked questions.

How do I turn erf into a normal-distribution probability?
Divide your z-score by √2 before entering it. For z = 1.96, enter 1.3859; the page returns 0.9500001381, meaning about 95% of a normal population lies within 1.96 standard deviations of the mean. The one-sided cumulative probability is ½ × (1 + 0.95) = 0.975.
Why is it called the error function?
It grew out of the theory of measurement errors, where the normal curve was used to describe how errors scatter. erf gives the probability that an error falls inside a given bound. For example, erf(0.4769) = 0.5, the point that splits errors evenly; in standard-deviation units that is the 0.6745σ known in older texts as the probable error.
What is erfc, and where does it come up?
erfc(x) = 1 − erf(x), the area left in the tails. In diffusion, if a surface is held at a fixed concentration, the concentration at depth x after time t is the surface value times erfc(x ÷ 2√(Dt)), with D the diffusion coefficient. The same form describes heat soaking into a thick wall.
Can this page find the inverse error function?
Not directly; it only evaluates erf forward. You can still solve erf(x) = y by trial: adjust x until the result matches. For y = 0.5 that search lands at x ≈ 0.4769. Near 1 the curve is so flat that the approximation's tiny error moves x noticeably: for a target of 0.9999 the trial answer, about 2.751, is only good to roughly three decimal places.
Why does erf of a very small number look slightly off?
The approximation's error is a fixed absolute amount, up to 1.5 × 10⁻⁷, not a fixed percentage. At x = 0.000001 the page gives 0.0000011294 against a true 0.0000011284, about 0.1% high. For tiny x the series erf(x) ≈ 2x/√π is far more accurate.
Why does the page show exactly 1 for x = 6?
Because the true value differs from 1 by about 2.152 × 10⁻¹⁷, far below the ten decimal places shown. Even at x = 5 the gap is only 1.5375 × 10⁻¹², so every input from about 5 up to the limit of 8 displays as 1, and negative inputs of the same size as −1.

How this page was produced

Published by
Quanta Calculator
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
Coming soon