Discover the Mystery of $6174
Enter any 4-digit number (with at least two distinct digits), and watch the routine collapse it to 6174 in 7 steps or fewer.
Path to $6174
The Magic Worked!
No matter which valid number you choose, Kaprekar's routine will always converge to $6174.
How Does It Work?
Discovered in 1949 by Indian mathematician D. R. Kaprekar, the number $6174 is a mathematical black hole known as Kaprekar's Constant.
The Rules of the Routine:
- Pick any 4-digit number that has at least two different digits (e.g. 3524).
- Arrange the digits in descending order to get the largest possible number (5432).
- Arrange the digits in ascending order to get the smallest possible number (2345).
- Subtract the smaller number from the larger one (5432 - 2345 = 3087).
- Repeat the process with the new result.
Why does it always reach 6174?
There are only 8,991 valid four-digit combinations. Because sorting digits groups numbers into a smaller set of difference patterns, the subtraction chain quickly funnels every single starting number into a closed loop that leads directly to 6174 within a maximum of 7 steps.
Once you hit 6174, the process gets locked in a permanent loop:
9741 - 1479 = 6174