DELTA Function

Returns 1 if two numbers are equal, otherwise 0.

Category

Engineering

Available in

All versions, Microsoft 365

Returns

1 or 0

Want to practice DELTA in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

DELTA tests whether two numbers are exactly equal and returns 1 (equal) or 0 (not equal). Engineers know it as the Kronecker delta.

Because the answer is a number, you can add up a column of DELTA results to count matches.

Syntax

=DELTA(number1, [number2])

Arguments

ArgumentRequired?What it does
number1YesThe first number.
number2NoThe second number. Leave it out to compare with 0.

Examples

Example 1 — Stock count check

Does the system quantity match what was counted on the shelf?

D2fx=DELTA(B2,C2)
ABCD
1ItemSystemCountedMatch
2Paper40401
3Toner12110
4Pens3003001
5Labels001
=DELTA(B2,C2) Explain

=SUM(D2:D5) shows 3 of the 4 items match.

Example 2 — Compare with zero

With one argument, DELTA checks for zero.

=DELTA(A2) Explain

Returns 1 when A2 is 0 (or empty), otherwise 0.

Common mistakes

  • #VALUE! Either argument is text. For text, use EXACT or =A2=B2.
  • Tiny rounding differences. 0.1+0.2 isn't exactly 0.3, so DELTA(0.1+0.2,0.3) is 0. Round both values first.

Notes

  • =--(A2=B2) gives the same result and also works with text.
  • Related functions: GESTEP, EXACT, IF.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.