← The 369 Rabbit Hole Tool 04

Kaprekar calculator · Steps shown

The 6174 Black Hole

Take any 4-digit number with at least two different digits, arrange the digits from high to low, subtract them arranged from low to high, and repeat: within 7 steps you always land on 6174, which gives back 6174 forever. It is called Kaprekar's constant, and the map shows all 9,990 numbers that fall into it.

The fall
·
Tap any dot to drop that number in
The countExact
  • Read as
  • Steps to 6174
  • Same count
  • Each step ÷ 9
Keep itFree

4K wallpaper of the map

The black hole with your number's fall drawn in, 2160 × 3840, sized for a phone screen.

Share

The link reopens this exact fall.

Made with the 6174 Black Hole · The 369 Rabbit Hole

How it works

Four digits, one way down

1. Sort, flip, subtract

Start with 3524. Its digits from high to low make 5432, from low to high 2345. 5432 − 2345 = 3087. Do the same to 3087: 8730 − 0378 = 8352. Then 8532 − 2358 = 6174. And 6174 is stuck: 7641 − 1467 = 6174 again. That is Kaprekar's routine, named after D. R. Kaprekar, the Indian mathematician who found it in 1949.

2. Keep the zeros

Every step keeps four digits. 2111 − 1112 = 0999, and the next step sorts 0, 9, 9, 9 into 9990 − 0999 = 8991. Drop the zero and you would wrongly get 999 − 999 = 0. Numbers shorter than four digits are read the same way, so 42 is 0042.

3. Why it can never take more than 7 steps

After the first subtraction, the answer depends only on how far apart the digits are, not on the digits themselves. With four digits there are only a few dozen possible gaps, so the first step squeezes 9,990 starting numbers down to 54 different answers. From there, every path runs downhill into 6174. Checking all of them by computer confirms the longest fall is 7 steps.

Reading the map

Every dot is one of the 9,990 numbers that work. They are laid out on a spiral, sorted by how many steps they need: 6174 sits in the center, the 383 numbers that need one step circle it, and the 2,184 slowest numbers make the outer ring. Your number's fall is drawn as a line jumping inward, one ring or more at a time, until it hits the center.

Where 9 comes in

A number and any shuffle of its digits leave the same remainder when divided by 9, so their difference always divides by 9 exactly. Every number on the way down is a multiple of 9, including 6174 = 9 × 686, whose digits add to 18 and then 9.

Real vs legend

What is math and what is story

ClaimStatus
Every 4-digit number with at least two different digits reaches 6174 in at most 7 steps.Real
6174 maps to itself: 7641 − 1467 = 6174.Real
Every Kaprekar difference is a multiple of 9, so 6174 has a digital root of 9.Real
3-digit numbers fall into 495 the same way, within 6 steps.Real
6174 = 2 × 3² × 7³, and it divides evenly by the sum of its digits (6174 ÷ 18 = 343).Real
6174 is a mystical, cosmic or sacred number.Legend
Tesla or ancient builders used 6174 as a secret key.No source

Questions

Kaprekar's constant FAQ

What is Kaprekar's constant?

6174. Take any 4-digit number that uses at least two different digits, arrange its digits from largest to smallest, subtract the same digits arranged from smallest to largest, and repeat. You always reach 6174, and 6174 gives back itself: 7641 − 1467 = 6174. The Indian mathematician D. R. Kaprekar found it in 1949.

How many steps does it take to reach 6174?

Never more than 7. Of the 9,990 numbers that work, 383 take 1 step, 576 take 2, 2,400 take 3, 1,272 take 4, 1,518 take 5, 1,656 take 6 and 2,184 take 7. 6174 itself takes 0.

Why does 1111 not reach 6174?

When all four digits are the same, both arrangements are equal and the first subtraction gives 0000, which stays 0000. That is why the rule needs at least two different digits. Only 10 numbers are like this: 0000, 1111 up to 9999.

What about numbers with a zero or fewer than 4 digits?

Keep four digits at every step by writing leading zeros. 2111 − 1112 = 0999, and the next step is 9990 − 0999 = 8991. If you drop the zero and treat it as 999, you get stuck at 0 and miss the rule.

Does it work for 3-digit numbers?

Yes. Every 3-digit number with at least two different digits reaches 495 within 6 steps. 2-digit numbers fall into a loop (09, 81, 63, 27, 45) instead of a single number. 5-digit and 7-digit numbers only fall into loops, and 6-digit numbers have two fixed points, 549945 and 631764.

Is 6174 connected to 3, 6 and 9?

Its digits add to 18, and 1 + 8 = 9. That is plain arithmetic: a number and any rearrangement of its digits leave the same remainder when divided by 9, so every Kaprekar difference is a multiple of 9. Any claim that 6174 is mystical or cosmic is legend, not math.

Put this tool on your site

Embed the black hole

Teachers and bloggers can drop the calculator and its map into any page. Paste this code where you want it to appear.