Full precision — and a demonstration of why 1 − erf is not the complement.
erf, erfc and the inverse
To full double precision, not to 1.5×10⁻⁷.
erf(x) = (2/√π) ∫₀ˣ e⁻ᵗ² dt — an integral with no elementary antiderivative.
x = 1
erf(x) = 0.84270079295
erfc(x) = 0.15729920705
erf(x)
0.84270079295
the integral, normalised so erf(∞) = 1
erfc(x) = 1 − erf(x)
0.15729920705
computed directly, not by subtracting
1 − erf(x), computed naively
0.15729920705
still agrees at this size
erf⁻¹(x)
undefined
erf only returns values in (−1, 1)
At this size 1 − erf(x) = 0.15729920705 still agrees with erfc(x) = 0.15729920705. The two only diverge once erf gets close to 1, past about x = 3.
Read as a normal probability
Φ(x) — the normal CDF at x
0.841344746069
½(1 + erf(x/√2))
Equivalent z
1.414213562
x × √2 — the scale conversion
P(−z < Z < z), two-sided
0.84270079295
this is what erf(x) equals
P(Z > z), one tail
0.0786496035251
a different number — the one people substitute by mistake
Φ(z) = ½(1 + erf(z/√2)), so erf and the normal CDF carry the same information on different scales — the √2 is the whole conversion. Read this erf value as a probability and it says: a standard normal lies within ±1.4142136 standard deviations with probability 0.8427007929. That is the TWO-sided probability. The one-sided upper tail beyond that same z is 0.07864960353, which is a different number and the one people substitute by mistake.
Landmarks, for orientation
Reference values of the error function
x
erf(x)
What it is
0
0
the integral over an empty interval
0.4769362762
0.5
the halfway point — erf reaches ½ here, not at x = 1
1
0.8427007929
already past 0.84
2
0.995322265
within 0.005 of 1
3
0.9999779095
within 2.2e-5 of 1 — the curve has effectively finished
∞
1
the full Gaussian integral, which is exactly √π/2 before the normalisation
Middle range: this is where erf does almost all of its moving — from about 0.52 at x = 0.5 to 0.9999779 at x = 3. Neither the small-x series nor the large-x expansion is comfortable here, which is why the incomplete-gamma route is used throughout.
erf is an odd function: erf(−x) = −erf(x). So erf(−1) = −0.84270079295, and erf(0) = 0 exactly — the integral from 0 to 0.
erf only ever returns values strictly between −1 and 1, so erf⁻¹(1) does not exist. The inverse is defined on (−1, 1) and nowhere else.
erf(x) = (2/√π) ∫₀ˣ e^(−t²) dt. The 2/√π is there to make erf(∞) come out at exactly 1, since ∫₀^∞ e^(−t²) dt = √π/2. No elementary function differentiates to e^(−t²), so this integral cannot be evaluated in closed form — erf is the name given to the answer, not a shorthand for one.
Computed through the incomplete gamma function, which holds full double precision where the usual rational approximation stops at about 1.5×10⁻⁷.
What this tool shows
Full precision, and a demonstration of why the complementary function has to exist separately.
erf, erfc and erf⁻¹ to the last bit or two of a double
1 − erf(x) shown beside erfc(x), with the digits it loses
The normal CDF conversion, with one-sided and two-sided kept apart
Landmark values, including where erf actually reaches ½
Full double precision, not 1.5e−7 erfc computed directly The normal-distribution link Free, no signup
Free, no signup — accurate to the last bit or two.
Updated 6 September 2026 · Works in any browser, no installation
erf(x) is the Gaussian integral from 0 to x, normalised so that erf(∞) = 1. erf(1) = 0.84270079295 and erfc(1) = 0.15729920705. The integral has no elementary antiderivative, so erf is a new function rather than shorthand for one.
At a glance
Formula shown
erf(x) = (2/\u221a\u03c0) \u222b\u2080\u02e3 e^(\u2212t\u00b2) dt, and erfc(x) = 1 \u2212 erf(x). The normal CDF is \u03a6(z) = \u00bd(1 + erf(z/\u221a2)).
Scenario support
Any real x; the inverse needs a value strictly between \u22121 and 1.
Educational estimate
Planning support from the values you enter — not professional advice.
No elementary antiderivative — and that is a theorem
erf(x) = (2/√π) ∫₀ˣ e^(−t²) dt. The 2/√π is there to make erf(∞) come out at exactly 1, since ∫₀^∞ e^(−t²) dt = √π/2. No elementary function differentiates to e^(−t²), so this integral cannot be evaluated in closed form — erf is the name given to the answer, not a shorthand for one.
This is worth stating precisely because it sounds like an admission of defeat and is not. Liouville’s theorem proves that no combination of polynomials, exponentials, logarithms and trigonometric functions differentiates to e⁻ᵗ². Nobody is going to find one.
So erf is a genuinely new function, defined by its integral, exactly as sin and log are defined by their own properties rather than reduced to something simpler. Every value has to be computed numerically, and the interesting question becomes how well.
Why erfc has to be its own function
Computing erfc as 1 − erf(x) gives 1.53743684450 × 10^−12 against the true 1.53745979443 × 10^−12. erf(x) is so close to 1 here that the subtraction throws most of the precision away: about 4 correct significant figures survive out of the 16 a double carries, and the gap widens as x grows — by x = 6 there is nothing left at all, because erf(6) rounds to exactly 1 and the subtraction returns a flat zero where the true erfc is 2.15197 × 10^−17. This is why erfc exists as its own function rather than as a convenience name for 1 − erf.
The problem is catastrophic cancellation. erf(5) is 0.999999999998, and subtracting that from 1 leaves a result made mostly of the digits that were rounded away. The subtraction is exact; the input to it has already lost the information.
At this size 1 − erf(x) = 2.20904969986 × 10^−5 still agrees with erfc(x) = 2.20904969986 × 10^−5. The two only diverge once erf gets close to 1, past about x = 3.
So erfc is computed directly from its own series rather than by subtracting, which is why it stays meaningful out to erfc(5) = 1.53745979443 × 10^−12 and beyond. Any library that defines erfc as 1 − erf is unusable in exactly the regime where erfc is the quantity you wanted.
The normal-distribution link, and the √2
Φ(z) = ½(1 + erf(z/√2)), so erf and the normal CDF carry the same information on different scales — the √2 is the whole conversion. Read this erf value as a probability and it says: a standard normal lies within ±1.4142136 standard deviations with probability 0.8427007929. That is the TWO-sided probability. The one-sided upper tail beyond that same z is 0.07864960353, which is a different number and the one people substitute by mistake.
The two functions carry the same information on different scales. erf integrates e⁻ᵗ²; the normal density has e⁻ᵗ²⃗² instead, and that factor of 2 in the exponent becomes a √2 in the argument.
For x = 1, Φ(x) = 0.841344746069 while erf(x) = 0.84270079295 — different numbers describing the same distribution. The equivalent z is 1.414213562, and it is the conversion that gets dropped when a formula is copied between the two conventions.
One tail or two, and which one you asked for
erf(x) is the TWO-sided probability: the chance a standard normal lands within ±x√2 of the mean. For x = 1 that is 0.84270079295.
The single upper tail beyond the same point is 0.0786496035251 — a different number, and roughly half of what is left over. Substituting one for the other is the commonest error in applying either function, and it is the kind that produces a plausible answer.
The rule: if the question is “within” or “between ±”, it is two-sided and erf gives it directly. If it is “greater than” or “more extreme than” in one direction, it is one-sided and you want half of erfc.
The inverse, and the range it is defined on
Read the other way: erf⁻¹(0.5) = 0.4769362762 is the upper limit that makes the integral come to 0.5.
erf only ever returns values strictly between −1 and 1 — it approaches both without reaching them — so erf⁻¹ is defined on (−1, 1) and nowhere else. Asking for erf⁻¹(1) is asking for infinity.
erf only ever returns values strictly between −1 and 1, so erf⁻¹(2) does not exist. The inverse is defined on (−1, 1) and nowhere else.
Practically the inverse is how a confidence level becomes a bound: given the probability you want to capture, it returns how many standard units wide the interval has to be. That is the direction most applied questions run.
How this page computes it
The usual implementation is the Abramowitz & Stegun rational approximation, which is accurate to about 1.5×10⁻⁷. That is fine for a table and visibly wrong in the seventh decimal.
This page uses the relationship erf(x) = P(½, x²) with the regularised incomplete gamma function, computed by its series for small arguments and by a continued fraction for large ones. The result holds full double precision — about 10⁻¹⁶ relative — across the whole range.
Middle range: this is where erf does almost all of its moving — from about 0.52 at x = 0.5 to 0.9999779 at x = 3. Neither the small-x series nor the large-x expansion is comfortable here, which is why the incomplete-gamma route is used throughout.
erf is an odd function: erf(−x) = −erf(x). So erf(1.5) = 0.966105146475, and erf(0) = 0 exactly — the integral from 0 to 0.
Sources and methodology
The error function and its relationship to the incomplete gamma function are standard; the references below carry the canonical definitions.
Method. Every figure on this page comes from src/lib/error-function.ts over src/lib/algebra/special.ts. erf is computed as P(½, x²) through the regularised incomplete gamma function — series below the crossover, modified Lentz continued fraction above it — rather than through the A&S rational fit. erfc is computed from Q(½, x²) directly, never by subtracting erf from 1. That engine is verified on every change against 76 hand-written assertions, including agreement with published values to better than 1e-15 relative, and that erf(erf⁻¹(y)) returns y. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Gamma FunctionGamma, log-gamma, digamma and beta with the factorial shift stated every time, values reconstructed past the double overflow, and the poles explained through the reflection formula.
Hyperbolic FunctionsAll six hyperbolic functions and their inverses, built visibly from e^x and e^-x, with cosh squared minus sinh squared computed rather than asserted and every domain limit stated.
Bessel FunctionJ, Y, I and K plus the spherical pair, with the zeros that set drum modes and waveguide cutoffs, the recurrence and Wronskian checked, and the measured accuracy stated per family.
Standard DeviationSample and population standard deviation, plus variance, mean, median, quartiles, z-scores, outliers, and confidence intervals.
Binomial Coefficientn choose k exactly on big integers, by the multiplicative formula that never builds a number bigger than the answer — with Pascal's rule, the row it sits in, and permutations beside it.
ScientificTrigonometry, logarithms, powers, roots, and factorials with correct order of operations, memory registers, history, and keyboard entry.
The error function is the incomplete gamma function in disguise, and the Gamma Function Calculator covers the family it belongs to. For summarising a dataset rather than a distribution, the Standard Deviation Calculator is the tool.
Educational use disclaimer
This calculator evaluates the error function, its complement and its inverse in double precision. Values are accurate to roughly the last bit or two, verified against published references. It is a mathematical tool: the normal-distribution readings are exact statements about the standard normal distribution and are not statistical advice about any particular dataset.
Published the error function page: erf, erfc and the inverse computed through the incomplete gamma function to full double precision, not the 1.5e-7 rational approximation.
Demonstrates why erfc is its own function by showing 1 − erf(x) losing its significant figures beside the true value.
Gives the normal-distribution conversion with the one-sided and two-sided probabilities separated, since substituting one for the other is the commonest error in using either.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.