Loading Calculator...
Please wait a moment
Please wait a moment
Calculate the sum of all digits in a number, find the digital root (repeated sum until a single digit remains), and understand divisibility rules through digit analysis.
Enter a number to calculate its digit sum
Type any integer (positive or negative) in the input field. The calculator works with numbers of any size and automatically uses the absolute value for digit analysis.
The calculator shows the sum of all digits (digit sum) and the digital root (the single digit obtained by repeatedly summing digits until only one digit remains).
Review the divisibility analysis to see if your number is divisible by 3 or 9, based on the digit sum. This uses important divisibility rules from number theory.
S(n) = d₁ + d₂ + ... + dₖ
Sum all digits of n. Example: S(345) = 3 + 4 + 5 = 12
DR(n) = iterative S(n) until single digit
Keep summing digits until one remains. Example: DR(345) = DR(12) = 3
DR(n) = 1 + ((n-1) mod 9)
Quick formula for digital root. Example: DR(38) = 1 + (37 mod 9) = 1 + 1 = 2
n ≡ 0 (mod 3) ⟺ S(n) ≡ 0 (mod 3)
n divisible by 3 ⟺ digit sum divisible by 3
n ≡ 0 (mod 9) ⟺ S(n) ≡ 0 (mod 9)
n divisible by 9 ⟺ digit sum divisible by 9
n ≡ S(n) (mod 9)
A number and its digit sum have the same remainder when divided by 9
| Number | Digit Sum | Digital Root | Div by 3? | Div by 9? |
|---|---|---|---|---|
| 12 | 3 | 3 | ✓ | ✗ |
| 27 | 9 | 9 | ✓ | ✓ |
| 123 | 6 | 6 | ✓ | ✗ |
| 456 | 15 | 6 | ✓ | ✗ |
| 789 | 24 | 6 | ✓ | ✗ |
| 999 | 27 | 9 | ✓ | ✓ |
| 1234 | 10 | 1 | ✗ | ✗ |
| 5678 | 26 | 8 | ✗ | ✗ |
| 9999 | 36 | 9 | ✓ | ✓ |
| 12345 | 15 | 6 | ✓ | ✗ |
A digit sum is the result of adding all the digits in a number together. For example, the digit sum of 345 is 3 + 4 + 5 = 12. It's also called the 'sum of digits' and is used in various mathematical applications including divisibility tests and check digit algorithms.
A digital root is the single digit obtained by repeatedly summing the digits of a number until only one digit remains. For example, 345 → 3+4+5 = 12 → 1+2 = 3, so the digital root is 3. It's related to the number's remainder when divided by 9.
A number is divisible by 3 if and only if its digit sum is divisible by 3. Similarly, a number is divisible by 9 if and only if its digit sum is divisible by 9. For example, 123 has digit sum 6, which is divisible by 3, so 123 is divisible by 3 (123 ÷ 3 = 41).
Yes! Digital roots provide a quick way to check arithmetic. The digital root of a sum equals the digital root of the sum of digital roots. For example, to check if 234 + 567 = 801 is correct, verify that DR(234) + DR(567) = DR(801): 9 + 9 = 18 → 9, and DR(801) = 9. ✓
Digital roots cycle through 1-9 repeatedly. For any integer n, the digital root equals 1 + ((n-1) mod 9), except DR(0) = 0. This means the digital root is always between 1 and 9 for positive integers, creating a repeating pattern: 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9...
Digit sums appear in many practical applications: (1) Check digits in credit cards, ISBNs, and barcodes (Luhn algorithm). (2) Casting out nines - an ancient error-checking method. (3) Numerology and recreational mathematics. (4) Computer science - hash functions and checksums. (5) Mental math tricks for quick divisibility testing.
Digit sums and digital roots have been used for thousands of years, dating back to ancient India where the technique called "casting out nines" was used to check arithmetic calculations. This method relies on the mathematical property that a number and its digit sum are congruent modulo 9.
The digital root has remarkable properties: it always equals 1 + ((n-1) mod 9) for any positive integer n. This creates a repeating cycle of 1 through 9. Digital roots are used in numerology, recreational mathematics, and even in some programming contexts for hash functions.