How to check if a number is even or odd in Excel
Formula (Excel and Google Sheets)
=IF(ISEVEN(A2),"Even side","Odd side")Use ISEVEN inside IF: =IF(ISEVEN(A2),"Even side","Odd side"). MOD(A2,2)=0 does the same in any app.
- Result on the example
- one result per row in
B2, filled down toB8 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B8. Change any input and the result updates, or edit the formula to experiment.
How it works
ISEVEN returns TRUE when a number divides by 2 with nothing left over, and IF turns that into a label. ISODD is the opposite test.
=IF(ISEVEN(A2),"Even side","Odd side")In Google Sheets
The same formula works in Google Sheets: =IF(ISEVEN(A2),"Even side","Odd side"). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF(MOD(A2,2)=0,"Even side","Odd side") | Even side, Odd side, Even side… | MOD gives the remainder after dividing by 2: 0 for even, 1 for odd. The same idea tests any divisor, like MOD(A2,3)=0. |
| =IF(ISODD(A2),"Odd side","Even side") | Even side, Odd side, Even side… | ISODD is the mirror image of ISEVEN. |
Common mistakes
- ISEVEN and ISODD ignore decimals: 3.5 is treated as 3, which is odd.
- Text, including numbers stored as text, returns #VALUE!. Convert it with VALUE first.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Check if a number is even or odd
B2, show "Even side" for even house numbers and "Odd side" for odd ones. Fill down to B8.Questions
How do I shade every other row?
Use a conditional formatting rule with =ISEVEN(ROW()).
How do I count the odd numbers in a range?
=SUMPRODUCT(--ISODD(A2:A8)).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.