Error Function Calculator
Compute the error function erf for any x with good precision. Useful in probability, diffusion, and normal distribution calculations.
Enter the Details
Result will appear here...
What this calculator does
The error function, written erf, is one of the most important functions in all of probability and physics. In plain terms, it measures the area under the bell curve out to a given point. This computes it, to as many decimal places as you ask for.
Enter a number and a precision, and it returns the value of erf. It runs right here in the browser.
Using the calculator
- Enter a number, the point x you want the error function at.
- Enter a precision, how many decimal places to show (it defaults to 7).
- Press Calculate.
It returns erf of x, rounded to your chosen precision. Reset clears the fields.
What the error function is
Picture the bell-shaped curve given by e raised to minus t squared, the humped shape at the heart of the Gaussian. The error function is the running total of the area under that hump, starting from the middle and sweeping outward to a point x. Formally:
erf of x = (2 ÷ √π) times the area under e−t² from 0 to x
That factor of 2 over the square root of pi is a deliberate scaling. It is chosen so that if you sweep all the way out to infinity, the total comes to exactly 1. In other words, erf is set up so that the whole of one side of the curve counts as 1, which makes it read naturally as a fraction of the total area, and therefore as a probability.
Its shape and range
The error function has a characteristic S-shape. At x equals 0 it is 0, since you have swept no area yet. As x grows it climbs steeply at first, then levels off, creeping toward 1 but never quite reaching it. Going the other way, into negative x, it mirrors down toward minus 1, because the function is odd: erf of minus x is just minus erf of x. So its values live entirely between minus 1 and 1, and the interesting action all happens within a few units of zero, where the curve does its climbing.
The link to the normal distribution
Here is why the error function matters so much. The normal distribution, the bell curve, is the single most important distribution in statistics, describing everything from measurement noise to test scores to natural variation. And the error function is the tool that turns that curve into actual probabilities. Ask "what is the chance a normally distributed measurement lands within a certain distance of the average?", and the answer is written with erf. It is the bridge that converts "how many standard deviations away" into "what fraction of the data", which is exactly the question statistics is forever asking. That is why erf appears in nearly every corner of probability. For the leftover area in the tail beyond x, its partner the complementary error function takes over.
Worked examples
erf of 0 = 0. No distance swept, no area, so the function starts at zero.
erf of 1 ≈ 0.8427. By the time you reach x = 1, you have already captured about 84 percent of the area on that side of the curve. Most of the bell's mass sits close to the middle.
erf of 2 ≈ 0.9953. Out at x = 2 you have swept up over 99 percent. The curve has nearly flattened, with only a sliver of area left further out, which shows how quickly the tail thins.
Where it turns up
Beyond probability and statistics, the error function shows up wherever the Gaussian shape does. It appears in the solutions of the heat equation, describing how heat or a dissolved substance spreads out over time, which makes it central to diffusion problems. It turns up in signal processing and communications, in optics through the closely related Fresnel integrals, and quite generally anywhere randomness follows a bell curve. This tool computes it using the math.js library, and the precision setting simply controls how many decimal places of that result you see.
Questions people ask
What is the error function?
A function that gives the scaled area under the Gaussian bell curve from 0 out to a point x. It is written erf and is used to get probabilities from the normal distribution.
What values can it take?
It runs between minus 1 and 1. It is 0 at x equals 0, rises toward 1 for large positive x, and falls toward minus 1 for large negative x.
How does it relate to the normal distribution?
It converts a distance from the average, measured in standard deviations, into the fraction of the bell curve within that distance, which is how normal-distribution probabilities are calculated.
Why is it called the error function?
The name comes from the theory of measurement errors in astronomy and surveying, where the normal distribution was first used to model the errors in observations.
Where is it used?
In probability and statistics, in the heat and diffusion equations, in signal processing and communications, and in optics.
References
A note on where this comes from. The error function is defined as erf of x equal to (2 over the square root of pi) times the integral from 0 to x of e to the minus t squared. It is also called the Gauss error function, and the name and the notation Erf were introduced by J. W. L. Glaisher in 1871 in connection with the theory of errors of observation. For further reading, see the NIST Digital Library of Mathematical Functions, Chapter 7, at https://dlmf.nist.gov/7.
- J. W. L. Glaisher (1871), who introduced the name "error function" and the notation, tied to the theory of errors of observation.
- 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 function.
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
- Complementary Error Function Calculator
- Completing The Square Calculator
- Complex Number Calculator
- Discriminant Calculator
- Elimination Method Calculator
- Foil Calculator
- Gamma Function Calculator
- Interval Notation Calculator
- Permutation Calculator
- Polynomial Division Calculator
- Quadratic Formula Calculator
- System Of Equations Calculator