Kaprekar’s Constant 6174: How the Number Trick Works
Quick answer: Kaprekar’s constant is 6174. Take any four-digit number with at least two different digits, and always keep four digit positions (so 87 is written 0087). Arrange its digits in descending order and in ascending order, and subtract the smaller from the larger. Repeat. You always reach 6174 within at most 7 subtractions, and then you stay there, because 7641 − 1467 = 6174. Indian mathematician D. R. Kaprekar announced the result in 1949. For three-digit numbers with digits not all equal, the routine reaches 495.
Pick any four-digit number, like your birth year, as long as its digits are not all the same. Do one simple step over and over, and you will land on the same number every time: 6174. Indian schoolteacher and recreational mathematician D. R. Kaprekar found this in the 1940s and announced it at a mathematics conference in Madras in 1949.
Kaprekar’s Routine
- Take a four-digit number with at least two different digits (write leading zeros, so 87 is 0087).
- Arrange the digits in descending order to make the largest number, and in ascending order to make the smallest.
- Subtract: largest − smallest.
- Repeat with the result.
A Worked Example
| Step | Calculation | Result |
|---|---|---|
| 1 | \(5432 – 2345\) | 3087 |
| 2 | \(8730 – 0378\) | 8352 |
| 3 | \(8532 – 2358\) | 6174 |
| 4 | \(7641 – 1467\) | 6174 |
Starting from 3524, we reach 6174 in three subtractions (row 4 only shows what happens next). Once there, the routine is stuck: \(7641 – 1467 = 6174\). That makes 6174 a fixed point. Note that this calculation only shows what happens after you reach 6174; it does not by itself prove that every start gets there.
Try It With 2026
Starting from the year 2026:
\[ 2026 \to 6220 – 0226 = 5994 \to 9954 – 4599 = 5355 \to 5553 – 3555 = 1998 \]
\[ \to 9981 – 1899 = 8082 \to 8820 – 0288 = 8532 \to 8532 – 2358 = 6174. \]
That is 6 subtractions.
At Most 7 Steps
Count the starting number as step 0 and each subtraction as one step. Checking all 9,990 valid four-digit strings from 0000 to 9999 (everything except the ten repdigits like 3333) shows that every one reaches 6174 within 7 subtractions.
| Subtractions needed | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| Starting numbers | 1 | 383 | 576 | 2,400 | 1,272 | 1,518 | 1,656 | 2,184 |
Why does it work? Each result depends only on the digits, not their order, and the difference of a number and its reverse arrangement is always a multiple of 9. That shrinks the possible results to a small set of numbers, all of which funnel into 6174.
Why Digits Must Not All Be Equal
For 3333, the largest and smallest arrangements are the same, giving \(3333 – 3333 = 0\), and you get stuck at 0. These repdigits are the only exceptions.
Three Digits: 495
The same routine for three-digit numbers (not all digits equal, keeping three positions, so 99 becomes 099) always reaches 495, in at most 6 subtractions:
\[ 123 \to 321 – 123 = 198 \to 981 – 189 = 792 \to 972 – 279 = 693 \to 963 – 369 = 594 \to 954 – 459 = 495. \]
And \(954 – 459 = 495\) again. For two, five or six digits, the routine usually falls into a loop of several numbers rather than a single constant.
Try It Yourself
Use any four-digit number, such as your birth year, and count your subtractions. It is great arithmetic practice, and a nice surprise for students.
Common Misconceptions
“It works for any number of digits.” No. Only 3 digits (495) and 4 digits (6174) send every valid start to one single number. Other lengths can fall into cycles, and some have several fixed points (for six digits, both 549945 and 631764 are fixed).
“You can drop leading zeros.” No. After 3087 you must use 8730 and 0378; dropping the zero breaks the routine.
Watch: Kaprekar’s Constant in Video
If you learn better by watching, these videos are worth your time.
Check Your Understanding
Five quick questions to see how much of this has stuck. Pick an answer and press Submit; you will see a short explanation either way.
Answer each question and press Submit to see your result right away.
Frequently Asked Questions
What is Kaprekar’s constant?
6174. Repeatedly subtracting the smallest arrangement of a four-digit number’s digits from the largest always leads to 6174, unless all digits are equal.
How many steps does it take to reach 6174?
At most 7 subtractions for any four-digit start with at least two different digits. 2,184 of the 9,990 valid starts need all 7.
Who discovered Kaprekar’s constant?
Indian mathematician D. R. Kaprekar found it in the 1940s and announced it in 1949.
Does Kaprekar’s routine work with leading zeros?
Yes, and it needs them. Always keep four digits: after 3087, the next arrangement is 8730 and 0378. Dropping the zero changes the result.
Is there a Kaprekar constant for three digits?
Yes. For three-digit numbers with digits not all equal, the routine always reaches 495.
Keep Exploring
Sources and Further Reading
Related to This Article
More math articles
- How to Calculate Multiplication and Division of Decimals by Powers of Ten
- Comparing and Ordering Decimals for 4th Grade
- Roman Numerals Converter (Number ↔ Roman, Free)
- IV Flow Rate Calculator (mL/hr)
- Cake Pan Converter
- Standard, Formal English
- Bicameralism
- Can the CBEST Test be Waived?
- How to Solve Irrational Functions?
- 7 Best Headphones for Online Lessons


What people say about "Kaprekar’s Constant 6174: How the Number Trick Works - Effortless Math"?
No one replied yet.