What is a digit sum?
The digit sum of a number is what you get by adding its digits together once. For 12345 that's 1 + 2 + 3 + 4 + 5 = 15. The number's value doesn't matter, only the digits it's written with, which is why the digit sum of 12345 and 54321 is the same.
For the single-digit result obtained by repeatedly adding the digits, use our Digital Root Calculator.
What digit sums are used for
- Divisibility by 3 and 9: a number is divisible by 3 if its digit sum is divisible by 3, and by 9 if its digit sum is divisible by 9. 12345 has a digit sum of 15, which is divisible by 3 but not 9 — and so is 12345 itself.
- Checking arithmetic: "casting out nines" uses digit sums to catch mistakes in hand calculations without redoing them.
- Checksums: ISBNs, credit card numbers, and many barcodes use checksum algorithms based on their digits to detect certain typing or scanning errors.
- Puzzles and coursework: digit sums appear constantly in number theory exercises and competition maths.
Digit sum of very large numbers
Adding the digits of a 50-digit number is awkward with a standard calculator because many calculators cannot represent such a large integer exactly. This calculator works directly from the digits you enter rather than relying on the number's stored numeric value. This calculator works from the digits you typed rather than from the number's value, so numbers up to 1000 digits can be processed without losing integer precision.
Frequently asked questions
What's the difference between a digit sum and a digital root?
A digit sum adds the digits once. A digital root keeps going until only one digit is left. For 12345 the digit sum is 15, and adding again gives 1 + 5 = 6, which is the digital root. If the digit sum already has one digit, the two are the same number.
Can I enter a negative number?
Yes, but the minus sign is ignored. Digit sums are defined on the digits themselves, so −12345 and 12345 both give 15. The calculator tells you when it has ignored a sign rather than dropping it silently.
Why can't I enter a decimal?
Because there's no single agreed answer for one. Some definitions count the digits after the decimal point, some don't, and the divisibility rules that make digit sums useful only apply to whole numbers. Rather than pick a convention silently, the calculator asks for an integer.