Error Function Calculator

Error function erf(x)0.5205
erfc(x) (complementary)0.4795
Normal CDF Phi(x)0.6915
How this was calculated
  1. erf(0.5) = 0.5205 — the integral of the Gaussian bell from 0 to 0.5, scaled so the whole area from -infinity to +infinity is 2.
  2. The complementary error function erfc(0.5) = 1 - erf(0.5) = 0.4795: the tail area that remains.
  3. Read as a normal probability: the standard normal CDF at 0.5 is Phi = 0.5 x (1 + erf(x / sqrt(2))) = 0.6915, the form in which erf appears in statistics tables.
  4. Between 0.5 and 2 the function does most of its climbing; by x = 2 it has already reached 0.9953 of its limiting value of 1.
  5. erf has no closed form in elementary functions — values come from series or rational approximations such as Abramowitz and Stegun 7.1.26, accurate here to about seven decimal places.

The error function calculator computes erf(x), defined as (2/sqrt(pi)) times the integral from 0 to x of e^(-t^2) dt. It also returns erfc(x) = 1 - erf(x), the complementary error function used for tail probabilities and diffusion solutions. The function is an odd function, meaning erf(-x) = -erf(x), while erfc is not odd. Values saturate quickly: erf(0) = 0, erf(0.5) = 0.5205, erf(1) = 0.8427, erf(1.5) = 0.9661, erf(2) = 0.9953, and erf tends to 1 as x grows. The standard normal CDF, Phi(x) = 0.5 x (1 + erf(x/sqrt(2))), means every normal table is the error function in disguise.

No elementary closed form exists for erf, so numerical evaluation uses series or rational approximations. The accepted standard is Abramowitz and Stegun 7.1.26, which gives 1.5e-7 accuracy. This page shows the formula, step-by-step workings, worked examples, and sources so you can verify every result the calculator produces.

Worked examples

erf of one half

Primary result: 0.5205 — the classic sqrt(pi) neighbourhood value, 0.5205. (0.5)

Error function erf(x)0.5205
erfc(x) (complementary)0.4795
Normal CDF Phi(x)0.6915

erf of 1

Primary result: 0.8427 — erf(1) = 0.8427 — the one-sigma neighbourhood. (1)

Error function erf(x)0.8427
erfc(x) (complementary)0.1573
Normal CDF Phi(x)0.8413

erf of 1.5

Primary result: 0.9661 — approaching saturation at 0.9661. (1.5)

Error function erf(x)0.9661
erfc(x) (complementary)0.0339
Normal CDF Phi(x)0.9332

What the error function is

The error function, written erf(x), is defined as (2/sqrt(pi)) times the integral from 0 to x of e^(-t^2) dt. That integrand, e^(-t^2), is the bell-shaped curve behind the normal distribution, and the integral accumulates the area under it from zero up to x. The factor of 2/sqrt(pi) normalizes the result so that erf(0) = 0 and erf tends to 1 as x grows. An error function calculator evaluates this integral numerically, because no elementary closed form exists — there is no combination of polynomials, exponentials, logarithms, or trigonometric functions whose derivative gives e^(-t^2).

Despite having no elementary antiderivative, erf is well behaved and easy to picture. It is an odd function, meaning erf(-x) = -erf(x), so the curve passes through the origin and mirrors itself across it. On the positive side it rises steeply at first and then levels off, saturating quickly toward 1. A few values make the shape concrete: erf(0.5) = 0.5205, erf(1) = 0.8427, erf(1.5) = 0.9661, and erf(2) = 0.9953. By the time x reaches 2, the function has already captured over 99% of its limiting value, and it spends the rest of the real line creeping toward 1.

Because of this saturation shape and its odd symmetry, erf is a natural tool for describing cumulative spread in diffusion problems and for converting tail areas into manageable numbers. The complementary error function, erfc(x) = 1 - erf(x), measures what erf leaves behind: the area in the far tail. Note that erfc is not an odd function — it decays from 2 toward 0 as x moves from negative to positive infinity. Where erf captures the bulk of the bell curve, erfc captures the remainder, which is why it appears in diffusion solutions and high-threshold probability calculations.

The connection to statistics is direct. The standard normal CDF is Phi(x) = 0.5 times (1 + erf(x/sqrt(2))), so every normal table is the error function in disguise. The scaling by sqrt(2) accounts for the difference between the variance in the standard normal and the exponent in the error function's integrand. Numerical evaluation of erf relies on series expansions or rational approximations rather than symbolic integration. One widely cited formula, Abramowitz and Stegun 7.1.26, achieves 1.5e-7 accuracy, which is sufficient for most engineering and scientific work.

Key takeaway: erf(x) is the normalized integral of e^(-t^2) from 0 to x. It is odd, saturates toward 1 by x = 2, and underlies the standard normal CDF through Phi(x) = 0.5(1 + erf(x/sqrt(2))).

erf, erfc and the normal distribution

The error function is defined as erf(x) = (2/sqrt(pi)) times the integral from 0 to x of e^(-t^2) dt. It starts at erf(0) = 0 and tends to 1 as x grows, but it saturates quickly: erf(0.5) = 0.5205, erf(1) = 0.8427, erf(1.5) = 0.9661, and erf(2) = 0.9953. Because no elementary closed form exists, numerical evaluation relies on series or rational approximations. Abramowitz and Stegun 7.1.26 gives 1.5e-7 accuracy, which is more than enough for most applications. An error function calculator uses these same approximations behind the scenes.

Two companion functions follow directly from erf. The complementary error function is erfc(x) = 1 - erf(x), which captures the tail probability that erf leaves behind. Because erf tends to 1 at large x, erfc becomes the more practical quantity for tail probabilities and diffusion solutions, where the remaining mass matters more than the accumulated mass. The other bridge connects erf to the normal distribution. The standard normal CDF is Phi(x) = 0.5 times (1 + erf(x/sqrt(2))), which means every normal table is the error function in disguise.

One useful property is symmetry. erf is an odd function, meaning erf(-x) = -erf(x). The same is not true for erfc, which is neither odd nor even. This asymmetry matters when working with negative inputs or when converting between erf and normal distribution values.

The familiar 68-95-99.7 rule for the normal distribution maps directly onto erf values. One standard deviation corresponds to erf(1/sqrt(2)) = 0.6827, two standard deviations correspond to erf(2/sqrt(2)) = 0.9545, and three standard deviations correspond to erf(3/sqrt(2)) = 0.9973. These numbers come straight from the Phi(x) formula above, with x set to 1, 2, and 3. The same curve that describes diffusion and heat transfer also generates the bell curve probabilities that statisticians use every day.

Where erf appears

The error function shows up wherever Gaussian processes appear, and that turns out to be a remarkably wide range of fields. Because the normal distribution underlies so much of applied mathematics, an error function calculator is useful far beyond the narrow problem its name suggests. The relationship is explicit: the standard normal CDF is Phi(x) = 0.5 times (1 + erf(x divided by the square root of 2)), which means every normal table is the error function in disguise. The same mathematical object that describes statistical tails also drives heat flow, particle diffusion, and bit-error rates in communications systems.

In heat conduction and diffusion problems, the complementary error function erfc(x) = 1 - erf(x) is the form that appears most often. When a hot surface is suddenly brought into contact with a cooler material, the temperature at a given depth evolves as a function involving erfc. The same structure governs how a dye spreads through water or how dopant atoms penetrate a silicon wafer during semiconductor manufacturing. In each case, erfc captures the tail of the Gaussian integral, representing the fraction of particles or thermal energy that has not yet reached a particular point. Because erf tends to 1 as x grows, erfc tends to 0, making it a natural measure of how much of a diffusing quantity remains outside a growing region.

In digital communications, the error function determines how often a received bit is misread. The Q-function, which gives the probability that a Gaussian noise sample exceeds a threshold, is directly related to erfc: Q(x) equals 0.5 times erfc(x divided by the square root of 2). For a concrete example, a receiver distinguishing between two voltage levels separated by a normalized distance of 2 faces a bit-error rate governed by Q(1), which equals 0.5 times erfc(1 divided by the square root of 2). Using the known value erf(1) = 0.8427, erfc(1) = 0.1573, and the error probability works out to roughly 0.0787, or about one error in thirteen bits. Engineers use this calculation to determine the signal-to-noise ratio needed for reliable transmission.

In statistics, the connection to the normal distribution is immediate. Since Phi(x) = 0.5 times (1 + erf(x divided by the square root of 2)), any hypothesis test or confidence interval that references the normal CDF is implicitly using the error function. A z-score of 1.5 corresponds to Phi(1.5) = 0.5 times (1 + erf(1.5 divided by the square root of 2)). The function saturates quickly, as the known values confirm: erf(0.5) = 0.5205, erf(1) = 0.8427, erf(1.5) = 0.9661, and erf(2) = 0.9953. By the time the argument reaches 2, the CDF is above 0.977, and the remaining tail probability is under 2.3 percent. This rapid saturation is what makes the normal distribution so concentrated around its mean and why erfc, which tracks the shrinking tail, is often more convenient to work with than erf itself in these applications.

How it is computed

No elementary closed form exists for the error function, so every error function calculator must rely on numerical methods to produce results. The definition is erf(x) = (2/sqrt(pi)) times the integral from 0 to x of e^(-t^2) dt. At x = 0 the value is 0, and as x grows the function tends toward 1. Because it saturates quickly, the practical range of interest is fairly narrow: erf(0.5) = 0.5205, erf(1) = 0.8427, erf(1.5) = 0.9661, and erf(2) = 0.9953. The function is also odd, meaning erf(-x) = -erf(x), so negative inputs simply flip the sign.

Two approaches dominate numerical evaluation. The first is a power series expansion, which converges well for small to moderate arguments and is straightforward to implement to arbitrary precision. The second is a rational approximation, and the most widely cited comes from Abramowitz and Stegun formula 7.1.26. That approximation trades a small amount of absolute accuracy for speed: it is good to 1.5e-7, which is roughly seven decimal digits. For most scientific and engineering work that level is more than sufficient, and it avoids the cost of summing many series terms or calling a numerical integration routine.

The complementary error function, erfc(x) = 1 - erf(x), deserves attention because it is the form most people actually need for tail probabilities and diffusion solutions. Near x = 2 the direct value of erf is already 0.9953, so computing erfc as 1 minus that value leaves only 0.0047, and the useful digits live in the subtraction. Good implementations compute erfc directly rather than subtracting from 1, because the cancellation can otherwise eat into precision. Note also that erfc is not an odd function, unlike erf, so the symmetry shortcut does not carry over.

This connection to the normal distribution explains why rounding conventions exist. The standard normal CDF is Phi(x) = 0.5 times (1 + erf(x/sqrt(2))), which means every normal table is the error function in disguise. Printed tables have historically rounded to four decimal places because that matches the practical accuracy of graphically reading a bell curve and the limits of hand calculation. The underlying approximation is far more accurate than four decimals, but the rounding persists as a convention, not a constraint.

FAQs

What is the error function?

erf(x) is (2/sqrt(pi)) times the area under e^(-t^2) from 0 to x. It measures accumulated Gaussian probability and has no closed form in elementary functions.

What is erf(1)?

erf(1) = 0.8427. Two other landmarks: erf(0.5) = 0.5205 and erf(2) = 0.9953 — the function is already near its limit of 1 by x = 2.

What is the difference between erf and erfc?

erfc(x) = 1 - erf(x). erfc is preferred for tail questions because it keeps precision where erf rounds to 1.0000.

How is erf related to the normal CDF?

Phi(x) = 0.5(1 + erf(x/sqrt(2))). The famous 68-95-99.7 rule is just erf evaluated at 1/sqrt(2), sqrt(2) and 3/sqrt(2), doubled and scaled.

What is erf of a negative number?

erf is odd: erf(-x) = -erf(x). erfc is not symmetric: erfc(-x) = 2 - erfc(x).

Why is there no simple formula for erf?

The integral of e^(-t^2) cannot be expressed with elementary functions (Liouville's theorem); it is evaluated by series or rational approximations.

Sources

Related calculators

Gamma Function Calculator
The gamma function for any real input — the factorial extended to fractions and negatives — computed with the Lanczos approximation, with log-gamma alongside.
P-Value Calculator from Z-Score
Turn a z-score into a p-value for left-tailed, right-tailed and two-tailed tests, using the standard normal distribution.
Standard Deviation Calculator
Mean, sample and population standard deviation and variance for up to eight numbers — with the n versus n−1 difference explained.