Kaprekar's routine and the number 6174
Answer in short
Kaprekar's routine: take a 4-digit number whose digits are not all the same, make the largest and the smallest numbers from its digits, and subtract. Repeat with the answer. You always reach 6174, the Kaprekar constant, within 7 rounds, and it then repeats because 7641 − 1467 = 6174. For 3-digit numbers the routine reaches 495.
Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play
Who was Kaprekar?
D. R. Kaprekar was a mathematics teacher in a government school in Devlali, Maharashtra. He loved playing with numbers and found many beautiful patterns in them. In 1949 he discovered a surprising property of 4-digit numbers, now known as Kaprekar’s routine.
The routine, step by step
- Take a 4-digit number with at least two different digits.
- Arrange its digits to make the largest number. Call it A.
- Arrange the same digits to make the smallest number. Call it B.
- Subtract: C = A − B.
- Repeat the steps with C.
The book’s example starts with 6382: 8632 − 2368 = 6264, then 6642 − 2466 = 4176, then 7641 − 1467 = 6174. Here is the year 2026:
Why does it stop at 6174?
Once you reach 6174, the largest number from its digits is 7641 and the smallest is 1467, and 7641 − 1467 = 6174 again. So the routine keeps giving 6174 for ever. This number is called the Kaprekar constant. Every 4-digit number whose digits are not all the same reaches it, in at most 7 rounds.
Numbers with a zero
When a 0 is one of the digits, keep it as a leading digit in the smallest number, as Kaprekar did. From 2, 0, 2 and 6, the smallest arrangement is 0226, and from 5, 0, 8 and 5 it is 0558. In the same way, if a difference comes out with only three digits, such as 999, treat it as 0999 and continue: 9990 − 0999 = 8991.
This matters. If you insist on the smallest 4-digit arrangement (5058 instead of 0558), you usually still reach 6174, but the number of rounds can change, and numbers such as 1000 or 1011 break down: 1011 gives 1110 − 1011 = 99 and gets stuck. NCERT’s answer key uses the 4-digit way, so for 5683 it counts 8 rounds instead of 7.
How many rounds?
| Start | Rounds | Chain |
|---|---|---|
| 6382 | 3 | 6264, 4176, 6174 |
| 2026 | 6 | 5994, 5355, 1998, 8082, 8532, 6174 |
| 5683 | 7 | 5085, 7992, 7173, 6354, 3087, 8352, 6174 |
| 2014 | 7 | 4086, 8172, 7443, 3996, 6264, 4176, 6174 |
Try your own year of birth: most numbers need between 3 and 7 rounds.
3-digit numbers: 495
The same steps with 3-digit numbers lead to 495, which then repeats: 954 − 459 = 495. For example, starting with 908: 980 − 089 = 891, 981 − 189 = 792, 972 − 279 = 693, 963 − 369 = 594, 954 − 459 = 495.
Playing with the largest and smallest
Pratibha makes the largest and smallest 4-digit numbers from 4, 7, 3 and 2: 7432 and 2347. Their difference is 5085 and their sum is 9779. Other digits give other results: from 9, 8, 1 and 0, the largest and smallest 4-digit numbers are 9810 and 1089, with difference 8721 (more than 5085), while 1, 2, 3 and 4 give 4321 + 1234 = 5555 (less than 9779).
For another number pattern, read palindromic numbers, or see a famous unsolved one in the Collatz conjecture. For the textbook’s questions, see the Chapter 3 NCERT solutions; for the whole chapter, see the Chapter 3 notes.
Practice
-
The largest and smallest numbers made from the digits of 4096 are:
Show answer
Answer: (a) 9640 and 0469
-
The Kaprekar constant for 4-digit numbers is:
Show answer
Answer: (b) 6174
-
For 3-digit numbers, Kaprekar's routine reaches:
Show answer
Answer: (a) 495
-
How many rounds does 2026 take to reach 6174?
Show answer
Answer: 6 rounds: 6220 − 0226 = 5994, 9954 − 4599 = 5355, 5553 − 3555 = 1998, 9981 − 1899 = 8082, 8820 − 0288 = 8532, 8532 − 2358 = 6174.
-
Why can 1111 not be used?
Show answer
Answer: All its digits are the same, so the largest and smallest numbers are both 1111 and the difference is 0. The routine needs at least two different digits.
Questions students ask
What is the Kaprekar constant?
6174. Take any 4-digit number with at least two different digits, subtract the smallest number made from its digits from the largest, and repeat with the answer. You always reach 6174, and 7641 − 1467 = 6174 keeps giving 6174.
Who was D. R. Kaprekar?
A mathematics teacher in a government school in Devlali, Maharashtra, who loved playing with numbers and found many patterns that nobody had noticed before. He discovered the 6174 routine in 1949.
How many rounds does 5683 take?
Keeping zeros as leading digits, 7 rounds: 5085, 7992, 7173, 6354, 3087, 8352, 6174. If you write the smallest number from 5, 0, 8, 5 as 5058 instead of 0558, as NCERT's answer key does, you get 8 rounds; both ways reach 6174.
Stuck on a question?
Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.
Get it on Google Play Open in browser
For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.