7641 − 1467 is 6174, which is where the routine stops

Kaprekar's constant: sort the digits down and up, subtract, and every four-digit number arrives here.

Arithmetic and functions · Level: Classic result · Updated on 2026-11-10

Take any four-digit number that does not have all four digits equal. Write its digits in descending order, then in ascending order, and subtract. Repeat. Within seven steps you reach 6174, and then you stay, because 6174 is exactly the number the routine produces from itself: 7641 − 1467 = 6174. The workbench prints that subtraction as 6174, and the interesting part is not the answer but the fact that there is only one place the process can end.

Three digits give the same phenomenon at 495 — starting from 732, the first iteration already lands there: 732 − 237 = 495. Two digits do not give a constant at all (9, 81, 63, 27, 45, 9, … cycles), and five or more digits give a small set of sinks rather than one. Kaprekar also has a family of numbers named after him for a different trick: 45² is 2025, and 20 + 25 = 45.

Answer

6174

How to read it

7641 − 1467, the fixed point of the four-digit routine. The second link is the three-digit constant, reached in one step from 732.

Source

D. R. Kaprekar, a schoolteacher from Devlali, on the four-digit routine in 1949; the three-digit constant 495 is the same construction

Work it in the calculator

These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.

This is an independent third-party tool site. It is not affiliated with, sponsored by, or authorised by Casio, Texas Instruments or their distributors. Model names and product names are trademarks of their respective owners and appear here only to identify devices.

The keystroke sequences in these manuals were written from this site's own layout data — the same data the online calculator renders — plus publicly available product facts. Specifications and regional configurations are confirmed against the physical device and the manufacturer's most recent material.