DELTA in Excel: Count Equal Numeric Pairs and Test for Zero
Use Excel DELTA for numeric equality flags, count matching pairs, distinguish exact equality from tolerance and build an inspectable identity matrix.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: DELTA(number1,[number2]) returns numeric 1 when the two numbers are equal and 0 otherwise. If number2 is omitted, it compares number1 with zero. It is an equality indicator, not a subtraction or percentage-change calculation.
Availability and version history
- Introduced: the first introduction version is not established by the reviewed official history.
- Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official DELTA reference. Documentation and independent models; no native Excel execution or wider platform certification.
Syntax and defaults
=DELTA(number1,[number2])
Number1 is required; number2 is optional and defaults to zero. Microsoft documents #VALUE! if either argument is nonnumeric. The function is also described as the Kronecker delta.
The return values are numeric indicators. They can be summed to count matching pairs or multiplied by other numeric values to select a contribution. Do not interpret a zero indicator as an error or missing data without examining the inputs.
This guide uses explicit numeric cells. Blank coercion, imported numeric text and all native floating-point equality boundaries are not separately certified by the short reference.
Example 1: count matching observations
Enter this table in A1:B6:
| A, recorded quantity | B, expected quantity |
|---|---|
| 12 | 12 |
| 12 | 10 |
| 0 | 0 |
| -3 | -3 |
| 8 | 9 |
In C2 enter and fill through C6:
=DELTA(A2,B2)
Expected indicators are 1, 0, 1, 1 and 0. Summing them with =SUM(C2:C6) gives 3 matching pairs. The count includes the zero/zero pair and the equal negative pair.
A subtraction column answers a different question. =A2-B2, filled down, gives 0, 2, 0, 0 and −1. It measures differences rather than returning a reusable 1/0 equality flag.
The fraction of matching pairs is 3/5=0.6, or 60% when formatted as a percentage. State the denominator explicitly; a count alone does not convey the number of comparisons made.
Example 2: use the omitted argument to detect zero
Enter −2, 0, 0.5, 0 and 5 in E2:E6. In F2 use =DELTA(E2) and fill down. The expected outputs are 0, 1, 0, 1 and 0.
The sum is 2, the count of exact numeric zeros. =DELTA(0) returns 1 because omission supplies a second argument of zero. It does not ask whether the input is positive or nonnegative.
GESTEP is the separate greater-than-or-equal indicator. With its default zero threshold, positive numbers also receive 1; that would answer a different counting question.
Advanced example: select numeric contributions from a category code
Use numeric category codes 1, 2, 1, 3 and 2 in H2:H6 and amounts 10, 20, 30, 40 and 50 in I2:I6. Put the target code 2 in K1.
In J2 enter and fill down:
=DELTA(H2,$K$1)*I2
Expected contributions are 0, 20, 0, 0 and 50, totaling 70. The equality flags are 0, 1, 0, 0 and 1. Changing K1 to 1 instead selects contributions 10 and 30, totaling 40.
This is a transparent numeric indicator model. For ordinary criteria-based reporting, SUMIF is often more direct, especially for text categories. DELTA’s documented contract is numeric equality, so do not treat text labels as supported category arguments.
Advanced example: construct a small identity matrix
Put row indices 1, 2 and 3 in M2:M4, and column indices 1, 2 and 3 in N1:P1. In N2 enter:
=DELTA($M2,N$1)
Fill across N2:P2 and then down through row 4. The complete expected matrix is:
| 1 | 2 | 3 | |
|---|---|---|---|
| 1 | 1 | 0 | 0 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 0 | 1 |
Each row and column sums to 1, and the diagonal sums to 3. The anchored row and column references make the equality rule visible without relying on automatic array behavior.
Exact equality, rounding and tolerance
Numeric 12.341 and 12.344 are unequal, so their DELTA indicator is 0. Rounding both to two decimal places gives 12.34 and 12.34; =DELTA(ROUND(12.341,2),ROUND(12.344,2)) has expected result 1. That is equality after a deliberate transformation.
A tolerance rule is different again: =ABS(12.341-12.344)<=0.005 is TRUE in the independent decimal model. DELTA does not have a tolerance argument. ROUND and ABS help express the actual policy explicitly.
Native binary-floating equality near boundaries was not tested. A displayed match is not proof that stored numbers are equal, and an error fallback of zero would conflate an invalid comparison with a valid nonmatch.
References and verification
Expected outputs are independently calculated examples or documented rules, not captured native Excel results. Formulas use English function names and comma argument separators. Locale, rendering and boundary restrictions are stated where relevant.