The ERF.PRECISE function in Google Sheets returns the Gauss error function integrated between a lower bound and an optional upper bound. Its syntax is ERF.PRECISE(lower_bound, [upper_bound]), and it belongs to the Engineering category.
What Is the Error Function?
The error function (often written as erf) is a special mathematical function used in statistics, probability, and physics. It is defined as the integral from 0 to a given value of the normalized Gaussian (bell curve) function. In practical terms, it helps calculate probabilities related to normal distributions, such as the likelihood that a value falls within a certain number of standard deviations from the mean.
In Google Sheets, ERF.PRECISE is the modern, more precise version of the older ERF function. The difference is that ERF.PRECISE always uses the two-sided integral (from 0 to the bound), while ERF can be configured for one-sided or two-sided calculations depending on arguments. For most users, ERF.PRECISE is simpler and recommended.
How ERF.PRECISE Works
The function takes one or two arguments:
- lower_bound (required): The lower limit of integration. Must be a number or a reference to a cell containing a number.
- upper_bound (optional): The upper limit of integration. If omitted, the function integrates from 0 to
lower_bound. If provided, it integrates fromlower_boundtoupper_bound.
Mathematically, ERF.PRECISE(x) equals the integral from 0 to x of (2/√π) * e^(-t²) dt. When both bounds are given, it computes the integral from the first to the second bound, which is simply the difference of the two individual ERF values.
Example: If cell A1 contains 1, then =ERF.PRECISE(A1) returns approximately 0.84270079. This means the probability that a standard normal random variable falls between 0 and 1 is about 84.27% (since the error function is related to the cumulative distribution function).
Practical Examples in Google Sheets
Let’s see how to use it with concrete data. Suppose you have a column of z-scores (standard deviations) in cells A2:A10.
- In cell B2, enter
=ERF.PRECISE(A2)to get the error function for each z-score. - To find the probability between two z-scores, say 0.5 and 1.5, enter
=ERF.PRECISE(0.5, 1.5). This returns approximately 0.2417, which is the area under the standard normal curve between those two values. - To convert to a probability (for a standard normal distribution), multiply by 0.5 and add 0.5:
=0.5 * ERF.PRECISE(A2) + 0.5gives the cumulative probability from negative infinity to that z-score.
This is useful for hypothesis testing, quality control (e.g., Six Sigma), and any analysis involving normal distributions.
Differences from the ERF Function
Google Sheets also has an ERF function with a different syntax: ERF(lower_bound, [upper_bound]) but with an additional optional parameter for the mean and standard deviation in some versions? Actually, the standard ERF function in Google Sheets has syntax ERF(lower_bound, [upper_bound]) and behaves similarly, but the documentation notes that ERF.PRECISE is the more accurate version. The key difference is that ERF may use a different algorithm or treat the bounds differently in edge cases. For most practical purposes, you can use either, but ERF.PRECISE is the recommended one for new work.
If you’re migrating from Excel, note that Excel has ERF and ERF.PRECISE as well, but the syntax is identical. The behavior is consistent across both platforms.
Common Errors and How to Fix Them
Here are typical issues you might encounter:
- #VALUE! – Occurs if any argument is non-numeric or a text string that cannot be coerced to a number. Ensure your cells contain numbers, not text.
- #NUM! – Occurs if the lower bound is greater than the upper bound? Actually, the function accepts any real numbers, but if you provide an upper bound less than the lower bound, it returns a negative result (which is mathematically correct). If you see #NUM!, it might be due to extremely large values causing overflow. In such cases, reconsider the scale of your data.
- #N/A – Usually means the function is not available in your version. But ERF.PRECISE is available in all current versions of Google Sheets.
Always double-check that you’ve closed parentheses and used commas as separators (not semicolons, which are used in some European locales).
When to Use ERF.PRECISE vs Alternatives
For normal distribution probabilities, you might also use NORM.S.DIST or NORM.DIST. These are often more direct for probability calculations. For example, to get the cumulative probability for a z-score of 1.96, you could use =NORM.S.DIST(1.96, TRUE), which returns 0.975. With ERF.PRECISE, you’d compute =0.5 * ERF.PRECISE(1.96/SQRT(2)) + 0.5 – a more complex formula.
So, use ERF.PRECISE when you specifically need the error function itself, such as in differential equations or signal processing. For standard statistical probabilities, use the dedicated distribution functions.
Frequently Asked Questions
Can ERF.PRECISE handle negative numbers? Yes, it works fine with negative bounds. For example, =ERF.PRECISE(-1) returns approximately -0.8427, because the error function is an odd function.
What is the relationship between ERF.PRECISE and the normal CDF? The cumulative distribution function (CDF) of a standard normal distribution is Φ(x) = 0.5 * (1 + ERF(x/√2)). So you can convert between them.
Does ERF.PRECISE exist in Excel? Yes, Excel has the same function with the same syntax. The behavior is identical, so you can share formulas between the two.
Why would I get a #VALUE! error when referencing a cell? If the referenced cell contains text, a blank, or an error, the function returns #VALUE!. Make sure the cell has a numeric value.
Can I use ERF.PRECISE with arrays? Yes, it works with array formulas. For example, =ARRAYFORMULA(ERF.PRECISE(A2:A10)) will return an array of results.
Conclusion
ERF.PRECISE is a powerful but niche function. It’s essential for advanced engineering and statistical work, but for everyday spreadsheet tasks, you’ll likely use simpler functions. Now you know its syntax, examples, and how to troubleshoot common issues.
Related
- BITAND Function in Google Sheets: Syntax & Examples
- Data Entry Clerk Job: Duties, Skills, Pay
- Google Sheets Split Get First: How-To & Examples
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Compare Lists in Excel for DifferencesTo compare two Excel lists and find items that do not match, use COUNTIF to check whether each…
- String to Number Power Automate: Convert Text to IntIn Power Automate, you convert a string to a number using the int() expression (e.g., int('123') returns the…
- Excel Trendlines with Dates: How to Make Them WorkYes—Excel can add a trendline to data recorded by date, but the chart type matters. For a trendline…
- Daily Attendance Register Template Excel: Setup and TipsA daily attendance register in Excel is a worksheet that lists people down the rows, dates across the…
- Excel Heat Map UK: Create and Format One in Microsoft 365To make a heat map in Excel for Microsoft 365 on Windows, select the numeric cells, then choose…
- Excel 3-Color Scale: How It Works and When to Use ItIn Excel for Microsoft 365 on Windows, select the numeric cells, then choose Home > Conditional Formatting >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.