Digit Sum Calculator

Enter a whole number to get its digit sum, digital root, digit count, and a quick divisibility-by-3/9 check.

Quick Facts

Digit sum
Add every digit together
e.g. digit sum of 48729 is 4+8+7+2+9 = 30.
Digital root
1 + (n − 1) mod 9
Keep summing digits until one digit remains.
Divisibility rule
Digit sum ÷ 3 or ÷ 9
A number is divisible by 3 (or 9) exactly when its digit sum is.

Your Results

Calculated
Digit Sum
-
Sum of all digits
Digital Root
-
Repeated digit sum (single digit)
Number of Digits
-
Digit count
Divisibility
-
By 3 and by 9

Ready

Enter a whole number, then press Calculate.

Frequently Asked Questions

What is the digit sum of a number?
The digit sum is the total you get by adding up every digit in a number. For example, the digit sum of 48729 is 4 + 8 + 7 + 2 + 9 = 30.
What is a digital root and how is it different from a digit sum?
The digital root is what you get by repeating the digit-sum process until only one digit remains. For 48729, the first digit sum is 30, and summing again (3 + 0) gives a digital root of 3. A number's digital root equals 1 + (n − 1) mod 9 for any positive n, and is always between 0 and 9.
How does digit sum test divisibility by 3 or 9?
A whole number is divisible by 3 exactly when its digit sum is divisible by 3, and divisible by 9 exactly when its digit sum is divisible by 9. For 48729, the digit sum is 30, which is divisible by 3 (30/3 = 10) but not by 9, so 48729 is divisible by 3 but not by 9.
Does digit sum work for negative numbers or decimals?
Yes. The sign and decimal point are ignored, and only the digit characters (0-9) are added together, since digit sum and digital root are defined on the sequence of digits, not on the number's magnitude or sign.

How the Digit Sum Calculator works

The digit sum of a whole number is simply the total you get by adding up each of its digits. For example, the digit sum of 48729 is 4 + 8 + 7 + 2 + 9 = 30. This calculator also finds the digital root — the result of repeating the digit-sum process until only a single digit remains — along with the number's digit count and a quick check for divisibility by 3 and 9.

Formula and method

For a number with digits d₁, d₂, …, dₙ, the digit sum is D = d₁ + d₂ + … + dₙ. If D has more than one digit, the digital root is found by repeating the same process on D until a single digit remains. There is a shortcut: for any positive integer n, the digital root equals 1 + (n − 1) mod 9, and it is always a value from 0 to 9. This works because 10 ≡ 1 (mod 9), so every power of 10 also leaves a remainder of 1 when divided by 9, which means a number and its digit sum always share the same remainder mod 9.

Common sources of error

  • Confusing digit sum with digital root: the digit sum of 999 is 27, while its digital root (summing again, 2+7=9) is 9 — they are only the same value when the digit sum is already a single digit.
  • Including the sign or decimal point: digit sum is defined on the digit characters only — a minus sign or decimal point contributes nothing to the total.
  • Assuming a digit sum of 0 is invalid: the digit sum (and digital root) of 0 is 0, which is a legitimate result, not an error.

Checking your result

A fast sanity check: the digital root must always be a single digit from 0 to 9, and it must equal the number itself mod 9 (using 9 instead of 0 for positive multiples of 9). If your digit sum reduces to something outside 0-9 after one more pass, re-add the digits. You can also verify divisibility separately — for example, 48729 has digit sum 30, which is divisible by 3 but not by 9, so 48729 should divide evenly by 3 but leave a remainder when divided by 9.

Applications

Digit sums and digital roots show up in mental-math divisibility tests (casting out nines), checksum and check-digit validation (such as ISBN and credit-card checks), numerology, and as a classroom introduction to modular arithmetic. They are also a quick way to verify manual arithmetic — recomputing a sum's digit sum mod 9 can catch simple addition or transcription errors.