Digit Sum — Definition, Formula & Examples
Digit sum is the result you get when you add up all the individual digits of a number. For example, the digit sum of 274 is 2 + 7 + 4 = 13.
Given a non-negative integer with decimal representation , the digit sum of is defined as , where each .
Key Formula
Where:
- = The digit sum of the number n
- = The digit in the i-th place of n (ones, tens, hundreds, etc.)
How It Works
To find a digit sum, write out the number and add each digit from left to right. For 582, compute . Sometimes you need the repeated digit sum (also called the digital root), where you keep summing the digits of the result until you reach a single digit: . Digit sums power two key divisibility rules: a number is divisible by 3 if its digit sum is divisible by 3, and divisible by 9 if its digit sum is divisible by 9.
Worked Example
Problem: Find the digit sum of 4,938 and determine whether the number is divisible by 9.
Identify the digits: The digits of 4,938 are 4, 9, 3, and 8.
Add the digits: Sum all four digits together.
Apply the divisibility rule: Check whether 24 is divisible by 9. Since remainder , the digit sum 24 is not divisible by 9.
Answer: The digit sum of 4,938 is 24, so 4,938 is not divisible by 9 (but it is divisible by 3, since 24 ÷ 3 = 8 with no remainder).
Why It Matters
Digit sums give you a fast mental shortcut for checking divisibility by 3 and 9 without performing long division. This technique appears frequently in middle-school number theory problems and math competitions, and accountants historically used a related method called "casting out nines" to catch arithmetic errors.
Common Mistakes
Mistake: Confusing the digit sum with the digital root and stopping too early or going too far.
Correction: The digit sum is the result of adding the digits once (e.g., for 99 it is 18). The digital root repeats the process until a single digit remains (18 → 9). Know which one a problem is asking for.
