'Ghost number' 6174: Meet Dattatreya Ramchandra Kaprekar, the Indian schoolteacher who discovered a mysterious 4-digit number that almost always returns to itself

Independence Day 2026: Dattatreya Ramchandra Kaprekar, an Indian schoolteacher, discovered the intriguing number 6174. This constant emerges from a simple four-digit number rearrangement process. Repeatedly applying this mathematical routine alway...

TOI-Online

​The Indian mathematician who discovered a ‘ghost number’ that always returns to itself

Independence Day 2026: India has produced mathematicians whose ideas have travelled far beyond classrooms and laboratories. Among them was Dattatreya Ramchandra Kaprekar, a schoolteacher from Maharashtra whose fascination with numbers led to the discovery of one of mathematics' most intriguing constants: 6174.

Known today as Kaprekar's constant, 6174 has a remarkable property. When a simple mathematical process is repeatedly applied to almost any four-digit number whose digits are not all identical, the calculation eventually reaches 6174. Once it arrives there, the same process produces 6174 again and again.

Read more - In 2008, Spain began filling 300-metre-deep coal mine with 547 billion litres of water; four years later, the site looked nothing like it once did


Kaprekar's story is particularly striking because his mathematical work was largely carried out independently while he worked as a schoolteacher. His discoveries show how careful observation and curiosity can uncover fascinating patterns hidden in everyday numbers.

Who Was Dattatreya Ramchandra Kaprekar?

Dattatreya Ramchandra Kaprekar was born in 1905 and worked primarily as a schoolteacher in Maharashtra. He was particularly interested in the patterns and properties of numbers and spent much of his time experimenting with numerical operations.

Read more - 79 years ago, a man who had never visited India & knew little about its complex landscape drew a line that divided India and Pakistan
ADVERTISEMENT

Unlike many prominent mathematicians, Kaprekar did not work within a major university or research institution. He also did not hold a doctoral degree. Much of his research was therefore conducted independently, with his investigations often centred on simple numerical patterns rather than highly abstract mathematical theories.

His approach was straightforward but remarkably observant. By experimenting with numbers and recording what happened after different operations, Kaprekar uncovered several unusual properties that later attracted international attention.

What Is Kaprekar's Constant 6174?

The number 6174 is known as Kaprekar's constant because of the unusual way it behaves under a particular digit-rearrangement process.

The process is simple. Start with almost any four-digit number, provided that all four digits are not identical. Rearrange its digits to create the largest possible number and then rearrange them to create the smallest possible number. Subtract the smaller number from the larger one.
ADVERTISEMENT

The resulting number is then put through exactly the same process again.

After repeating the calculation, the result eventually reaches 6174. In at most seven iterations, the process arrives at the constant for the eligible four-digit starting numbers.
ADVERTISEMENT

How Does The 6174 Number Trick Work?

The Kaprekar routine can be demonstrated with a simple example.

Take the four-digit number 3524.

Arrange its digits in descending order:

5432

Now arrange them in ascending order:

2345

Subtract:

5432 - 2345 = 3087

Repeat the process with 3087:

8730 - 0378 = 8352

Again:

8532 - 2358 = 6174

The fascinating part comes next. Apply the same process to 6174:

7641 - 1467 = 6174

The answer remains 6174.

That is why the number is described as a fixed point of the process. Once the calculation reaches it, it does not move away.

Why Is 6174 Sometimes Called A Ghost Number?

The phrase "ghost number" is used to describe the mysterious behaviour associated with 6174. The number appears repeatedly when the Kaprekar routine is applied to suitable four-digit numbers.

It does not matter which eligible four-digit number is selected as the starting point. After a series of calculations, the process converges on the same number.

The result is particularly fascinating because the calculation itself is extremely simple. There are no complicated formulas involved. The mystery comes from the consistency of the outcome.

Dattatreya Kaprekar's Discovery Came From Simple Number Experiments

Kaprekar's work was driven by experimentation with numbers. Rather than beginning with an elaborate theoretical framework, he looked for unusual patterns produced by basic arithmetic operations.

His investigation of four-digit numbers eventually revealed the behaviour associated with 6174. The discovery demonstrates how mathematical patterns can emerge from processes that appear almost trivial at first glance.

Kaprekar's method also reflects an important principle in mathematics: repeatedly applying a simple rule can produce an unexpectedly structured result.

Kaprekar Was A Schoolteacher, Not A University Mathematician

One of the most interesting aspects of Kaprekar's life was his position outside mainstream academic mathematics.

He worked primarily as a schoolteacher and pursued mathematics independently. His research did not initially receive the same level of recognition as work produced within established academic institutions.

Some of his investigations were regarded as recreational mathematics because they focused heavily on numerical curiosities and patterns. However, the originality of his observations eventually attracted wider interest.

How Martin Gardner Helped Bring Kaprekar's Work To The World

Kaprekar's discoveries gained international visibility after Martin Gardner discussed his work in Scientific American during the mid-1970s.

Gardner was widely known for popularising mathematical ideas and puzzles for a broad readership. His discussion of Kaprekar's work helped introduce the Indian mathematician's numerical discoveries to an international audience.

The Kaprekar constant 6174 subsequently became a popular subject in mathematical puzzles, educational material and discussions involving numerical algorithms.

Kaprekar Numbers And Other Mathematical Discoveries

Kaprekar's work was not limited to 6174. He also investigated numbers that later became known as Kaprekar numbers.

One commonly cited example is 45. When 45 is squared, the result can be divided into parts that add back to the original number. This type of numerical property became an important part of Kaprekar's investigations.

He also explored self numbers, another category of numbers connected to digit-based operations.

Together, these investigations reveal Kaprekar's broader interest in transformations involving the digits of numbers and the patterns produced when simple mathematical operations are repeated.

Why Kaprekar's Constant Is Important In Mathematics

The importance of 6174 goes beyond its novelty. The Kaprekar routine provides an accessible example of several important mathematical ideas.

It demonstrates iteration, where the same operation is repeatedly performed on a result. It also demonstrates convergence, where repeated calculations eventually approach or reach a stable result.

These concepts are relevant to areas beyond recreational mathematics, including algorithmic thinking and computer science. A simple Kaprekar routine can also be translated into a computer programme, making it an easy way for students to understand loops and repeated operations.

Why Students Still Find The 6174 Mystery Fascinating

The Kaprekar constant is particularly useful as a teaching example because almost anyone can perform the calculation with pen and paper.

Students can choose a four-digit number, rearrange its digits, subtract the two values and repeat the process. The fact that different starting numbers eventually lead to the same result makes the exercise feel almost like a mathematical puzzle.

It can therefore introduce learners to ideas such as patterns, algorithms, iteration, fixed points and convergence without requiring advanced mathematics.

Dattatreya Ramchandra Kaprekar's Lasting Legacy

Kaprekar’s legacy shows that you don’t always need complicated equations or fancy equipment to make an interesting mathematical discovery. Sometimes, all it takes is curiosity and a willingness to keep experimenting with simple numbers.

The story of Dattatreya Ramchandra Kaprekar and the mysterious 6174 continues to fascinate students, mathematicians and number enthusiasts because the process is so simple, yet the result is surprisingly consistent.

From working as a schoolteacher in Maharashtra to gaining recognition for his unique discoveries, Kaprekar’s journey is a great reminder that sometimes, simply being curious and asking “what happens if I try this?” can lead to something truly fascinating.

The Mystery Of 6174 In One Simple Process

The famous Kaprekar routine can be remembered in four steps:

  • Choose a four-digit number in which the digits are not all identical.
  • Arrange the digits from largest to smallest.
  • Arrange them from smallest to largest and subtract the smaller number from the larger one.
  • Repeat the process until the result becomes 6174.
Once 6174 appears, the calculation returns to 6174 again.


Inputs from TOI
Download
The Economic Times Business News App
for the Latest News in Business, Sensex, Stock Market Updates & More.
Download
The Economic Times News App
for Quarterly Results, Latest News in ITR, Business, Share Market, Live Sensex News & More.
READ MORE
ADVERTISEMENT

READ MORE:

LOGIN & CLAIM

50 TIMESPOINTS

More from our Partners

Loading next story
Business News › News › Trending › 'Ghost number' 6174: Meet Dattatreya Ramchandra Kaprekar, the Indian schoolteacher who discovered a mysterious 4-digit number that almost always returns to itself
Text Size:AAA
Success
This article has been saved

*

+