# How to check if a number is even or odd in Excel

Use ISEVEN inside IF: =IF(ISEVEN(A2),"Even side","Odd side"). MOD(A2,2)=0 does the same in any app.

**Excel:** `=IF(ISEVEN(A2),"Even side","Odd side")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| House number | Side of street |
| 112 |  |
| 87 |  |
| 240 |  |
| 5 |  |
| 1318 |  |
| 99 |  |
| 64 |  |

Formula in B2, filled to B8: `=IF(ISEVEN(A2),"Even side","Odd side")`

Result: Even side; Odd side; Even side; Odd side; Even side; Odd side; Even side

## 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.

## Other ways

- `=IF(MOD(A2,2)=0,"Even side","Odd 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")`: 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.

## 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))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/check-if-number-is-even-or-odd
