KAPREKAR.FUN

Sign up for Starlink and get €45

Fast, reliable internet at home and on the go. Sign up through our link and get €45 in cash or Starlink service credit. Terms apply.
Get €45

4-digit routine

6174 Explorer

Enter up to four digits. Leading zeroes are welcome—we’ll preserve them through every operation.

4/4

Result / 7910

7

iterations

Maximum path unlocked — the longest possible journey.

STEP 1

9710

− 0179

9531

STEP 2

9531

− 1359

8172

STEP 3

8721

− 1278

7443

STEP 4

7443

− 3447

3996

STEP 5

9963

− 3699

6264

STEP 6

6642

− 2466

4176

STEP 7

7641

− 1467

6174

7910 → 9531 → 8172 → 7443 → 3996 → 6264 → 4176 → 6174

How to read your 6174 result

What the calculator shows

Each row is one iteration of Kaprekar’s routine. The first value sorts your four digits from largest to smallest, the second sorts the same digits from smallest to largest, and their difference becomes the next row. The iteration count is the number of subtractions needed before the value stops changing. The default example, 7910, needs the maximum of seven steps.

Why your first result is a multiple of 9

With sorted digits a ≥ b ≥ c ≥ d, the first difference always equals 999(a − d) + 90(b − c). It depends only on two gaps between digits, so 9,990 valid inputs collapse into just 54 possible first results, all divisible by 9. The full argument is in why every number reaches 6174.

How many steps to expect

Three iterations is the most common outcome (2,400 inputs), the average is about 4.67 and 2,184 inputs need all seven. Numbers such as 0014, 0025 and 7910 take the longest route. See the complete distribution on the statistics page.

Leading zeroes and repdigits

A shorter result is padded on the left, so 999 continues as 0999 and the next subtraction is 9990 − 0999 = 8991. Dropping the zero would turn the experiment into the three-digit routine. Inputs made of one repeated digit, such as 3333, subtract to 0000 and stay there instead of reaching 6174.

Read the complete method →See how results are verified →

Sign up for Starlink and get €45

Fast, reliable internet at home and on the go. Sign up through our link and get €45 in cash or Starlink service credit. Terms apply.
Get €45
KAPREKAR.FUN

A playground for curious numbers.

info@kaprekar.fun