ERF function
Returns the error function integrated between 0 and a limit, or between two limits. Linked to normal-distribution probabilities.
Available in Excel 2007 and later (Excel 2003 needed the Analysis ToolPak add-in), Microsoft 365, Excel for the web, Excel for Mac (negative limits are accepted from Excel 2010; earlier versions returned #NUM!)
Excel 2007 and laterWorks in Google Sheets
Syntax
ERF(lower_limit, [upper_limit])| Argument | What it means | |
|---|---|---|
lower_limit | Required | The lower bound of the integration — or, if upper_limit is omitted, the upper bound with 0 as the lower bound. |
upper_limit | Optional | The upper bound. If given, ERF returns erf(upper) − erf(lower). |
Returns: A number between -1 and 1 (or between -2 and 2 for the difference of two limits).
How ERF works
The error function, erf(x), measures the area under a bell curve from the centre out to x, scaled so that the total for x → ∞ is 1. It shows up wherever normal distributions or diffusion appear: measurement errors, heat spreading through a solid, dopant diffusion in chips, and the shape of a signal after a noisy channel.
With one argument, ERF(x) gives erf(x), the integral from 0 to x. With two arguments, ERF(a, b) gives the integral between the two limits, which equals erf(b) − erf(a). The function is odd, so erf(-x) = -erf(x), and it rises quickly: erf(2) is already 0.9953.
A useful link: the probability that a normally distributed measurement falls within k standard deviations of its mean is ERF(k/SQRT(2)). That is why erf is called the error function. ERF.PRECISE is the one-argument version, and ERFC returns the complement 1 − erf(x).
Examples
1Error function at 0.745
| A | B | |
|---|---|---|
| 1 | x | |
| 2 | 0.745 | 0.707929 |
Result: 0.707929
erf(0.745) is about 0.707928920, shown formatted to 6 decimal places.
2Integral between two limits
| A | B | C | |
|---|---|---|---|
| 1 | Lower | Upper | |
| 2 | 0.5 | 1 | 0.322201 |
Result: 0.322201
ERF with two limits returns erf(1) − erf(0.5) = 0.842701 − 0.520500 = 0.322201 (formatted to 6 decimals).
3Share of readings within ±2 standard deviations
| A | B | |
|---|---|---|
| 1 | k (std devs) | |
| 2 | 2 | 0.9545 |
Result: 0.9545
For a normal distribution, the share within ±k σ is erf(k/√2). With k = 2 that is 0.9545, or about 95.45% when formatted as a percentage — the familiar "95% rule".
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | A limit is non-numeric text. | Check the inputs. |
#NUM! | In Excel 2007 and earlier, a limit was negative. | Upgrade, or use -ERF(ABS(x)) for negative x in old versions. |
Tips
ERF(k/SQRT(2))equalsNORM.S.DIST(k,TRUE)*2-1, so you can cross-check with NORM.S.DIST.- Because erf flattens out near 1, very large inputs return exactly 1; use ERFC when you need the tiny tail probability.
Google Sheets
ERF also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
ERF in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | FEJLFUNK |
| Dutch | FOUTFUNCTIE |
| Finnish | VIRHEFUNKTIO |
| German | GAUSSFEHLER |
| Hungarian | HIBAF |
| Italian | FUNZ.ERRORE |
| Norwegian (Bokmål) | FEILF |
| Polish | FUNKCJA.BŁ |
| Portuguese (Brazil) | FUNERRO |
| Portuguese (Portugal) | FUNCERRO |
| Russian | ФОШ |
| Spanish | FUN.ERROR |
| Swedish | FELF |
| Turkish | HATAİŞLEV |