Complementary Error Function Calculator
Calculate the complementary error function erfc for any x. Useful in statistics, normal distribution tails, and engineering reliability formulas.
Enter the Details
Result will appear here...
What this calculator does
The complementary error function, written erfc, is the leftover of the error function: everything erf does not capture. Where the error function measures the area under the bell curve up to a point x, erfc measures the tail beyond it. This computes that tail.
Enter a value of x and it returns erfc of x. It runs right here in the browser.
Using the calculator
- Enter the value of x.
- Press Calculate.
It returns the complementary error function of x. Reset clears the box.
What the complementary error function is
The definition is as simple as it sounds. The error function and its complement always add up to 1, so:
erfc of x = 1 − erf of x
Since erf measures the area under the bell curve out to x, subtracting it from the whole leaves the area in the tail, from x onward to infinity. At x equals 0, erf is 0, so erfc is the full 1. As x grows, erf climbs toward 1 and erfc shrinks toward 0, the tail thinning away to nothing. So erfc is the "how much is left out there" companion to erf's "how much have we gathered in".
Why it is a function in its own right
A fair question: if erfc is just 1 minus erf, why bother giving it its own name and its own calculator? Why not compute erf and subtract? The answer is precision, and it is a genuinely important point.
Far out in the tail, erf of x is extremely close to 1. Something like 0.9999999. If you tried to get erfc by working out erf and then doing 1 minus that, you would be subtracting two numbers that are almost equal, and a computer only carries so many digits. The leading digits cancel and you are left with only the last few, throwing away most of your accuracy. Push far enough and 1 minus erf simply rounds to 0, losing the tiny tail entirely. Computing erfc directly, without ever forming that subtraction, sidesteps the whole problem and keeps those small tail values accurate. That is exactly why erfc exists as its own function, and why it is worth reaching for whenever you need the tail.
How this tool computes it
Since the tail integral has no tidy closed-form answer, this tool uses a well-established numerical approximation, a formula fitted to the function that returns erfc directly. It is a compact expression built around the factor e to the minus x squared, and it is accurate enough for essentially any practical purpose: its fractional error is everywhere smaller than about 1.2 times ten to the minus 7, roughly seven correct digits across the whole range. For negative inputs it uses a neat symmetry, that erfc of minus x equals 2 minus erfc of x, so one formula covers both sides. You get the small tail values without the cancellation trap described above.
Worked examples
erfc of 0 = 1. At the middle, none of the area has been gathered in yet, so all of it is still in the tail.
erfc of 1 ≈ 0.1573. Since erf of 1 is about 0.8427, the tail left beyond x = 1 is 1 minus 0.8427, which is 0.1573. Notice the two add back to 1 exactly, as the complement always must.
erfc of 2 ≈ 0.0047. Out at x = 2 barely half a percent of the area remains in the tail. This is the region where computing erfc directly really earns its keep, since the value is already small and shrinking fast.
Where it matters
The complementary error function is the natural tool whenever you care about tails, which usually means rare events. In statistics it gives the probability of an outcome far from the average, the sort of far-out chance that risk and reliability work depends on. In digital communications it is the heart of the Q-function used to work out bit error rates, the odds that noise flips a transmitted bit, where the interesting probabilities are tiny and precision in the tail is everything. It also appears in diffusion and heat-flow problems. In all of these, it is precisely the small tail values that matter, which is why erfc, computed directly, is the right function for the job.
Questions people ask
What is the complementary error function?
It is 1 minus the error function, giving the area in the tail of the bell curve beyond a point x, from x out to infinity.
How does it relate to the error function?
They always sum to 1. The error function measures the area up to x, and erfc measures the leftover tail beyond x.
Why compute it directly instead of 1 minus erf?
Because far out in the tail, erf is very close to 1, and subtracting from 1 loses precision to rounding. Computing erfc directly keeps the small tail values accurate.
What values does it take?
For x from 0 upward it runs from 1 down toward 0. It equals 1 at x equals 0 and shrinks toward 0 as x grows.
Where is it used?
In tail probabilities for rare events, in the Q-function for bit error rates in communications, and in diffusion and heat-flow problems.
References
A note on where this comes from. The complementary error function is defined by erfc of x equal to 1 minus erf of x, which is (2 over the square root of pi) times the integral from x to infinity of e to the minus t squared. Computing it directly, rather than as 1 minus erf, preserves accuracy in the tail. The numerical approximation used here is the well-known rational form given in Numerical Recipes. For further reading, see the NIST Digital Library of Mathematical Functions, Chapter 7, at https://dlmf.nist.gov/7.
- Press, Teukolsky, Vetterling and Flannery, Numerical Recipes, the source of the rational approximation for erfc used here.
- NIST Digital Library of Mathematical Functions, Chapter 7 (Error Functions), the standard modern reference.
- Abramowitz and Stegun, Handbook of Mathematical Functions, Chapter 7, a classic reference for the error functions.
Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.
Other Tools
- Absolute Value Equation Calculator
- Binomial Coefficient Calculator
- Combination Calculator
- Completing The Square Calculator
- Complex Number Calculator
- Discriminant Calculator
- Elimination Method Calculator
- Error Function Calculator
- Foil Calculator
- Gamma Function Calculator
- Interval Notation Calculator
- Permutation Calculator
- Polynomial Division Calculator
- Quadratic Formula Calculator
- System Of Equations Calculator