Engineering function

DELTA function

Tests whether two numbers are equal: returns 1 if they are, 0 if not. Also called the Kronecker delta.

Available in Excel 2007 and later (Excel 2003 needed the Analysis ToolPak add-in), Microsoft 365, Excel for the web, Excel for Mac

Excel 2007 and laterWorks in Google Sheets

Syntax

DELTA(number1, [number2])
ArgumentWhat it means
number1RequiredThe first number.
number2OptionalThe second number. If omitted, Excel uses 0.

Returns: 1 if the two numbers are equal, otherwise 0.

How DELTA works

DELTA is the spreadsheet version of the Kronecker delta from mathematics: it gives 1 when two numbers match and 0 when they do not. Because the answer is a number rather than TRUE/FALSE, you can add a column of DELTA results to count matches, or multiply by it to switch a value on or off.

With only one argument, DELTA checks whether the number equals 0. It only compares numbers — text, even a number stored as text, returns #VALUE!. The comparison is exact, so a value like 0.1+0.2 that is 0.30000000000000004 internally does not equal 0.3; round first if your numbers come from calculations.

In modern Excel, =--(A2=B2) or =IF(A2=B2,1,0) do the same job and also work with text; DELTA remains useful when you want an explicit, readable test or are following a formula from an engineering text.

Examples

1Are two values equal?

C2fx=DELTA(A2, B2)
ABC
1PlannedActual
2551

Result: 1

5 equals 5, so DELTA returns 1. With an actual of 4 it would return 0.

2Count exact hits

E2fx=DELTA(A2, B2)+DELTA(A3, B3)+DELTA(A4, B4)
ABCDE
1TargetShotHit?
2101012
31080
410101

Result: 2

Each DELTA adds 1 for an exact hit and 0 for a miss. Rows 2 and 4 match, so the total is 2. Column C shows the per-row results you would get by filling =DELTA(A2,B2) down.

3Check for zero with one argument

B2fx=DELTA(A2)
AB
1Balance
201

Result: 1

When number2 is left out, DELTA compares with 0. The balance is 0, so the result is 1.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!An argument is text — including numbers stored as text.Convert with VALUE or use =--(A2=B2), which accepts text as well.

Tips

  • Floating-point results can differ in the 15th digit; use =DELTA(ROUND(A2,2), ROUND(B2,2)) for money.
  • =SUMPRODUCT(--(A2:A10=B2:B10)) counts matches over a whole range in one formula.

Google Sheets

DELTA also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

DELTA in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
FinnishSAMA.ARVO
PolishCZY.RÓWNE
RussianДЕЛЬТА