Most parity mistakes come from skipping the integer check or inspecting a changed representation. Start with an exact integer, then test divisibility by two.
Excluding zero or negative integers
Zero is even because 0 = 2 × 0. Negative integers also have parity: −15 is odd and −16 is even. The definitions use all integers, so neither positivity nor a physical pile of objects is required.
A reliable mathematical checkpoint is n = 2k + 1 for some integer k. For −15, k = −8 works. For zero, no integer value of k works.
Calling every non-even value odd
The odd/even split covers integers. It does not divide every possible value into two groups. The number 4.5 is neither odd nor even; a missing input is not an odd number either.
The notation 5.0 represents the integer 5, so its value is odd. Distinguish that mathematical fact from the calculator’s input format: enter 5, without a decimal point. See decimal values and parity for more examples.
Checking the wrong digit
For a decimal integer, use its final digit, not its first digit or digit sum. The integer 24 starts with an even digit and has even parity, but that coincidence does not establish a rule: 25 starts with the same digit and is odd.
The digit sum can mislead too. The odd integer 35 has the even digit sum 8. Adding digits answers certain other divisibility questions, not this one.
Assuming a remainder must equal one
JavaScript returns −1 for the remainder of a negative odd integer divided by two. Thus n % 2 === 1 handles positive odd values but misses their negative counterparts. MDN documents the sign convention.
For a validated integer, check n % 2 !== 0 instead. For BigInt, use n % 2n !== 0n. A nonzero remainder alone does not validate the input: fractions can also produce one.
Trusting digits after they were rounded
Converting a huge decimal integer into an imprecise numeric representation can change its final digit. Inspecting the rounded result does not establish the original value’s parity. Preserve the original digits as text or use an exact integer type; see large-integer parity.
Treating odd as a synonym for prime
The integers 9, 15, and 27 are odd and composite. Two is prime and even. Parity concerns divisibility by two; primality concerns all positive divisors. They are different jobs with a small shared vocabulary.
Before using the calculator, check three things: the value is an integer, the digits are exact, and the input uses decimal integer notation. After that, the final digit does the remaining work. There is no need to round, guess, or convene a committee.