Loading...
April 7, 2026 at 7:15
English

Kaprekar Constant 6174: The Mysterious Number Every 4-Digit Number Reaches

What Is the Kaprekar Constant 6174?

The other day I found myself thinking about the Kaprekar constant again.

6174 is the Kaprekar constant. From any four-digit number — as long as not all its digits are identical — you can always reach 6174 by repeating a simple procedure no more than 7 times.

The Kaprekar procedure works like this: take a number, arrange its digits in descending order, then arrange the same digits in ascending order, and subtract the second from the first.

Seeing the Kaprekar Constant in Action: A Step-by-Step Example

Try it with your birth year, your PIN, the famous number 1729, or any four-digit number you like. Here’s how it plays out:

Step 1: 1729 → 9721 − 1279 = 8442
Step 2: 8442 → 8442 − 2448 = 5994
Step 3: 5994 → 9954 − 4599 = 5355
Step 4: 5355 → 5553 − 3555 = 1998
Step 5: 1998 → 9981 − 1899 = 8082
Step 6: 8082 → 8820 − 0288 = 8532
Step 7: 8532 → 8532 − 2358 = 6174

It always ends at 6174. Seven steps is the maximum — and in nearly half of all cases, four steps are enough.

Beyond 4 Digits: Where the Kaprekar Constant Gets Complicated

But the truly interesting part lies elsewhere. The behavior of this procedure looks almost chaotic once you start generalizing.

For three-digit numbers, there is an analogous fixed point: 495, toward which all three-digit numbers converge. But for numbers with more digits, such constants — values where the Kaprekar procedure loops back on itself — either don’t exist at all, or there are several of them with no single attractor.

An Open Question in Number Theory

The picture becomes genuinely complex when you move beyond base 10 and consider arbitrary number bases combined with arbitrary digit counts. There is no general answer yet for when a Kaprekar constant exists and what it equals. At least, not yet.

It’s fairly straightforward to prove why the procedure works, why 6174 is the unique fixed point for four digits, and how to find 495 for three-digit numbers. What’s hard — and fascinating — is understanding what we’re really looking at: a curious coincidence, or the shadow of some deeper theorem we haven’t reached yet.

What’s your favorite four-digit number?

keyboard_arrow_up