Error Function Calculator
Enter x to get erf(x) and erfc(x), or enter y between -1 and 1 to get the inverse functions. Choose how many decimals you want to see, up to 25; at most 15 significant digits are printed.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
Using the error function calculator
Pick one of the two modes with the Calculate choice.
- Error function: type any real number x. The calculator prints erf(x) and the complementary erfc(x).
- Inverse error function: type a number y from -1 to 1. It prints erf⁻¹(y), the x for which erf(x) = y, and erfc⁻¹(y).
The Precision field sets how many decimals are printed, from 2 to 25 (14 by default). Whole numbers are printed without decimals, and a value that needs only one or two decimals is shown with exactly two.
Everything is computed in ordinary double-precision arithmetic. erf and erfc come from rational Chebyshev approximations whose relative error is about 1e-16, and erfc is evaluated directly instead of as 1 − erf, so it keeps its leading digits far out in the tail. A computer stores only about 15 to 16 significant digits, so the calculator never prints more than 15, even when the Precision box asks for 25 decimals; the last printed digit can still be one unit off. Use an arbitrary-precision library if you need more.
What is the error function?
The error function, also called the Gauss error function, measures how much of a bell-shaped curve lies within a symmetric window around its centre. It first appeared in the theory of measurement errors, hence the name. It is S-shaped, odd (erf(−x) = −erf(x)), equals 0 at x = 0 and tends to 1 as x grows. By x = 3 it is within 0.00003 of 1.
Its most common use is as a rescaled normal distribution. Take a normally distributed variable centred on 0 with spread σ (its standard deviation): the chance that it lands between −a and a is erf(a ÷ (σ√2)). Because of that link the error function underlies p-values, confidence intervals and the normal distribution calculator, and it shows up in diffusion and heat-conduction problems as well.
Error function formula
erf(x) = (2 ÷ √π) × ∫ from 0 to x of e^(−t²) dtThe area under the Gaussian curve from 0 to x, scaled so that the total area to infinity is 1.
The integral has no closed form, but it can be written as an alternating power series that converges for every x:
erf(x) = (2 ÷ √π) × ( x − x³ ÷ 3 + x⁵ ÷ 10 − x⁷ ÷ 42 + x⁹ ÷ 216 − … )The terms are (−1)ⁿ x^(2n+1) ÷ (n! (2n+1)).
Example with x = 0.5. The first five terms are 0.5, −0.041667, +0.003125, −0.000186 and +0.000009, which sum to 0.461281. Multiplying by 2 ÷ √π = 1.128379 gives 0.52050, in agreement with the calculator's 0.52049988.
Complementary error function
erfc(x) = 1 − erf(x) = (2 ÷ √π) × ∫ from x to ∞ of e^(−t²) dt
erfc is the area in the tail beyond x. It is the better quantity to use for large x, where erf(x) is almost exactly 1 and the information is in the tiny remainder. The link to the standard normal cumulative distribution is Φ(z) = ½ × erfc(−z ÷ √2) = ½ × (1 + erf(z ÷ √2)).
Inverse error function
The inverse error function undoes erf: if y = erf(x) then x = erf⁻¹(y). It is defined for −1 < y < 1 and grows without bound as y approaches ±1. There is no simple formula, so numerical root-finding is used: start from a rough guess and refine it with Newton or Halley steps until erf(x) matches y. The inverse complementary function satisfies erfc⁻¹(y) = erf⁻¹(1 − y) for y between 0 and 2.
In the calculator the second inverse value is shown for the entered y as erf⁻¹(1 − |y|), so erfc⁻¹(0.95) equals erf⁻¹(0.05). At the ends of the range the equation has no finite solution, and the calculator prints ∞ (or −∞) for erf⁻¹(1) and erf⁻¹(−1), and ∞ for erfc⁻¹(0).
Error function table
Values of erf and erfc to six decimals, computed from the exact function:
| x | erf(x) | erfc(x) |
|---|---|---|
| 0.10 | 0.112463 | 0.887537 |
| 0.25 | 0.276326 | 0.723674 |
| 0.50 | 0.520500 | 0.479500 |
| 0.75 | 0.711156 | 0.288844 |
| 1.00 | 0.842701 | 0.157299 |
| 1.25 | 0.922900 | 0.077100 |
| 1.50 | 0.966105 | 0.033895 |
| 2.00 | 0.995322 | 0.004678 |
| 2.50 | 0.999593 | 0.000407 |
| 3.00 | 0.999978 | 0.000022 |
Worked examples
From erf to a normal probability. What is the chance that a standard normal variable is below 1.5? Compute z ÷ √2 = 1.5 ÷ 1.41421 = 1.06066, look up erf(1.06066) = 0.866386, and apply Φ(z) = ½ (1 + erf(z ÷ √2)): Φ(1.5) = ½ × 1.866386 = 0.933193.
From erf⁻¹ to a quantile. The 97.5th percentile of the standard normal is z = √2 × erf⁻¹(2p − 1) with p = 0.975, so z = 1.41421 × erf⁻¹(0.95). Entering y = 0.95 gives erf⁻¹(0.95) ≈ 1.38590, hence z ≈ 1.41421 × 1.38590 = 1.95996, the familiar 1.96 behind 95% confidence intervals. Quantiles for other confidence levels are in the z-score calculator and the p-value calculator.
Accuracy and common mistakes
- Asking for more digits than exist. Setting the precision to 25 does not make the answer 25 digits correct. A double-precision number holds about 15 significant digits, so that is where the calculator stops printing.
- Mixing up erf and the normal CDF. erf(1) is 0.8427, but the probability of a standard normal below 1 is 0.8413. They differ by the √2 rescaling.
- Large x. erf(x) rounds to exactly 1 for x above about 5.9 in double precision, which is why erfc exists. erfc(6) is 2.15 × 10⁻¹⁷ and the calculator shows it as soon as the Precision box has room for 17 decimals; a value below 10⁻²⁵ would print as 0 whatever the accuracy.
- Inputs outside the domain. The inverse needs y between -1 and 1; anything else is rejected.
Frequently asked questions
What is erf(1)?
erf(1) is about 0.842701, and erfc(1) = 1 − erf(1) is about 0.157299. In probability terms, 84.27% of a normal distribution lies within √2 ≈ 1.414 standard deviations of its mean, counting both sides.
How are erf and the normal distribution related?
The standard normal cumulative distribution is Φ(z) = ½ (1 + erf(z ÷ √2)). Equivalently the probability of landing within z standard deviations of the mean is erf(z ÷ √2).
What is the difference between erf and erfc?
erfc(x) = 1 − erf(x). erf measures the central area up to x; erfc measures the remaining tail. Use erfc when x is large and erf is almost 1.
How many digits of erf(x) can I trust?
About 15 significant digits. The Precision box accepts up to 25 decimals, but a double-precision number cannot hold more than roughly 15 to 16 significant digits, so the calculator stops printing at 15. erf(0) comes out as exactly 0 and erfc(0) as exactly 1.
References
- Cody WJ (1969). Rational Chebyshev approximations for the error function. Mathematics of Computation 23(107), 631-637.
- Abramowitz M, Stegun IA (eds.). Handbook of Mathematical Functions, chapter 7 (Error function and Fresnel integrals). National Bureau of Standards, 1964.
- Glaisher JWL. On a class of definite integrals. Philosophical Magazine 1871;42:294-302.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Error Function Calculator. Reeliy. https://reeliy.com/calculators/error-function-calculator“Error Function Calculator.” Reeliy, 2026, https://reeliy.com/calculators/error-function-calculator.