Google Sheets IF Even: Test Numbers for Even or Odd

How-to basics · Updated November 3, 2026

Google Sheets IF Even: Test Numbers for Even or Odd

To label a number as even or odd in Google Sheets, use =IF(ISEVEN(A2),"Even","Odd"). If A2 contains 14, the formula returns Even; ISEVEN checks the parity, and IF chooses which label to display.

The quickest way to check whether a number is even

Enter the formula in a neighboring cell, such as B2, and replace A2 with the cell containing your number. The formula returns the text Even when ISEVEN finds an even value and Odd otherwise. To apply it to a list, enter it beside the first value and fill or copy it down the column. Relative cell references adjust automatically: the formula beside A3 will check A3 rather than A2.

For a direct TRUE or FALSE result instead of a label, use ISEVEN by itself. With the number 14 in A2, =ISEVEN(A2) returns TRUE. With 15 in A2, it returns FALSE. This can be useful in a larger formula or a conditional-formatting rule, while the IF version is usually easier to read in a report.

These formulas are for Google Sheets in a web browser. The IF and ISEVEN functions are also available in Excel, but the menu directions later in this article refer specifically to Google Sheets.

How IF and ISEVEN work together

IF makes a decision based on a condition. Its basic structure is IF(condition, value_if_true, value_if_false). In the even-or-odd formula, ISEVEN(A2) supplies the condition. If it is TRUE, IF returns Even; if it is FALSE, IF returns Odd. The result is text, not a change to the number in A2.

ISEVEN is a logical test: it returns TRUE when its input is even and FALSE when it is odd. Even integers are divisible by 2 with no remainder, such as 0, 8, and -6. Odd integers include 1, 7, and -3. Zero counts as even, and negative integers follow the same parity rule as positive integers.

If you only need the classification, the IF wrapper is convenient. If another formula needs a logical result, such as TRUE or FALSE, use ISEVEN on its own. You can also use the result as a condition in other formulas, rather than turning it into a label.

Enter the formula and fill it down a column

For a typical list, put numbers in column A and labels in column B. For example, if A2 contains 14, enter =IF(ISEVEN(A2),"Even","Odd") in B2; the result in B2 is Even. Then select B2 and drag the small square at the lower-right corner of the cell down the column, or copy B2 and paste it into the destination cells. Each row will check its matching value in column A.

Before applying a formula to a long range, check a few known examples. Include an even number, an odd number, zero if it can occur in your data, and any boundary values that matter. If the output is wrong, confirming the cell reference and the underlying value is often quicker than rewriting the formula.

You can also start typing the formula directly into the cell or the formula bar. Google Sheets may suggest function names as you type. After entering it, press Enter. If your spreadsheet uses a locale that expects semicolons instead of commas between function arguments, follow the separator style used by that spreadsheet.

Use MOD as an alternative parity test

Another way to test parity is to check the remainder after division by 2. MOD returns a remainder, so a remainder of zero means the value is even. For example, with 15 in A2, =IF(MOD(A2,2)=0,"Even","Odd") returns Odd. With 14 in A2, it returns Even.

For a regular even-or-odd label, ISEVEN is more direct and makes the intent clear. MOD can be useful when the remainder itself matters or when you are building a more general rule, such as checking divisibility by 3 or 5. The same approach works for other divisors: compare MOD of the value and divisor with zero to test whether the value is evenly divisible.

Do not confuse checking for an even number with rounding to an even number. ISEVEN tests the input according to its function behavior; it does not modify or round the value displayed in the source cell. If your task is to round values, choose a rounding function based on the required result rather than using an even-number test.

Handle blank cells, decimals, and unusual inputs

A blank input deserves a decision of its own. Since a blank should not necessarily be reported as even or odd, you can test for it before calling ISEVEN. If A2 is blank, =IF(A2="","",IF(ISEVEN(A2),"Even","Odd")) leaves the result cell blank; if A2 contains 14, it displays Even. The first IF checks for an empty cell or a formula result that is an empty string, then only runs the parity test when there is something to classify.

Pay special attention to decimals. Google Sheets’ ISEVEN documentation specifies that a non-integer value is truncated to an integer for the test. Thus, if A2 contains 4.8, =IF(ISEVEN(A2),"Even","Odd") returns Even because the value is truncated to 4 for this check. If your data is supposed to contain whole-number counts, that behavior may be acceptable; if decimal inputs should be rejected or flagged, add a separate validation or integer check instead of assuming ISEVEN will identify them as invalid.

Text, errors, and imported data can also cause surprises. A value that looks like a number may have been imported as text, or a cell may contain an error from another formula. Check the source cell’s contents and formatting, and try a small hand-entered integer in a nearby cell to determine whether the issue is with the formula or the source data. Don’t silently convert questionable data if its meaning matters; confirm how it should be treated.

Count or highlight even values

Once a column contains labels, you can count how many are Even. Suppose A2:A6 contains 14, 15, 0, 22, and 3, and B2:B6 contains the matching labels made by the IF formula. In C2, =COUNTIF(B2:B6,"Even") returns 3, because 14, 0, and 22 are even. COUNTIF counts cells in the label range that match the specified criterion.

You can also highlight even numbers without adding a label column. Select the range A2:A100, then choose Format > Conditional formatting. In the conditional-formatting panel, set the rule to Custom formula is and enter =ISEVEN(A2). With 14 in A2 and 15 in A3, the rule applies the chosen format to A2 but not A3. Because the reference is relative, the rule evaluates each cell in the selected range against its own value. Choose a fill or text style and click Done.

For a row-based highlight, use a dollar sign to keep the tested column fixed while allowing the row number to adjust. For example, with numbers in column A and the range A2:D100 selected, a custom formula of =ISEVEN($A2) highlights each row whose column A value is even. The dollar sign before A fixes the column; leaving the row number relative lets Sheets test A2, A3, A4, and so on as it formats successive rows.

Common formula problems and their fixes

  • The result is always Odd or Even: Check whether every formula points to the intended input cell. A copied formula can refer to the wrong column if the original reference was incorrect.
  • A blank row gets a label: Add the blank-cell guard shown above, especially if the formula has been filled down farther than the data.
  • A decimal is classified unexpectedly: Remember that ISEVEN truncates non-integers for the test. Decide whether to accept that behavior or explicitly flag decimal values.
  • The formula shows an error: Check that the parentheses are balanced, the function names are spelled correctly, and the spreadsheet’s locale accepts the argument separators you entered.
  • A custom format does not follow the values: Check that the selected range starts on the same row referenced in the custom formula. For A2:A100, use a reference starting with A2.

Another common misunderstanding is that an even-looking decimal, such as 6.0, must be treated differently from 6. In a numeric cell, 6.0 is the number six, so it is even. The displayed number format can hide or show decimal places, but formatting alone does not change the stored numeric value.

Google Sheets and Excel: what is different?

The IF, ISEVEN, MOD, and COUNTIF formulas described here are standard functions supported by both Google Sheets and Excel. The basic formulas use the same function names and familiar comma-separated arguments in many spreadsheet locales. Locale settings can affect separators in either product, so an imported or region-specific spreadsheet may show a different argument separator.

The main distinction in this guide is the interface: the conditional-formatting path Format > Conditional formatting is for Google Sheets. Excel has its own conditional-formatting controls and ribbon paths, so do not expect the Google Sheets menu names to match there. If you are collaborating in a Google Sheets file, use its browser interface and check that collaborators can see the resulting labels or formatting rather than relying on an Excel-only menu instruction.

Frequently Asked Questions

What is the formula for even or odd in Google Sheets?
Use =IF(ISEVEN(A2),"Even","Odd") when the number is in A2. It returns Even for even values and Odd for odd values. Replace A2 with the cell you want to test.

Does Google Sheets have an ISEVEN function?
Yes. ISEVEN returns TRUE for an even value and FALSE for an odd value. Put it inside IF when you want a readable text label instead of a logical result.

How do I leave the result blank when the input is blank?
Check the input first with a formula such as =IF(A2="","",IF(ISEVEN(A2),"Even","Odd")). This avoids displaying a label for an empty input cell.

Does ISEVEN work with decimal numbers?
Yes, but Google Sheets truncates a non-integer value to an integer for the ISEVEN test. For example, 4.8 is tested as 4 and therefore returns TRUE. Add a separate check if decimals should be considered invalid.

How can I highlight even numbers automatically?
Select the range, choose Format > Conditional formatting, select Custom formula is, and enter a relative-reference rule such as =ISEVEN(A2) when the selected range begins at A2. Pick a formatting style and click Done.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.