DELTA Function (LibreOffice Calc)
The DELTA function compares two numbers and returns 1 if they are equal, otherwise 0. It is used in logical tests, filtering, binary operations, and numeric equality checks.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the DELTA Function Does ▾
- Compares two numbers
- Returns 1 if equal, 0 if not
- Performs strict numeric equality
- Useful in binary logic, filtering, and array formulas
- Faster and cleaner than
IF(A=B;1;0)
Syntax ▾
DELTA(number1; [number2])
Arguments
-
number1:
First number to compare. -
number2 (optional):
Second number to compare (default = 0).
Basic Examples ▾
Compare two numbers
=DELTA(5; 5)
→ 1
=DELTA(5; 3)
→ 0
Compare against zero (default behavior)
=DELTA(0)
→ 1
=DELTA(7)
→ 0
Compare decimals
=DELTA(3.14; 3.14)
→ 1
Advanced Examples ▾
Use DELTA in filtering logic
=IF(DELTA(A1; 100); "Match"; "")
Use in array formulas for counting exact matches
=SUM(DELTA(A1:A100; 42))
Binary classification
=DELTA(A1; B1)
Combine with SIGN for numeric logic
=DELTA(SIGN(A1); SIGN(B1))
Use in lookup validation
=IF(DELTA(A1; VLOOKUP(A1; B1:C100; 2; 0)); "Exact"; "Mismatch")
Use in bitwise-style logic
=DELTA(MOD(A1; 2); 0) → 1 if even, 0 if odd
Edge Cases and Behavior Details ▾
DELTA returns 1 or 0, never TRUE/FALSE
Behavior details
- Performs strict numeric equality
- Text values cause Err:502
- Empty cells treated as 0
- Floating‑point precision applies
- Faster than IF‑based comparisons in large arrays
Invalid input → Err:502
Common Errors and Fixes ▾
Err:502 — Invalid argument
Cause:
- Non-numeric input
- Text values
- Invalid references
Fix:
- Wrap with VALUE()
- Validate inputs
Unexpected 0 for decimals
Cause:
- Floating‑point precision issues
Fix:
- Use rounding:
DELTA(ROUND(A1;5); ROUND(B1;5))
Best Practices ▾
- Use DELTA for clean, binary equality checks
- Prefer DELTA over IF(A=B) for performance in arrays
- Normalize decimals with ROUND() when needed
- Use DELTA in classification, filtering, and numeric logic
- Combine with SUM for fast match‑counting
DELTA is the simplest and fastest way to turn numeric equality into binary logic — perfect for filtering, classification, and array‑driven models.
Related Patterns and Alternatives ▾
- EXACT — text equality
- IF(A=B) — general comparison
- SIGN — numeric direction
- ISNUMBER — type checking
- AND / OR / NOT — logical composition
By mastering DELTA, you can build clean, efficient, and high‑performance logic structures in LibreOffice Calc.