Kaprekar Calculator
The input must be a number between 1 and 9998, with at least two different digits; numbers are treated as 4 digits (e.g. 1 → 0001). More info
Steps to 6174
More Information
Kaprekar's constant, 6174, is a special number in mathematics discovered by the Indian mathematician D.R. Kaprekar. It is the result of an iterative process applied to most four-digit numbers: arrange the digits of the number in descending and ascending order to form the largest and smallest numbers, subtract the smaller from the larger, and repeat. After a few iterations (at most seven), the process converges to 6174, regardless of the starting number (provided the digits aren't all identical). This unique property makes 6174 a fascinating example of mathematical patterns and number theory.
See this Wikipedia article for a more detailed explanation.
