About the Digit Sum Calculator
This digit sum calculator adds up the digits of a whole number of any length — 987654321 has digit sum 45 — and keeps reducing until a single digit remains, which is the digital root. It also gives the product of the digits, the alternating digit sum used in the divisibility test for 11, the digit count, and the additive and multiplicative persistence.
Students use digit sums for divisibility rules (a number is divisible by 3 or 9 exactly when its digit sum is), teachers use them for number-sense puzzles, and checksums such as “casting out nines” rely on digital roots to catch arithmetic mistakes. Numerology fans also use the digital root of dates and names.
Paste numbers with commas, spaces or a decimal point — only the digits 0–9 are counted, so 1,234.5 is treated as the digits 1 2 3 4 5. Numbers up to 1,000 digits long are handled exactly, with no rounding.
With the default inputs, the digit sum is 45. Change any value above to recalculate instantly.
How to use the digit sum calculator
- 1Type or paste the number — commas and spaces are ignored.
- 2Read the digit sum and the digital root.
- 3Check the notes to see whether the number is divisible by 3, 9 or 11.
- 4Look at the reduction table to follow each digit-sum step.
Formula and method
The digit sum S(n) simply adds every decimal digit. Repeating the process until one digit remains gives the digital root. Because 10 ≡ 1 (mod 9), every number leaves the same remainder as its digit sum when divided by 9, which is why the digital root equals n mod 9 (with 9 instead of 0 for non-zero multiples of 9) and why the 3 and 9 divisibility rules work.
The alternating sum (units − tens + hundreds − …) uses 10 ≡ −1 (mod 11): a number is divisible by 11 exactly when its alternating sum is. Additive persistence counts how many digit-sum steps are needed to reach one digit; multiplicative persistence does the same with the product of digits.
- dᵢ
- The i-th decimal digit
- S(n)
- Digit sum of n
- dr(n)
- Digital root (repeated digit sum)
Worked examples
All nine digits: 987654321
9 + 8 + … + 1 = 45, and 4 + 5 = 9, so the digital root is 9 and the number is divisible by 9. The digit product is 9! = 362,880, and the alternating sum 1 − 2 + 3 − 4 + 5 − 6 + 7 − 8 + 9 = 5.
A year: 2026
2 + 0 + 2 + 6 = 10, then 1 + 0 = 1, so the digital root is 1 (2026 = 9 × 225 + 1). The zero digit makes the digit product 0.
Twelve nines
Twelve 9s add to 108, then 1 + 0 + 8 = 9. The alternating sum is 0, so the number is divisible by 11, and the digit product is 9¹² = 282,429,536,481.
Multiplicative persistence of 77
Digit sums: 77 → 14 → 5. Digit products take longer: 77 → 49 → 36 → 18 → 8, four steps, so the multiplicative persistence is 4.
Frequently asked questions
What is the digit sum of a number?+
It is the total of all its digits. For 4,725 the digit sum is 4 + 7 + 2 + 5 = 18. Repeating the process (1 + 8 = 9) gives the digital root.
How do you find the digital root quickly?+
Take the number modulo 9. If the remainder is 0 and the number is not zero, the digital root is 9; otherwise it is the remainder. For example 2026 mod 9 = 1, so its digital root is 1.
Why does the digit sum test divisibility by 3 and 9?+
Every power of 10 leaves remainder 1 when divided by 9 (and by 3), so a number and its digit sum leave the same remainder. If the digit sum is divisible by 9 or 3, so is the number.
What is casting out nines?+
It is an old check for arithmetic: replace each number by its digital root, do the same operation, and compare with the digital root of your answer. A mismatch proves a mistake, although a match does not guarantee the answer is right.
What is the divisibility rule for 11?+
Alternately subtract and add the digits starting from the units digit. If that alternating sum is divisible by 11 (including 0), the number is divisible by 11. For 918,082: 2 − 8 + 0 − 8 + 1 − 9 = −22, so it is divisible by 11.