THE SHORT ANSWER

For an integer written in base ten, only its final digit determines parity. Everything before that digit contributes a multiple of ten.

The rule

An integer written in decimal notation is odd if its final digit is 1, 3, 5, 7, or 9. It is even if the final digit is 0, 2, 4, 6, or 8. This is the divisibility-by-two test listed in Hartnell College’s number theory material.

For 72,419, inspect the 9. For 72,418, inspect the 8. Reading the other digits is optional if parity is the only question.

Why earlier digits cannot affect the result

Take a nonnegative integer and separate its final digit from the preceding digits. You can write the number as 10q + d, where q is an integer and d is its final digit.

For example, 72,419 = 10 × 7,241 + 9. The first part, 10 × 7,241, is even because ten contains a factor of two. Adding an even number preserves parity, so the entire number has the same parity as 9.

More formally, if d = 2r + 1, then 10q + d = 2(5q + r) + 1, which is odd. If d = 2r, then 10q + d = 2(5q + r), which is even.

For a negative integer, apply the argument to its magnitude. Changing the sign does not change divisibility by two.

Leading zeros and very long numbers

Leading zeros leave an integer’s value unchanged: 00073 represents 73 and is odd. They do not move the last digit. Similarly, a decimal integer with hundreds of digits still obeys the same test.

Software can preserve those digits as text, validate the entire input, and then inspect the final digit. Validation matters: the string hello7 ends with an odd digit but is not a decimal integer. The shortcut saves arithmetic, not the obligation to read the input correctly.

Three tempting shortcuts that fail

Adding digits is useful for certain other divisibility tests, but it does not determine parity. The odd integer 17 has digit sum 8, while the even integer 12 has digit sum 3.

A decimal point changes which shortcut applies. The value 7.0 is odd despite its last displayed zero; rewrite it as the integer 7 first.

Base also matters. In base three, 11 means four in decimal, so an ending 1 does not imply an odd value. The binary version works because two, like ten, is even.

Use ordinary decimal integer notation in the calculator. For exact inputs beyond JavaScript’s usual integer range, see large-integer parity.

Sources & further reading

Want to check a number?Try the calculator ↗