Digit Sum Calculator

This digit sum calculator adds up all digits of a whole number: the digit sum of 123 is 1 + 2 + 3 = 6. It also shows the digital root and the alternating digit sum and tells you whether the number is divisible by 2 to 11.

Source: Wolfram MathWorld – Digit sum. Updated: .

whole number, up to 60 digits; thousands separators are fine
My ToolboxYour inputs are saved in this browser only.

Result

Digit sum
Digit sum of 123456789: 45
Steps
  • 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45
  • 4 + 5 = 9
Digital root
Adding the digits again and again until one digit is left gives 9.
Alternating digit sum
Added and subtracted alternately from the right: 5
Divisibility
DivisorDivisible?Rule
2NoLast digit is even
3YesDigit sum is divisible by 3
4NoLast two digits are divisible by 4
5NoLast digit is 0 or 5
6NoDivisible by both 2 and 3
7NoAdd and subtract groups of three digits from the right: the result is divisible by 7
8NoLast three digits are divisible by 8
9YesDigit sum is divisible by 9
10NoLast digit is 0
11NoAlternating digit sum is divisible by 11

How it is calculated

The digit sum of a number is the sum of its digits: 4,711 → 4 + 7 + 1 + 1 = 13. It is handy because dividing by 3 or by 9 leaves the same remainder for the number as for its digit sum.

Divisibility rules that use the digit sum

For 2, 4, 5, 8 and 10 the last one to three digits are enough. The rule for 7 is clumsier: take groups of three digits from the right and add and subtract them alternately, because 1001 = 7 · 11 · 13.

Digital root

If you keep taking the digit sum of the result until a single digit remains, you get the digital root: 123,456,789 → 45 → 9. It equals the remainder after division by 9 (a remainder of 0 is written as 9) and is the basis of casting out nines, a quick check for arithmetic.

Related tools: the prime factorization calculator, the GCD and LCM calculator and the fraction calculator, where divisibility rules help with simplifying.

Frequently asked questions

How do you calculate the digit sum?

Add all digits of the number one by one. Example: the digit sum of 2,026 is 2 + 0 + 2 + 6 = 10. If you like, repeat with the result until one digit is left (10 → 1).

How does the digit sum show that a number is divisible by 3?

If the digit sum is divisible by 3, the number is too. The digit sum of 7,482 is 21, and 21 is divisible by 3 – so 7,482 is as well (= 3 · 2,494).

What is the alternating digit sum?

You add and subtract the digits alternately, starting from the right. If the result is divisible by 11 (0 counts), the number is divisible by 11.

What is the digital root used for?

It gives the remainder of the number after division by 9. Casting out nines uses this to check calculations quickly.

Is there a limit on the number?

The tool is exact for up to 60 digits because it treats the number as a string of digits, not as a floating-point value.

Sources and legal basis

As of: · Editorial policy

Related tools