How to read your 495 result
What the calculator shows
Each row sorts your three digits into the largest and smallest possible numbers and subtracts. The result becomes the next input. The routine stops at 495, because 954 − 459 = 495. No valid three-digit input needs more than six iterations.
Why the middle digit does not matter
For sorted digits a ≥ b ≥ c the difference is (100a + 10b + c) − (100c + 10b + a) = 99(a − c). The middle digit cancels completely, so the first result can only be one of nine values: 099, 198, 297, 396, 495, 594, 693, 792 or 891. Inputs whose largest and smallest digits differ by 5, such as 950 or 761, reach 495 in a single step.
How many steps to expect
Across the 990 valid three-digit inputs, 149 reach 495 in one step, 144 in two, 270 in three, 222 in four, 150 in five and 54 in six. The average is about 3.24 iterations, noticeably shorter than for four digits.
A connection with the 1089 trick
The same multiples of 99 appear in a famous party trick: reverse a three-digit number, subtract, reverse the answer and add, and the result is always 1089. Read how the 1089 trick works, or compare the three-digit routine with other digit lengths.