How to Use ISEVEN and ISODD in Google Sheets
=ISEVEN(value) returns TRUE for an even integer and FALSE otherwise. ISODD is its counterpart for odd numbers. Both are often paired with IF.
What ISEVEN and ISODD do
These two functions answer a yes-or-no question about a number. They are handy for banding rows, splitting a list into two groups, or checking IDs. For anything beyond even and odd, such as "divisible by 5", use MOD.
Syntax
=ISEVEN(value)
=ISODD(value)
Per Google's help page, value is the item you want to test. ISEVEN returns TRUE for an even integer, whether it is typed in directly or given through a cell reference, and FALSE otherwise. The page points to ISODD for odd numbers and to ISNUMBER for checking whether something is a number at all. It also notes ISEVEN is often paired with IF.
A step-by-step example
Cell A2 holds 4 and cell A3 holds 7.
| A | |
|---|---|
| 1 | Number |
| 2 | 4 |
| 3 | 7 |
=ISEVEN(A2)
This returns TRUE. =ISEVEN(A3) returns FALSE, because 7 is odd.
Turn the result into a label
=IF(ISEVEN(A3), "Even", "Odd")
This returns Odd. Wrapping the test in IF replaces TRUE and FALSE with words.
Common mistakes
- Assuming FALSE always means odd. The help page says ISEVEN returns FALSE for anything that is not an even integer, which includes text.
- Forgetting the IF. Without it, the result is just TRUE or FALSE.
- Using it for other divisors. Use MOD for those.
Try it yourself
Use the numbers above (A2 and A3). Type your formula into the box, starting with =, then press Check.
Exercise 1: Is it even?
Write a formula that checks whether the number in A2 is even.
Exercise 2: Even or odd
Write a formula that shows Even if A3 is even and Odd if it is not.
What to learn next
- MOD: the remainder after a division.
- ISNUMBER: check whether a value is a number.
- IF: run a test and return one of two results.
Syntax and rules in this guide were checked against Google's ISEVEN/ISODD help page. See all guides.