Excel Formula for Checking Odd Even Integers

Formulas & functions · Updated November 22, 2026

The quickest way to check if a number in cell A1 is odd or even in Excel is to use the ISODD or ISEVEN function: =ISODD(A1) returns TRUE for odd numbers and FALSE for even numbers, while =ISEVEN(A1) does the opposite. For a custom text result like “Odd” or “Even”, combine them with IF: =IF(ISODD(A1),"Odd","Even").

Background: What These Functions Do

Excel has two dedicated functions for parity checking, introduced in Excel 2007 and still present in Microsoft 365. ISODD(number) returns TRUE if the number is odd, FALSE if even. ISEVEN(number) returns TRUE if even, FALSE if odd. Both functions ignore the sign: -3 is odd, -4 is even. They also handle decimals by truncating toward zero—so 2.9 is treated as 2 (even) and 3.1 as 3 (odd). This behavior is consistent with Excel’s INT function for positive numbers but differs for negatives (e.g., -2.9 truncates to -2, which is even).

How to Use ISODD and ISEVEN in Practice

Assume you have a list of order IDs in column A (A2:A100) and you want to flag which are odd. In cell B2, enter:

=IF(ISODD(A2),"Odd","Even")

Drag the fill handle down to copy. If A2 contains 7, the result is “Odd”. If A3 contains 12, the result is “Even”. You can also use these functions in conditional formatting to highlight odd rows: select the range, go to Home > Conditional Formatting > New Rule, choose “Use a formula to determine which cells to format”, and enter =ISODD($A2) (adjust the row reference as needed).

Alternative Formula: Using MOD

Before ISODD/ISEVEN existed, the standard approach was the MOD function. MOD(number, divisor) returns the remainder after division. To check for oddness, use =MOD(A1,2)—returns 1 for odd, 0 for even. For a text result: =IF(MOD(A1,2)=1,"Odd","Even"). The MOD method is still useful if you need to work with divisors other than 2 (e.g., checking multiples of 3). Note that MOD with negative numbers returns a result with the same sign as the divisor (in Excel, MOD(-3,2) returns 1, which is odd). This differs from some programming languages, so test with negative values if your data includes them.

How to Choose Between ISODD/ISEVEN and MOD

Use ISODD or ISEVEN when you only need a yes/no parity check—they are simpler and self-documenting. Use MOD when you need the remainder value itself, or when you’re checking divisibility by a number other than 2. For example, to check if a number in A1 is a multiple of 5, use =MOD(A1,5)=0. Both methods are equally fast; there’s no performance difference for typical spreadsheet sizes.

Common Problems and Misconceptions

  • Text or blank cells: ISODD and ISEVEN return #VALUE! if the cell contains text or is blank. To avoid errors, wrap in IFERROR: =IFERROR(IF(ISODD(A1),"Odd","Even"),"Not a number").
  • Decimals: As noted, both functions truncate decimals. If you need to check the parity of the integer part only, that’s fine. But if you want to round first, use =ISODD(ROUND(A1,0)).
  • Large numbers: Excel has a 15-digit precision limit. Numbers beyond that may lose precision, so parity checks on very large integers (e.g., 123456789012345678) may be unreliable. For such cases, consider using a text-based approach or a VBA custom function.
  • Boolean vs. text: Many users expect ISODD to return “Odd” or “Even” directly, but it returns TRUE/FALSE. Always combine with IF for a readable label.

Comparison: Excel vs. Google Sheets

Google Sheets also supports ISODD and ISEVEN with identical syntax and behavior. The MOD function works the same way. The only difference is in conditional formatting menus: in Google Sheets, go to Format > Conditional formatting, then choose “Custom formula is” and enter the same formula. Keyboard shortcuts also differ—for example, to open the fill handle in Google Sheets, use Ctrl+D (Windows) or Cmd+D (Mac) to fill down, whereas Excel uses Ctrl+D or Ctrl+E for flash fill.

Safety and Accuracy Tips

When using parity checks in financial or scientific data, always verify that your numbers are truly integers. If you’re checking row numbers in a table, note that Excel’s row numbers are always integers, so =ISODD(ROW()) works reliably. For data imported from other systems, be aware that numbers may be stored as text—use the VALUE function to convert: =ISODD(VALUE(A1)). Also, remember that Excel’s ISODD/ISEVEN treat zero as even, which is mathematically correct but can surprise users. If you need to exclude zero, add a condition: =IF(A1=0,"Zero",IF(ISODD(A1),"Odd","Even")).

Frequently Asked Questions

Can I use ISODD with a cell containing a formula?

Yes, ISODD and ISEVEN work with any cell that contains a numeric value, including results of formulas. For example, if A1 contains =B1*2, then =ISODD(A1) will evaluate the result. If the formula returns a non-numeric error, you’ll get #VALUE!—wrap in IFERROR to handle.

How do I highlight all even rows in Excel?

Select your data range (e.g., A2:C100), go to Home > Conditional Formatting > New Rule > Use a formula. Enter =ISEVEN(ROW()) (without a dollar sign before the row number, so it applies to each row). Set a fill color and click OK. This will highlight rows 2, 4, 6, etc., assuming your data starts at row 2.

What if my numbers are in text format?

If the cell contains text like “123”, ISODD will return #VALUE!. Convert the text to a number using the VALUE function: =ISODD(VALUE(A1)). Alternatively, use the Text to Columns feature (Data > Text to Columns) to convert the entire column to numbers.

Does ISODD work with negative numbers?

Yes, ISODD and ISEVEN work with negative numbers. For example, ISODD(-3) returns TRUE, and ISEVEN(-4) returns TRUE. The sign is ignored; only the absolute value’s parity matters.

Can I use these functions in array formulas?

Yes, ISODD and ISEVEN are vectorized. For example, to count odd numbers in A1:A10, use =SUMPRODUCT(--ISODD(A1:A10)) or =COUNTIF(A1:A10,"*") won’t work, but the SUMPRODUCT approach does. In Microsoft 365, you can also use =SUM(ISODD(A1:A10)*1) as a dynamic array formula.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.