ERF function

ERF calculates the error function value(s), returning the probability that a value from a normal distribution falls within specified limits.

=ERF(lower_limit, [upper_limit])

Generate a ERF formula

Describe what you need. The generator will reach for ERF where ERF is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How ERF reads its arguments
lower_limitrequiredupper_limitoptionalERF
ArgumentRequiredDescription
lower_limitRequiredA non-negative number representing the lower bound (or sole bound) of the probability interval. Required.
upper_limitOptionalA non-negative number representing the upper bound. Optional; when omitted, ERF returns the probability for the single value. When included, ERF returns ERF(upper_limit) − ERF(lower_limit).

Returns

A decimal number between 0 and 1 (or the difference of two such values when upper_limit is provided), representing a probability.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Calculate measurement tolerance for a single ingredient

IngredientSupplierUnitQtyExpiry DateTolerance_kg
TomatoesFresh Cokg252026-09-222
BasilFresh Cobunch122026-09-181.5
MozzarellaDairy Pluskg82026-09-251
Olive OilMediterraneanL152026-12-162.5
Chicken BreastPrime Meatkg302026-09-203
=ERF(2/SQRT(2))

Result: 0.95449

For Tomatoes with a ±2kg measurement tolerance, ERF(2/√2) ≈ 0.95449 means approximately 95.4% of stock counts should fall within the ±2kg acceptable range during inventory audits. This helps quantify confidence in scale accuracy.

2. Compare quality acceptance probability across two error bounds

IngredientSupplierUnitQtyExpiry DateLower_BoundUpper_Bound
TomatoesFresh Cokg252026-09-2213
BasilFresh Cobunch122026-09-181.52.5
MozzarellaDairy Pluskg82026-09-250.51.5
Olive OilMediterraneanL152026-12-1612.5
Chicken BreastPrime Meatkg302026-09-2023
=ERF(3/SQRT(2)) - ERF(1/SQRT(2))

Result: 0.26717

For Chicken Breast, calculating ERF(3/√2) − ERF(1/√2) ≈ 0.26717 gives the probability that measurement error falls between 1kg and 3kg. This 26.7% band represents quality tolerance outside strict ±1kg but within acceptable ±3kg variance, useful for flagging borderline stock discrepancies.

3. Verify delivery precision across suppliers

IngredientSupplierUnitQtyExpiry DateStd_Dev_Deliveries
TomatoesFresh Cokg252026-09-221.2
BasilFresh Cobunch122026-09-180.8
MozzarellaDairy Pluskg82026-09-250.5
Olive OilMediterraneanL152026-12-161.5
Chicken BreastPrime Meatkg302026-09-202.1
=ERF(F2)

Result: 0.91031

For Basil (std dev 0.8), ERF(0.8) ≈ 0.91031 means 91% of Basil deliveries from Fresh Co historically fall within 0.8 bunches of the ordered 12-bunch average. Suppliers with lower ERF scores show less consistent delivery volumes, informing reorder safety stock levels.

Common errors

Which ERF error are you seeing?
ERF returned an error#VALUE!
Ensure both lower_limit and upper_limit are numbers or formulas that evaluate to numbers. If referencing a column, confirm it contains numeric data (qty, not ingredient names).
#NAME?
Verify spelling: must be exactly ERF with no suffix. If using Google Sheets or older Excel, check that your app version includes the ERF function; consider using NORMSDIST as an alternative.
#NUM!
Check that arguments are reasonable (e.g., not extreme values like 1e308). For very large numbers, ERF approaches 1, so divide by a scaling factor if needed (e.g., =ERF(B2/10) instead of =ERF(B2*10)).
ErrorWhy it happensHow to fix it
#VALUE!A non-numeric value is passed as an argument (e.g., the text 'high' instead of a number, or a cell containing text).Ensure both lower_limit and upper_limit are numbers or formulas that evaluate to numbers. If referencing a column, confirm it contains numeric data (qty, not ingredient names).
#NAME?ERF is not recognized, typically because the function is misspelled (e.g., ERROR, ERF_FUNC) or your spreadsheet application doesn't support ERF (rare in modern Excel/Sheets).Verify spelling: must be exactly ERF with no suffix. If using Google Sheets or older Excel, check that your app version includes the ERF function; consider using NORMSDIST as an alternative.
#NUM!Arguments are outside the valid range or the calculation produces a numerical overflow (though ERF is stable for most practical values; this is rare).Check that arguments are reasonable (e.g., not extreme values like 1e308). For very large numbers, ERF approaches 1, so divide by a scaling factor if needed (e.g., =ERF(B2/10) instead of =ERF(B2*10)).

Tips and when to use something else

  • ERF is primarily a statistical function; use it when analyzing normal distributions or measurement uncertainty. For simple inventory counts, SUMIF or COUNTIF is usually more appropriate.
  • The two-argument form ERF(lower, upper) is shorthand for =ERF(upper)−ERF(lower) and calculates the probability a value falls in a specific range—useful for quality acceptance windows.
  • ERF always returns a value between 0 and 1 (or a difference thereof). If you need a percentage, multiply by 100: =ERF(B2)*100.
  • Related: NORM.S.DIST and NORM.DIST provide more flexible distribution analysis; NORMSDIST does similar work if ERF is unavailable. Choose NORM.DIST for mean/std-dev data not centered at 0.

Frequently asked questions

What is the error function and why would I use it on a spreadsheet?
The error function (ERF) quantifies the probability that a measurement or value from a normal distribution falls within a given tolerance band. In supply chain, it's used to evaluate measurement accuracy, forecast reliability, and quality acceptance rates.
Can ERF handle negative numbers?
ERF mathematically accepts negative values and is symmetric around zero, so ERF(−x) = −ERF(x). However, in stock-take contexts (quantities, tolerances), inputs are typically positive. If you need to work with deviations around a mean, you'd usually work with absolute values or standardized scores first.
What's the difference between ERF and NORM.S.DIST?
ERF directly returns the cumulative probability for a standardized normal distribution (mean 0, std dev 1/√2). NORM.S.DIST is more general and lets you specify any mean and standard deviation, so it's more flexible for real-world data. Use NORM.S.DIST if you're analyzing non-standardized measurements.
Why does ERF(1) give roughly 0.8427 instead of a round number?
ERF returns the exact probability from the mathematical error function. The value 0.8427 means that ~84.3% of values in a normal distribution fall within one standard deviation of the mean—a fundamental property of statistics, not a rounding issue.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17