EQ function

EQ returns TRUE if two values are exactly equal, FALSE otherwise. Use it to compare values in spreadsheet logic.

=EQ(value1, value2)

Generate a EQ formula

Describe what you need. The generator will reach for EQ where EQ is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How EQ reads its arguments
value1requiredvalue2requiredEQ
ArgumentRequiredDescription
value1RequiredThe first value to compare. Can be a number, text, logical value, cell reference, or formula result.
value2RequiredThe second value to compare against value1; returns FALSE if the types differ, unless both are numeric or both are text.

Returns

A boolean value: TRUE if the arguments are exactly equal, FALSE if they differ.

Availability

Excel: Not available · Google Sheets: Supported

Worked examples

1. Check if actual spending matches the budget

CategoryMonthBudgetedActualVariance
GroceriesJanuary400420-20
UtilitiesJanuary1501500
EntertainmentJanuary2002000
=EQ(C2, D2)

Result: FALSE

Row 2 (Groceries) compares budgeted ($400) to actual ($420). Since they differ, EQ returns FALSE. For rows 3 and 4, where budgeted and actual match exactly, EQ returns TRUE. This helps track which budget categories came in on target.

2. Identify months where spending matched the budget exactly

CategoryMonthBudgetedActualVariance
GroceriesJanuary400420-20
UtilitiesJanuary1501500
EntertainmentFebruary20021010
=EQ(E2, 0)

Result: FALSE

Row 2 (Groceries) has a variance of -20, so EQ(E2, 0) returns FALSE. Row 3 (Utilities) has variance of 0, so EQ returns TRUE. Nest this in IF to flag categories on budget: =IF(EQ(E2, 0), "On Budget", "Over/Under").

3. Test whether a category matches a target value

CategoryMonthBudgetedActualVariance
GroceriesJanuary400420-20
UtilitiesJanuary1501500
EntertainmentFebruary20021010
=EQ(A2, "Utilities")

Result: FALSE

Row 2 (Groceries) does not match "Utilities", so EQ returns FALSE. Row 3 matches exactly, returning TRUE. This is useful in complex formulas where you need text comparison as a value rather than a direct condition, such as inside SUMIF or array operations.

Common errors

Which EQ error are you seeing?
EQ returned an error#N/A
Use IFNA to handle the error before it reaches EQ: =EQ(IFNA(C2, 0), D2) or verify the lookup data is correct and complete.
#REF!
Restore the deleted row or column, or update the formula to reference valid cells. Use Ctrl+Shift+F9 to recalculate or check the formula bar for broken links.
#CALC!
Identify the circular reference by checking which cells reference each other. Break the cycle by removing the reference or restructuring the formula dependencies.
ErrorWhy it happensHow to fix it
#N/AOne of the arguments references a cell containing #N/A, such as when a VLOOKUP fails to find a match.Use IFNA to handle the error before it reaches EQ: =EQ(IFNA(C2, 0), D2) or verify the lookup data is correct and complete.
#REF!One of the cell references in the formula is broken, such as when a column or row is deleted and the reference can no longer be resolved.Restore the deleted row or column, or update the formula to reference valid cells. Use Ctrl+Shift+F9 to recalculate or check the formula bar for broken links.
#CALC!A circular reference exists in one of the values being compared, such as if a cell references itself directly or indirectly through a chain of formulas.Identify the circular reference by checking which cells reference each other. Break the cycle by removing the reference or restructuring the formula dependencies.

Tips and when to use something else

  • EQ is most useful inside IF, IFS, or FILTER formulas for cleaner, more readable logic. =IF(EQ(A2, "Utilities"), B2, 0) is more explicit than =IF(A2="Utilities", B2, 0).
  • EQ is case-sensitive for text: EQ("Utilities", "utilities") returns FALSE. Use LOWER() or UPPER() on both arguments for case-insensitive comparison: =EQ(LOWER(A2), LOWER("utilities")).
  • For numeric comparisons, EQ requires exact value matches. Avoid comparing results of division or rounding. Use GT and LT with a tolerance instead: =AND(GT(A1/3, B1-0.01), LT(A1/3, B1+0.01)).
  • When comparing different data types (100 vs "100"), EQ returns FALSE without error. Use VALUE() or TEXT() to convert: =EQ(VALUE(A2), D2) if type mismatch is unexpected.

Frequently asked questions

Is EQ the same as using the equals sign = in a formula?
No. The = operator is for assignment or direct comparison in formulas (e.g., =A1=B1). EQ is a function that returns a boolean value, making it useful inside other functions, array operations, and nested logic where you need equality as a value.
Can EQ compare dates or times?
Yes. EQ compares dates and times by their underlying numeric values. EQ(DATE(2025, 1, 15), DATE(2025, 1, 15)) returns TRUE. Ensure both dates are formatted consistently and in the same timezone.
What's the difference between EQ and the EXACT function?
EXACT is designed for text comparison and is always case-sensitive; EQ returns FALSE when comparing different data types (100 vs "100"). For numeric comparisons, EQ is faster and preferred.
How do I check if multiple values are all equal to each other?
EQ compares only two values at a time. To check if three or more values are equal, nest multiple EQ calls with AND(): =AND(EQ(A2, B2), EQ(B2, C2)). Alternatively, use IFS for multi-condition logic.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17