ERF Function (LibreOffice Calc)
The ERF function returns the Gaussian error function, used in probability, statistics, and engineering for modeling normal distributions and cumulative error.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the ERF Function Does ▾
- Computes the error function
- Used in normal distribution, probability, and signal processing
- Supports single‑limit and two‑limit forms
- Useful in diffusion equations, heat transfer, and cumulative probability models
Syntax ▾
ERF(lower_limit; [upper_limit])
Arguments
-
lower_limit:
The lower bound of the integration. -
upper_limit (optional):
The upper bound.
If omitted, ERF(lower_limit) is computed from 0 → lower_limit.
Mathematical Definition ▾
[ \text{ERF}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} , dt ]
Two‑limit form:
[ \text{ERF}(a, b) = \text{ERF}(b) - \text{ERF}(a) ]
Basic Examples ▾
Standard error function
=ERF(1)
→ 0.84270079
Negative input
=ERF(-1)
→ -0.84270079
Two‑limit form
=ERF(1; 2)
→ ERF(2) - ERF(1)
Zero input
=ERF(0)
→ 0
Advanced Examples ▾
Convert ERF to normal CDF
=0.5 * (1 + ERF(x / SQRT(2)))
Compute probability between two z‑scores
=0.5 * (ERF(b / SQRT(2)) - ERF(a / SQRT(2)))
Use ERF in diffusion/heat‑transfer modeling
=ERF(x / (2 * SQRT(D * t)))
Use ERF for smoothing functions
=0.5 * (1 + ERF((A1 - threshold) / width))
Two‑limit integration for probability density
=ERF(A1; A2)
Approximate tail probability
=1 - 0.5 * (1 + ERF(x / SQRT(2)))
Edge Cases and Behavior Details ▾
ERF returns a number between –1 and 1
Behavior details
- ERF(∞) → 1
- ERF(–∞) → –1
- ERF is odd: ERF(–x) = –ERF(x)
- Two‑limit form is simply ERF(upper) – ERF(lower)
- Inputs can be any real number
Invalid input → Err:502
Common Errors and Fixes ▾
Err:502 — Invalid argument
Cause:
- Non‑numeric input
- Invalid references
Fix:
- Wrap with VALUE()
- Validate numeric ranges
Unexpected negative values
Cause:
- Negative input produces negative ERF
Fix:
- Confirm sign of input
Best Practices ▾
- Use ERF for Gaussian‑based modeling
- Use ERFC for complementary probability
- Convert ERF to normal CDF using
0.5*(1+ERF(x/SQRT(2))) - Use two‑limit form for interval probabilities
- Document units when used in engineering models
ERF is the backbone of Gaussian probability and diffusion modeling — mastering it unlocks advanced statistical and engineering workflows.
Related Patterns and Alternatives ▾
- ERFC — complementary error function
- NORMDIST / NORMSDIST — normal distribution functions
- EXP — exponential function
- SQRT / PI — supporting math functions
- Custom integrals — advanced modeling
By mastering ERF, you can build precise statistical, probabilistic, and engineering models in LibreOffice Calc.