Category: FUNCTION | Updated: 2026-11-22
How to Use the DELTA Function in Google Sheets | Test Whether Two Numbers Are Equal
Syntax
=DELTA(number1, [number2])
- number1: Specifies the first number to compare.
- number2 (optional): Specifies the second number to compare. If omitted, it defaults to
0(testing whethernumber1equals0).
Practical Example with a Table
Here is an example of comparing target values and actual values, returning 1 when they match exactly and 0 when they do not.
| Number 1 | Number 2 | Formula | Result | Description |
|---|---|---|---|---|
100 |
100 |
=DELTA(A2, B2) |
1 | Returns 1 because the two numbers are equal |
100 |
99 |
=DELTA(A3, B3) |
0 | Returns 0 because the two numbers differ |
0 |
(omitted) | =DELTA(A4) |
1 | Omitting number2 compares against 0 |
5.0 |
5 |
=DELTA(A5, B5) |
1 | Returns 1 if numerically equal |
Common Errors and Notes
- #VALUE! Error: Occurs if
number1ornumber2is non-numeric data such as text. - Floating-Point Precision: When comparing results of calculated formulas, tiny internal rounding errors can cause values that look identical to return
0(not equal). In such cases, wrap them withROUNDbefore comparing. - Blank Cells: Referencing a blank cell treats it as
0, soDELTA(blank_cell, 0)returns1.
Frequently Asked Questions
Q. What is the difference between the DELTA function and the "=A1=B1" comparison operator?
A. The comparison operator (=) returns a boolean "TRUE" or "FALSE," whereas DELTA returns a numeric "1" or "0." DELTA is convenient when you want to directly sum the count of matches with the SUM function.
Q. Can I use the DELTA function to check if two text strings match?
A. No. DELTA is strictly for numbers. Passing text strings produces a "#VALUE!" error, so use the EXACT function for exact text comparisons.