Contact

DELTA Function (LibreOffice Calc)

Mathematics Beginner LibreOffice Calc LibreOffice 3.0

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.

Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked

The **DELTA** function performs a **numeric equality test**. It returns **1** if two numbers are equal and **0** if they are not. It is ideal for binary logic, filtering, and exact numeric comparisons.

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.
  • 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.


Reproducible example (tested in LibreOffice Calc)

This standalone example was calculated in LibreOffice Calc 25.2.3.2 and matched the expected value. It is a practical cross-check of one usage, not proof that every example elsewhere on this page is correct.

=DELTA(7;7)

Expected result: 1.

Check whether two numeric values are equal.

If the result differs, check the referenced cells, argument separators and number formatting. For more information, consult the LibreOffice Calc official help.