Kaprekar Number Checker
Term
- A Kaprekar number reproduces itself when its square is split into two parts that add back to the original number: square it, split the square, and check the sum.
- Here n = 45, so n squared is 2,025, which has 4 digits against the 2 digits of n.
- Splitting 2,025 into a left part of 20 and a right part of 25 (the right part keeps 2 digits, leading zeros allowed, but it may not be zero).
- The sum of the parts is 20 + 25 = 45, so 45 is a Kaprekar number.
A Kaprekar number is a number that squares, splits and recombines to itself. The classic case is 45: 45^2 = 2,025, and 20 + 25 = 45. This Kaprekar number calculator checks whether any number you enter has that property and tells you plainly whether it is a Kaprekar number or not. It also shows you the square, the split and the sum, so you can see exactly where the answer comes from. The key rule is that the split is made so the right part keeps as many digits as the original number. For example, 297 is a Kaprekar number: 297^2 = 88,209, and 88 + 209 = 297. But 50 is not one: 50^2 = 2,500 splits as 25 and 00, and the right part may not be zero.
The method behind the calculator is the accepted standard for this kind of calculation because it follows the definition exactly: square the number, split the square so the right part has as many digits as the original, then add the parts and compare the total to the original number. That is the same rule used in the worked examples above, including the zero-part restriction that rules out 50. Kaprekar numbers are named after the Indian mathematician D. R. Kaprekar, and the test is applied the same way for every number. On this page you will find the formula, step-by-step workings, worked examples and sources, so you can follow each result rather than just take it on trust.
Worked examples
45, the classic Kaprekar number
(45)
| Kaprekar verdict for n | Kaprekar number |
| n squared | 2,025 |
| Split parts (left, right) | 20 and 25 |
| Sum of the parts | 45 |
297, a three-digit Kaprekar number
(297)
| Kaprekar verdict for n | Kaprekar number |
| n squared | 88,209 |
| Split parts (left, right) | 88 and 209 |
| Sum of the parts | 297 |
50, not Kaprekar
(50)
| Kaprekar verdict for n | Not a Kaprekar number |
| n squared | 2,500 |
| Split parts (left, right) | 25 and 0 |
| Sum of the parts | 25 |
The square-split-sum test
The square-split-sum test is the rule behind every answer a Kaprekar number calculator gives. To apply it, you square the number, cut the square into two parts, add those parts together, and see whether the sum returns to the number you started with. If it does, the number is a Kaprekar number. If it does not, it is not. The whole method rests on one detail: the split is made so the right part keeps as many digits as the original number. That single rule decides where the cut falls, and it is the step people most often get wrong when they try the test by hand.
Walk through 45. First square it: 45^2 = 2,025. The original number, 45, has two digits, so the right part of the split must keep two digits. That puts the cut between the 20 and the 25, giving 20 and 25. Now add the two parts: 20 + 25 = 45. The sum matches the original number, so 45 passes the square-split-sum test and is a Kaprekar number. Notice that the split was not a free choice — the two-digit rule forced it to fall exactly there.
The same test works the same way on larger numbers. Take 297, which has three digits. Square it: 297^2 = 88,209. Because the original has three digits, the right part must keep three digits, so the split is 88 and 209. Adding them gives 88 + 209 = 297, which matches the original, so 297 is a Kaprekar number as well. The procedure never changes: square, split by the digit-count rule, add, and compare.
The test also shows why some numbers fail. Consider 50. Its square is 50^2 = 2,500. Following the two-digit rule for the right part, the split is 25 and 00. The sum is 25 + 0 = 25, not 50 — but there is a more basic problem. The right part may not be zero. A split that leaves the right side as 00 does not qualify, so 50 is not a Kaprekar number, no matter how the addition comes out. This zero restriction is part of the test, not an afterthought, and it is why a checker must apply the digit-count rule and the nonzero rule together.
These numbers are named after the Indian mathematician D. R. Kaprekar. Running the square-split-sum test on any number is all a Kaprekar number calculator does: it squares the input, splits the square so the right part has as many digits as the input, rejects any split whose right part is zero, adds the parts, and compares the sum to the input. Work 45 through it once and the logic is clear — 2,025 becomes 20 and 25, and 20 + 25 = 45.
Checking larger numbers
Once you move past two-digit examples, the arithmetic behind a Kaprekar number calculator stays the same, but the splitting step is where most mistakes happen. The rule is fixed: square the number, then split the square so that the right part keeps as many digits as the original number had. Add the two parts back together. If the total equals the number you started with, it is a Kaprekar number. The table below works two cases step by step — one that passes and one that fails.
Take 297. Squaring it gives 88,209. Because 297 has three digits, the right part of the split must keep three digits, so 88,209 separates into 88 on the left and 209 on the right. Adding them, 88 + 209 = 297, which matches the original number exactly. That makes 297 a Kaprekar number. Notice that the split is not a simple halving of the digits: the right part is sized to match the original number, and whatever digits remain go on the left. This is the part of the process that trips people up when they check by hand, and it is the part a kaprekar number calculator handles for you.
Now take 50. Squaring it gives 2,500. Since 50 has two digits, the right part keeps two digits, giving 25 and 00. Adding 25 + 00 = 25, which is not 50, so 50 fails. There is a second reason it fails as well: the right part may not be zero. A split that leaves 00 on the right does not count, even if the addition happened to work out. That rule matters for numbers ending in zeros, where the square naturally produces trailing zeros that land in the right-hand part.
The same two rules cover every case you are likely to test. First, size the right part to the digit count of the original number, padding with leading zeros inside that part if the square is short on digits. Second, reject any split where the right part is zero. Work through those two checks in order and the pass-or-fail result follows directly from the addition. Larger numbers simply mean longer squares and longer parts, not a different method. The approach is the one used by D. R. Kaprekar, the Indian mathematician after whom these numbers are named.
- Square the number first, then split the result — never the other way around.
- The right part must keep as many digits as the original number had.
- If the right part of the split is zero, the number is not a Kaprekar number.
- Add the two parts; the number passes only if the sum equals the original.
| Number | Square | Split (left + right) | Sum | Kaprekar? |
|---|---|---|---|---|
| 297 | 88,209 | 88 + 209 | 297 | Yes |
| 50 | 2,500 | 25 + 00 | 25 | No — right part is zero |
The rules that catch people out
Most people who try a Kaprekar number calculator for the first time get the splitting right and the padding wrong. The rule that trips them up is the fixed width of the right part: when you split the square, the right part must keep as many digits as the original number. The original number's digit count sets the size of the right-hand piece, and the left part takes whatever is left over. If the square is too short to fill that width, you pad the right part with leading zeros rather than letting it shrink.
The clean examples hide this because the digits happen to line up. Take 45: 45^2 = 2,025, and the original has two digits, so the right part is the last two digits, 25, and the left part is 20. Then 20 + 25 = 45, so it qualifies. Take 297: 297^2 = 88,209, and the original has three digits, so the right part is the last three digits, 209, and the left part is 88. Then 88 + 209 = 297, so 297 qualifies too. In both cases the square had enough digits to give the right part its full width without any padding, which is exactly why these examples feel easy.
Now look at 50, the case that catches people out. 50^2 = 2,500. The original has two digits, so the right part must be two digits wide: it is 00. The left part is 25. You might be tempted to say 25 + 00 = 25 and move on, or to treat the right part as simply nothing. But a right part of zero is not allowed, so 50 does not qualify. The zero rule is not a technicality bolted on afterward; it is part of the definition, and it removes a whole family of near-misses where the square ends in a run of zeros.
The fixed-width rule and the zero rule work together, and that pairing is where most errors come from. If you split the square at the wrong point, or drop leading zeros from the right part, you can talk yourself into a false positive or dismiss a genuine Kaprekar number. The safest habit is to write the square out in full, count the digits of the original number, mark off exactly that many digits from the right, and only then add the two pieces. If the marked-off piece is all zeros, stop: the number fails.
These numbers are named after the Indian mathematician D. R. Kaprekar, and the definition above is the one worth applying consistently. A quick check with a kaprekar number calculator is a good way to confirm your hand work, but the reasoning is what makes the answer trustworthy: fixed width on the right, no zero right part, and the two pieces added back together.
- Count the digits of the original number first; that count is the required width of the right part.
- Pad the right part with leading zeros if the square is too short to fill that width.
- If the right part is zero, as with 50^2 = 2,500 splitting into 25 and 00, the number is not a Kaprekar number.
- Add the left and right parts only after the split is made at the correct fixed width.
Not the Kaprekar routine
The name Kaprekar attaches to more than one idea in number theory, and the two are easy to confuse. This page and the kaprekar number calculator on it deal with Kaprekar numbers: numbers that square, split, and recombine to give themselves back. A separate idea, the Kaprekar routine, is a different procedure entirely, and it has its own page on this site. Keeping the two apart matters, because a number can behave in one setting without behaving in the other.
A Kaprekar number works like this. You square it, then split the square into two parts so that the right part keeps as many digits as the original number. If the left part and the right part add up to the original number, it is a Kaprekar number. The examples make the rule concrete. Take 45: 45^2 = 2,025, and 20 + 25 = 45, so 45 qualifies. Take 297: 297^2 = 88,209, and 88 + 209 = 297, so 297 qualifies too. The digit count on the right side is fixed by the size of the original number, not chosen freely, which is why the split lands where it does.
The routine is a different animal. It is an iteration: you take a number's digits, rearrange them into the largest and smallest values they can form, subtract the smaller from the larger, and repeat with the result. Run that process long enough on suitable inputs and it settles on a fixed constant rather than returning the starting number. Nothing about squaring, splitting, or recombining enters into it. So when someone asks whether a number "is Kaprekar," the answer depends on which Kaprekar idea they mean, and the two answers need not agree.
The zero rule is a good place to see how precise the number definition is. Consider 50: 50^2 = 2,500. Split so the right part has as many digits as the original number, and you get 25 and 00. Those add to 25, not 50, so 50 fails. But there is a second reason it fails: the right part may not be zero. That restriction is part of the definition, not an afterthought, and it keeps the family of Kaprekar numbers from being padded with trivial cases. A checker that ignores the rule would misclassify numbers, which is why the split has to be made exactly as described, with the right part holding as many digits as the original number.
Both ideas carry the name of the Indian mathematician D. R. Kaprekar, which is part of why they get mixed up in casual reading. If you arrived looking for the digit-rearranging iteration and its fixed constant, the dedicated page on this site covers it. If you arrived with a number in hand and want to know whether its square splits and recombines to itself, this page and its checker are the right tool.
FAQs
What is a Kaprekar number?
A Kaprekar number is a number whose square can be split into two parts that add back to the original number. The example 45 shows the idea: 45 squared is 2,025, and splitting it gives 20 and 25, which sum to 45. The right part must be nonzero for the split to count.
Is 297 a Kaprekar number?
Yes, 297 is a Kaprekar number. Its square is 88,209. Splitting that square into 88 and 209 and adding the two parts gives 88 + 209 = 297, which is the original number. That confirms 297 passes the Kaprekar check.
Why is 50 not a Kaprekar number?
The square of 50 is 2,500. Splitting it into 25 and 00 gives a right part of zero, and a right part of zero is not allowed under the Kaprekar rule. So even though 25 + 00 equals 25, not 50, the split fails the definition anyway.
How wide is the right part?
The right part has as many digits as the original number itself has. For 297, that means 3 digits, so the square 88,209 splits as 88 and 209. The left part takes whatever digits remain, which can be fewer digits or even zero.
Is 1 a Kaprekar number?
Yes, 1 is a Kaprekar number, though trivially. Its square is 1, which splits as 0 and 1, and those parts sum to 1. Because the right part is 1, not zero, the split is allowed, so 1 satisfies the Kaprekar definition.
Who was Kaprekar?
Kaprekar refers to Dattatreya Ramchandra Kaprekar, the Indian schoolteacher who described these numbers. The Kaprekar routine is also named after him. His name is attached both to the numbers covered on this page and to the separate routine that bears his name.