Skip to content
OneKitly

Casting Out Nines Cannot See a Swapped Pair of Digits

Published 10/21/2026 · 3 min read · Everyday calculators

Antonio Delgado

Antonio Delgado — Traditions & pastimes writer at OneKitly

Symbolism · Calendars

Checked against 2 sources

View profile →
In short

The digit sum of 12345 is 15, and adding again gives the digital root, 6. That root is the remainder on division by nine, with nine standing in for zero — 12345 leaves 6 when divided by 9, and so does its root. The relationship survives addition and multiplication, which is what makes casting out nines a real check: work out the roots of your operands, do the same arithmetic on those single digits, and if the answer disagrees with the root of your result, something is wrong. What it cannot do is notice reordering. Swap two digits to get 21345 and the sum is still 15, the root is still 6, and the check passes on a number that is wrong by nine thousand.

Advertisement

12345 and 21345 both have a digit sum of 15 and a digital root of 6. That blind spot is exactly why real check digits weight the positions instead.

Why nine and not some other number

Because ten leaves a remainder of one when divided by nine, and so does every power of ten. That means a digit in the hundreds column contributes the same remainder as the same digit standing alone, and the whole number's remainder collapses into the sum of its digits. The trick is therefore a property of writing numbers in base ten, not of numbers themselves: in base sixteen the same argument makes fifteen the magic number, and in base two it makes one. Three inherits the property because it divides nine, which is why the digit sum tests divisibility by three as well.

What a real check digit does differently

Transpositions are among the commonest mistakes a person makes when copying a number, so any scheme that ignores them is unfit for account numbers, barcodes or identifiers. The fix is to multiply each position by a different weight before adding, which makes the sum depend on order: the checksum on a bank account number, the one on a book's identifier and the one on a payment card all do this, differing mainly in the weights and the modulus. Casting out nines survives as a hand-arithmetic sanity check, where its weakness matters less than the fact that it can be done in your head in two seconds.

Digit sum
Digit sums, roots and remainders
NumberDigit sumDigital rootRemainder mod 9
12,3451566
21,3451566
9,8763033
123,456,7894590

Worked with our own calculator

Digit sum calculator

Given

Number
12,345

Result

Digit sum
15
Digital root
6

These figures are produced by the calculator below, not typed in by hand — they are recomputed whenever the tool changes.

Run it on your own figures →
Advertisement

Frequently asked questions

Why is the digital root of 123456789 nine and not zero?
Because the digital root is defined to stay in the range one to nine, so a multiple of nine gets nine rather than zero. Its remainder on division by nine really is zero, and the two conventions describe the same fact from opposite ends. When the root is used as an arithmetic check the difference never matters, since both sides of the comparison use the same convention; when it is fed into a formula that expects a remainder, it does matter, and nine has to be mapped back to zero. Keeping the two ideas separate in your head is the whole difficulty here.
Can the check ever pass on a wrong answer?
Routinely — it misses roughly one wrong answer in nine, because an error that happens to be a multiple of nine leaves the root unchanged. Transposing two digits is the commonest way that happens, since the difference between the two numbers is always a multiple of nine, but any slip of nine, ninety or nine hundred does the same. The check is therefore one-sided: a failure proves a mistake, a pass proves nothing. That asymmetry is worth stating plainly, because a test that catches eight errors in nine feels far more conclusive than it is when it comes back clean.

Articles you may find interesting

All guides →

Related tools

Sources

Spotted a mistake in this article?