Skip to content
Omnikalc

Digital root calculator: digit sum and quick divisibility tests

Enter a whole number to get its digit sum, its digital root, the number of digits and the remainders that show whether it divides by 3, 9 or 11.

Updated on
Your inputs

Value out of range

Results

Digital root

9

Digit sum
45
Number of digits
9
Remainder when divided by 9
0
Divisible by 9 and by 3
Alternating digit sum (from the right)
5
Remainder when divided by 11
5
Not divisible by 11

The digital root of a number is the single digit reached by adding its digits again and again. The digital root calculator takes a whole number and gives the digital root, the digit sum, the number of digits and the remainders when divided by 9 and 11, which are the quick tests for divisibility by 3, 9 and 11.

How the calculation works

  • Add the digits of the number. The result is the digit sum. For 123456789 it is 1 + 2 + … + 9 = 45.
  • Repeat the addition until a single digit remains. That digit is the digital root: 45 → 4 + 5 = 9. A shortcut is 1 + (n − 1) mod 9, and the root of 0 is 0.
  • The remainder when divided by 9 equals the remainder of the digit sum, so a number is divisible by 9 when its digit sum is, and by 3 when the digit sum is divisible by 3.
  • The alternating sum adds and subtracts the digits from the right (ones − tens + hundreds …). A number is divisible by 11 when this sum is divisible by 11.

Example

The number 123,456,789 has 9 digits and a digit sum of 45. Adding 4 + 5 gives a digital root of 9, so the number is divisible by 9 and by 3, with a remainder of 0. The alternating sum is 9 − 8 + 7 − 6 + 5 − 4 + 3 − 2 + 1 = 5, so the remainder when divided by 11 is 5 and the number is not divisible by 11.

Why it matters

Digit sums give quick checks without a calculator: whether a number divides by 3 or 9, whether a long addition or multiplication is plausible, and whether a number could be the result of a calculation. They are also a classic way to teach modular arithmetic.

Good to know

The digital root is the remainder modulo 9 in disguise, so it cannot tell numbers apart that differ by a multiple of 9. A match in casting out nines does not prove the answer right. Numbers up to ten digits are accepted, and zero has a root of zero. Negative numbers have the same root as their absolute value.

The EAN check digit calculator uses another weighted digit sum to catch typing errors in barcodes, and the GCD and LCM calculator finds common divisors.

Frequently asked questions

What is a digital root?

It is the single digit you get by adding the digits of a number again and again until only one is left. The root of 38 is 3 + 8 = 11, then 1 + 1 = 2. Except for zero, the root is always between 1 and 9, and it equals the number's remainder modulo 9, with 9 used in place of 0.

How does casting out nines work?

To check a sum or product, replace each number by its digital root, do the same operation on the roots, and compare it with the root of your answer. If they differ, the answer is wrong. If they match, the answer may be right, since the test misses some errors, such as swapped digits.

Why do the digits tell you about divisibility by 9?

Because 10 leaves a remainder of 1 when divided by 9, each power of 10 does too. So a number leaves the same remainder as the sum of its digits. The same argument works for 3. For 11 the powers of 10 alternate between 1 and −1, which gives the alternating sum.

Is there a limit on the size of the number?

The calculator handles whole numbers up to 9,999,999,999, which has 10 digits. For larger numbers, split the number into groups of digits and add the digit sums of the groups, since the digital root follows the same rule.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.