Plain digit sum
Add the digits once: S(98,765) = 35.
Digit sum, digital root and the 3 and 9 divisibility test for any number in bases 2–36.
Enter your values below to get started.
A number is divisible by 9 exactly when its digit sum is divisible by 9; the same rule works for 3.
The digital root equals 1 + (n − 1) mod 9 for any positive whole number n.
Paste huge numbers such as 2100 or 100! in full: the calculator reads digits as text, so nothing is rounded.
Pick Sum of 1 to N to total the digit sums of every number from 1 to N in one step.
A digit sum calculator adds the individual digits of a number, so 98,765 gives 9 + 8 + 7 + 6 + 5 = 35. Enter any whole number, a number with up to 100,000 digits, or a number in base 2 to 36 to get the digit sum, the digital root, the 3 and 9 divisibility test, a digit-by-digit table, or the total of all digit sums from 1 to N.
A digit sum is the total you get by adding every digit of a number. The digit sum of 4,739 is 4 + 7 + 3 + 9 = 23, and the digit sum of 1,000,000 is 1.
Mathematicians write the digit sum as S(n) or s10(n), where di is the digit in position i and k is the number of digits. The German word for the digit sum is Quersumme. The digit sum depends on the base: 13 has a digit sum of 4 in base 10 but 3 in base 2, where 13 is written 1101.
Adding the digits again until one digit remains gives the digital root. For 4,739: 23 → 2 + 3 = 5, so the digital root is 5.
The digit sum calculator reads your number as text, converts each character to its digit value, adds the values and repeats the addition until one digit is left. Reading the number as text means a 31-digit value such as 2100 = 1,267,650,600,228,229,401,496,703,205,376 keeps every digit and returns the exact digit sum of 115.
Spaces, commas and underscores are removed; a minus sign or decimal point is noted and ignored.
Every character must be a valid digit in the chosen base, for example 0–1 in binary or 0–F in hexadecimal.
The digit values are added in base 10 to give the digit sum S(n).
S(n) is summed again until one digit remains: the digital root, plus the 3 and 9 divisibility result.
The digit sum formula adds the base-10 digits di of n, and each digit can be extracted with di = ⌊n / 10i⌋ mod 10. 3 formulas cover the digit sum, its link with 9 and the digital root.
Every power 10i leaves remainder 1 when divided by 9, so n and S(n) leave the same remainder. For 2,025: 2,025 − 9 = 2,016 = 9 × 224.
There are 5 common types of digit sums: the plain digit sum, the digital root, the alternating digit sum, the digit sum in another base and the weighted digit sum. The calculator returns the first 4 types directly; the cross sum calculator covers alternating and weighted sums in detail.
Add the digits once: S(98,765) = 35.
Repeat until 1 digit remains: 35 → 8, so dr(98,765) = 8.
Alternate + and − from the right: 9 − 1 + 2 − 1 = 9 for 1,219. Tests divisibility by 11.
Write n in base b first: 2,025 is 11111101001 in binary, with a binary digit sum (Hamming weight) of 8.
Multiply each digit by a weight before adding, as in ISBN-10 and Luhn check digits.
To calculate a digit sum by hand, write the number, add the digits from left to right and keep a running total. Here is the digit sum and digital root of 9,875:
A shortcut called casting out nines drops every 9 and every group of digits that adds up to 9: in 9,875, drop the 9, then 8 + 7 + 5 = 20 and 2 + 0 = 2. The digital root is 2 either way.
A whole 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. 61,857 has a digit sum of 6 + 1 + 8 + 5 + 7 = 27, and 27 = 9 × 3, so 61,857 = 9 × 6,873.
The rule works for one reason: 10 ≡ 1 (mod 9), so every place value 1, 10, 100, 1,000… leaves remainder 1 and the number keeps the remainder of its digit sum. The same argument gives 2 rules in any base b: a number is divisible by b − 1 (and by every divisor of b − 1) exactly when its base-b digit sum is. In hexadecimal, the digit sum tests divisibility by 15, 5 and 3.
Type or paste the number, set the base, pick Digit sum, Digital root or Sum of 1 to N, and press Calculate. The result card shows the answer, the divisibility tests and 3 tabs: the step-by-step working, a chart of how often each digit appears and a digit-by-digit table with a running sum.
Paste up to 100,000 digits. Separators such as 1,234,567 or 1 234 567 are fine.
Leave 10 for ordinary numbers; use 2, 8 or 16 for binary, octal or hexadecimal.
Digit sum, Digital root, or Sum of 1 to N (the total of every digit sum from 1 to N).
Steps show each round of adding, Digit counts show the digit frequency, Table shows the running sum.
Digit sums check arithmetic, validate ID numbers and appear in puzzles and numerology. There are 5 common uses:
Digit sums and digital roots of common numbers.
| Number | Base | Digit sum | Digital root | Calculator |
|---|---|---|---|---|
| 4,739 | 10 | 23 | 5 | |
| 98,765 | 10 | 35 | 8 | |
| 2,025 | 10 | 9 | 9 | |
| 123,456,789 | 10 | 45 | 9 | |
| 2¹⁰⁰ | 10 | 115 | 7 | |
| 11010111 | 2 | 6 | 1 | |
| 777 | 8 | 21 | 7 |
Try each one, then reveal the answer or solve it in the calculator.
Find the digit sum of 7,654,321.
Find the digital root of 9,875.
Is 61,857 divisible by 9?
How many 1 bits does the binary number 11010111 have?
Add the digit sums of every whole number from 1 to 1,000.
Find the digit sum of 2¹⁰⁰ = 1,267,650,600,228,229,401,496,703,205,376.
Discover 67 free sum calculators across different categories. Find the right calculator for your needs.
Try a different name or choose another category.
A digit sum calculator is an online tool that adds the digits of a number and returns the digit sum, the digital root and the divisibility tests for 3 and 9. This calculator handles numbers up to 100,000 digits and bases 2 to 36.
Add every digit of the number once. The digit sum of 5,083 is 5 + 0 + 8 + 3 = 16.
The digit sum adds the digits once; the digital root keeps adding until one digit remains. For 5,083 the digit sum is 16 and the digital root is 1 + 6 = 7.
Yes, a whole number is divisible by 9 exactly when its digit sum is divisible by 9. 2,025 has digit sum 9, and 2,025 = 9 × 225.
No, the plain digit sum tests only 3 and 9 in base 10. Divisibility by 11 uses the alternating digit sum, and 7 needs a different rule.
The digit sum of 2<sup>1000</sup> is 1,366, the answer to Project Euler problem 16. 2<sup>1000</sup> has 302 digits; paste them into the calculator to see every step.
The digit sums of the numbers 1 to 100 add up to 901: 900 for 1 to 99, plus 1 for the number 100.
Yes, set the base to 2 for binary, 8 for octal or 16 for hexadecimal. The hexadecimal number FF has a digit sum of 15 + 15 = 30.
The digital root of a positive whole number n is 1 + ((n − 1) mod 9), and the digital root of 0 is 0. For n = 9,875, (9,875 − 1) mod 9 = 1, so the digital root is 2.
A digit sum adds the digits of a number, and the digital root repeats that addition until 1 digit remains. The digit sum calculator returns both for numbers of any length and any base from 2 to 36, tests divisibility by 3 and 9, and totals the digit sums from 1 to N.
Not sure which result you need? Answer 3 questions below.