Palindrome Number Checker

Instantly test if a number is a palindrome and see it reversed.

How it is calculated

The tool works on the digit string you type, so there is no overflow or rounding for ordinary whole numbers: up to 200 digits are checked exactly. It drops a leading plus or minus sign and any leading zeros, writes the remaining digits, reverses that string and compares the two. Identical gives Yes, otherwise No, and the reversed string is shown too, keeping zeros that land at the front (1210 reverses to 0121). There is no formula beyond digit reversal. A number with a fractional part, such as 12.21, shows no result, while a whole value written with a decimal point (12.0) is read as 12. Text, spaces and separators, as in 12/02/2021 or 12 321, also show no result.

Worked example

Test the number 1210. Its digits are 1, 2, 1, 0. Read from the right they are 0, 1, 2, 1, so the reversed string is 0121. Compare it with the original 1210: the first and last positions differ (1 against 0), so the answer is No. For 12321 the reverse is 12321 itself, so the answer is Yes. A trailing zero always breaks the match, because the zero that moves to the front has no counterpart at the start of the original.

Try this example →

Common mistakes

  • Assuming a number ending in zero can be a palindrome. 1210 reverses to 0121, and since a number is not written with leading zeros, the answer is No. Only 0 itself qualifies.
  • Typing a decimal such as 12.21 and expecting the dot to be checked. A number with a fractional part gives no result; enter whole numbers only.
  • Expecting a minus sign to make the test fail. The sign is ignored, so -121 is tested as 121 and gives Yes.
  • Typing leading zeros, as in 0121, and expecting them to count. They are stripped first, so 0121 is tested as 121 and gives Yes.
  • Pasting a date with separators like 12/02/2021 or a number with spaces. Type the digits only, such as 12022021.

About this calculator

A palindromic number reads identically forwards and backwards — 121, 3773 and 12321 are palindromes, while 123 and 1210 are not. Checking for one is a simple but classic exercise: reverse the digits of the number and compare the result to the original.

Palindrome checks show up constantly in programming interviews and introductory computer-science courses as a first exercise in string and number manipulation, and the underlying idea extends to real problems like detecting palindromic substrings in DNA sequences, validating certain checksum and ID formats, and recreational number theory questions such as finding palindromic primes or the smallest number that becomes a palindrome after repeated digit-reversal-and-addition (the “196 algorithm” problem). Palindromic dates and years — like 12/02/2021 — are also a small pop-math curiosity that number-checkers like this one are often used to verify.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators