StatGardenREF. DESK
Calculators/Maths/Error function
Maths

Error function calculator

Computes the Gauss error function erf(x) and its complement erfc(x) for a given x.

Published 9 August 2026 · Updated 24 September 2026

What this calculator does

The error function erf(x) is the area under a bell curve between −x and x, rescaled so that it runs from 0 up to 1 as x goes from 0 to infinity. It has no closed form, which is why it gets a name and a symbol of its own rather than being written out each time.

It carries the awkward name for historical reasons, from its use in the theory of measurement errors, but it turns up far more widely than that suggests. Diffusion, heat conduction and any problem whose solution involves a spreading Gaussian profile end up expressed in terms of erf, and erfc, its complement, is what appears whenever the quantity of interest is the tail rather than the middle.

The formula

Formulaerf(x) = (2/√π) ∫₀ˣ e⁻ᵗ² dt = 2·Φ(x√2) − 1, where Φ is the standard normal CDF. erfc(x) = 1 − erf(x)

The error function is the integral of e to the power of minus t squared, from 0 to x, scaled by 2 over the square root of π. That integral has no elementary antiderivative, so it is evaluated through its relationship to the standard normal distribution: erf(x) equals 2·Φ(x√2) − 1, where Φ is the normal cumulative distribution function. The complement erfc(x) is simply 1 − erf(x), reported separately because it keeps its precision far better than a subtraction would in the far tail.

TermMeaning
erf(x)The error function, the scaled area under a Gaussian between −x and x. It runs from 0 at x = 0 towards 1 as x grows.
erfc(x)The complementary error function, 1 − erf(x), which is the remaining tail area.
ΦThe standard normal cumulative distribution function, which erf is a rescaling of.
Odd symmetryThe property erf(−x) = −erf(x), so a negative argument simply flips the sign.

The inputs explained

FieldWhat to enter
xThe upper limit of the integral. Any real number works, and a negative value gives the negative of the result at the matching positive value.

When to use it

Converting between erf and normal probabilities

Statistical tables give normal probabilities while physics and engineering texts give erf. Having both sides available makes it straightforward to move a result from one convention to the other without rederiving it.

Solving a diffusion or heat conduction problem

The standard solution for one-dimensional diffusion from a step change in concentration or temperature is written directly as an error function of position divided by the square root of time. Evaluating erf is the last step of getting a number out of it.

Estimating a tail probability

erfc is the tail, and it falls extremely fast. Reading it directly rather than subtracting erf from 1 keeps the significant figures intact for the small values that matter most in a tail.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How quickly does the error function approach 1?

The error function and its complement at a spread of values from 0 outwards.

erf and erfc across the useful range
xerf(x)erfc(x) = 1 − erf(x)
001.0000
0.50.5205000.479500
10.8427010.157299
1.50.9661050.033895
20.9953220.004678
30.9999780.00002211
erf starts at 0 and closes on 1 very fast: it is already past 0.84 at x = 1 and past 0.995 at x = 2. The complement is the clearer column once the values get small, falling from 1 to 0.00002211 by x = 3, a drop of more than four orders of magnitude across the table.

Questions

What is the relationship between erf and the normal distribution?

erf(x) equals 2·Φ(x√2) − 1, where Φ is the standard normal cumulative distribution. Read the other way, the probability that a standard normal value falls within z standard deviations of the mean is erf(z/√2). The familiar 68.27% figure for one standard deviation is erf(0.7071).

Why is it called the error function?

From its origins in the theory of observational errors, where the distribution of measurement error is taken to be Gaussian and this integral gives the probability that an error falls within some bound. The name stuck long after the function outgrew that one use.

What does erf give for a negative argument?

The negative of the value at the matching positive argument, since erf is an odd function. erf(−1) is −0.842701. erfc does not share that symmetry: it runs from 2 down to 0 as x goes from negative to positive infinity.

Why report erfc separately instead of just subtracting?

Because subtraction destroys precision when erf is close to 1. At x = 3, erf is 0.999978 and erfc is 0.00002211. Computing the second from the first would lose most of the significant digits, so it is calculated on its own terms.

For numerically integrating a function that has no closed form, see the trapezoidal rule calculator. For the gamma function, another named integral that appears throughout the same distributions, see the gamma function calculator.