🔢 Digit Sum Calculator
By ToolNimba Math Team · Updated 2026-06-19
Enter a whole number to add up its digits. Negatives use the absolute value.
This digit sum calculator adds up the individual digits of a whole number, then keeps summing until a single digit remains to give you the digital root. Type any integer, large or small, positive or negative, and you will instantly see the digit sum, the digital root, and how many digits the number has. Because the maths is done digit by digit on the text you enter, even a number with hundreds of digits is summed exactly with no rounding.
What is the Digit Sum Calculator?
The digit sum of a number is simply the total you get by adding its decimal digits together. For 12345 that is 1 + 2 + 3 + 4 + 5 = 15. The order of the digits does not matter, and any zeros add nothing, so 1000 and 1 have the same digit sum of 1. A negative sign is not a digit, so this tool ignores it and works from the absolute value: the digit sum of -4096 is the same as the digit sum of 4096.
The digital root takes the idea one step further. If the digit sum has more than one digit, you sum its digits again, and you repeat until a single digit (0 to 9) is left. For 12345 the digit sum is 15, and 1 + 5 = 6, so the digital root is 6. There is a neat shortcut: for any positive number the digital root equals 1 + ((n - 1) mod 9), which always lands between 1 and 9, while the digital root of 0 is 0. This is the same as the remainder when the number is divided by 9, except that a remainder of 0 corresponds to a digital root of 9.
This link to division by 9 is why digit sums power the old checking trick known as casting out nines. A number is divisible by 9 exactly when its digit sum is divisible by 9, and divisible by 3 when the digit sum is divisible by 3. Accountants and students once used the digital root to spot arithmetic slips, since the digital root of a correct sum or product must match the digital root worked out from the inputs. Today digit sums still appear in checksums, recreational maths puzzles, and numerology.
When to use it
- Quickly testing whether a number is divisible by 3 or 9 by checking its digit sum.
- Computing the digital root for a numerology reading or a recreational maths puzzle.
- Sanity-checking a long addition or multiplication using the casting-out-nines method.
- Summing the digits of very large numbers, such as an account or ID number, where a normal calculator would lose precision.
How to use the Digit Sum Calculator
- Type or paste a whole number into the input box.
- Read the digit sum (all digits added together) in the first result panel.
- Read the digital root (digits summed repeatedly down to one digit) in the second panel.
- See how many digits the number has in the third panel, and the full working below.
Formula & method
Worked examples
Find the digit sum and digital root of 12345.
- Add the digits: 1 + 2 + 3 + 4 + 5 = 15
- The digit sum 15 has two digits, so sum again: 1 + 5 = 6
- 6 is a single digit, so the digital root is 6
Result: Digit sum 15, digital root 6, 5 digits
Find the digit sum and digital root of 9999.
- Add the digits: 9 + 9 + 9 + 9 = 36
- Sum again: 3 + 6 = 9
- Check with the shortcut: 1 + ((9999 - 1) mod 9) = 1 + (9998 mod 9) = 1 + 8 = 9
Result: Digit sum 36, digital root 9, 4 digits
Find the digit sum and digital root of -4096.
- Ignore the minus sign and use 4096
- Add the digits: 4 + 0 + 9 + 6 = 19
- Sum again: 1 + 9 = 10, then 1 + 0 = 1, so the digital root is 1
Result: Digit sum 19, digital root 1, 4 digits
Digit sum and digital root for a range of numbers
| Number | Digit sum | Digital root |
|---|---|---|
| 7 | 7 | 7 |
| 19 | 10 | 1 |
| 100 | 1 | 1 |
| 12345 | 15 | 6 |
| 9999 | 36 | 9 |
| 1000000 | 1 | 1 |
Digital root as the divisibility test for 9 (the mod-9 pattern)
| Number divided by 9 | Remainder | Digital root |
|---|---|---|
| 18 (= 9 x 2) | 0 | 9 |
| 20 | 2 | 2 |
| 27 (= 9 x 3) | 0 | 9 |
| 46 | 1 | 1 |
| 100 | 1 | 1 |
Common mistakes to avoid
- Confusing the digit sum with the digital root. The digit sum can have many digits (for example 9999 sums to 36). The digital root is what you get after summing repeatedly until only one digit is left, so for 9999 it is 9, not 36. They match only when the digit sum is already a single digit.
- Counting a minus sign or decimal point as a digit. Only the digits 0 to 9 are added. A leading minus sign is ignored and the absolute value is used. This tool works on whole numbers, so a decimal point is not accepted.
- Forgetting that the digital root of a multiple of 9 is 9, not 0. The shortcut uses 1 + ((n - 1) mod 9), so numbers divisible by 9 give a digital root of 9. Only the number 0 itself has a digital root of 0.
- Including thousands separators as significant. Commas, spaces and underscores are stripped before summing, so 1,234 and 1234 give the same result. They are formatting, not digits.
Glossary
- Digit
- A single symbol from 0 to 9 that makes up a decimal number.
- Digit sum
- The total found by adding all the decimal digits of a number together.
- Digital root
- The single-digit value reached by repeatedly summing the digits of a number until one digit remains.
- Casting out nines
- A checking method that uses digit sums and digital roots to detect errors in arithmetic.
- Modulo (mod)
- The remainder left after dividing one whole number by another; n mod 9 is the remainder when n is divided by 9.
Frequently asked questions
What is the digit sum of a number?
The digit sum is the total you get by adding all of a number's decimal digits. For example, the digit sum of 12345 is 1 + 2 + 3 + 4 + 5 = 15. Zeros add nothing, and the order of the digits does not change the result.
What is a digital root?
The digital root is the single digit you reach by summing a number's digits over and over until only one digit is left. For 12345 the digit sum is 15, and 1 + 5 = 6, so the digital root is 6. Every positive number has a digital root from 1 to 9, while the digital root of 0 is 0.
How do you calculate the digital root quickly?
Use the shortcut 1 + ((n - 1) mod 9) for any number n greater than 0, which always gives a value from 1 to 9. This is the same as the remainder when n is divided by 9, except that a remainder of 0 means the digital root is 9. The digital root of 0 is simply 0.
How does this tool handle negative numbers?
A minus sign is not a digit, so it is ignored and the absolute value is used. The digit sum and digital root of -4096 are therefore the same as those of 4096: a digit sum of 19 and a digital root of 1.
Can it handle very large numbers?
Yes. The digits are added straight from the text you enter rather than from a stored number, so there is no floating-point limit. You can sum a number with hundreds of digits and the result will still be exact.
What is the digit sum used for?
Digit sums give quick divisibility tests: a number is divisible by 3 when its digit sum is, and by 9 when its digit sum is divisible by 9. They also power the casting-out-nines check for arithmetic, and appear in checksums, puzzles and numerology.