Engineering function

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])
ArgumentWhat it means
lower_limitRequiredThe lower bound of the integration — or, if upper_limit is omitted, the upper bound with 0 as the lower bound.
upper_limitOptionalThe 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

B2fx=ERF(A2)
AB
1x
20.7450.707929

Result: 0.707929

erf(0.745) is about 0.707928920, shown formatted to 6 decimal places.

2Integral between two limits

C2fx=ERF(A2, B2)
ABC
1LowerUpper
20.510.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

B2fx=ERF(A2/SQRT(2))
AB
1k (std devs)
220.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".

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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)) equals NORM.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.

LanguageFunction name
DanishFEJLFUNK
DutchFOUTFUNCTIE
FinnishVIRHEFUNKTIO
GermanGAUSSFEHLER
HungarianHIBAF
ItalianFUNZ.ERRORE
Norwegian (Bokmål)FEILF
PolishFUNKCJA.BŁ
Portuguese (Brazil)FUNERRO
Portuguese (Portugal)FUNCERRO
RussianФОШ
SpanishFUN.ERROR
SwedishFELF
TurkishHATAİŞLEV