Digit Sum Calculator

Digit Sum Calculator

Popular AI Skill PRO

Enter Calculation

Formula

Digit Sum=∑i=1kdiDigital Root=1+((∑i=1kdi)−1mod9)where{di=the i-th digit of Numberk=count of digits in Number\begin{gathered} \text{Digit Sum} = \sum_{i=1}^{k} d_i \\[1.5em] \text{Digital Root} = 1 + \left(\left(\sum_{i=1}^{k} d_i\right) - 1 \bmod 9\right) \\[1.5em] \text{where}\quad \left\{ \begin{aligned} d_i &= \text{the } i\text{-th digit of } \text{Number} \\ k &= \text{count of digits in } \text{Number} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Digit Sum
54
sum of all decimal digits
Number of digits 6
Digital root (single digit) 9

Report an error on this page

What is a Digit Sum?

The digit sum of a number is simply the total you get by adding all of its individual decimal digits together. For example, the digit sum of 12345 is \(1 + 2 + 3 + 4 + 5 = 15\). This Digit Sum Calculator computes that total instantly, and also reports how many digits the number has and its digital root.

A multi-digit number broken into separate digit boxes that feed into a single sum total
A digit sum adds each individual digit of a number together.

How to use it

Type any whole number into the input box and submit. The calculator strips any non-digit characters, adds up the remaining digits, and displays three results: the digit sum, the digit count, and the digital root.

The formula explained

The digit sum is the sum of each digit \(d_i\).

$$\text{Digit Sum} = \sum_{i=1}^{k} d_i \quad\text{where } d_i \text{ are the digits of } \text{Number}$$

The digital root is found by repeatedly applying the digit sum until only one digit is left. There is also a closed form: for any positive integer \(n\), the digital root equals \(1 + ((n - 1) \bmod 9)\).

$$\text{Digital Root} = 1 + \left(\left(\sum_{i=1}^{k} d_i\right) - 1 \bmod 9\right)$$

The digital root is closely related to the value of a number modulo 9, which is why it powers the classic "casting out nines" check.

Advertisement
Repeated digit summing reducing a number step by step down to a single digit
The digital root is found by repeating the digit sum until one digit remains.

Worked example

Take 987654. The digit sum is

$$9 + 8 + 7 + 6 + 5 + 4 = 39$$

It has 6 digits. To get the digital root, sum 39's digits: \(3 + 9 = 12\), then \(1 + 2 = 3\). So the digital root of 987654 is 3.

Interpreting the Digit Sum and Digital Root

The digit sum adds the digits of a number. The digital root repeats that step until one digit remains. For example, \(9875 \to 9+8+7+5 = 29 \to 2+9 = 11 \to 1+1 = 2\), so the digital root of 9875 is 2.

Link to remainders mod 9

Both the digit sum and the digital root are congruent to the original number modulo 9:

$$n \equiv S(n) \equiv \text{dr}(n) \pmod 9$$

This holds because \(10 \equiv 1 \pmod 9\), so every power of ten leaves remainder 1 when divided by 9. Each digit therefore contributes only itself to the remainder.

Divisibility rules

  • Divisible by 9: a number is divisible by 9 exactly when its digit sum is divisible by 9.
  • Divisible by 3: a number is divisible by 3 exactly when its digit sum is divisible by 3.
  • Digital root of 9: this means the number is a nonzero multiple of 9. Only 0 has a digital root of 0.
  • Other divisors: the digital root cannot show divisibility by numbers such as 7, 11 or 13. For 7, the numbers 7 and 16 have digital roots 7 and 7, but 16 is not a multiple of 7, so no digital-root rule exists.

Casting out nines

Casting out nines checks a sum, difference or product by comparing digital roots. If the digital roots do not match the expected result, the calculation is definitely wrong. A match does not prove it is right. The check misses errors that preserve the remainder mod 9, such as swapped digits (81 written as 18, both with digital root 9), a misplaced zero, or an error that is itself a multiple of 9.

What it cannot tell you

The digit sum does not identify the number. Many numbers share a digit sum, for example 123, 132, 321 and 600 all have digit sum 6. Treat it as a quick check or a property, not a fingerprint.

Advertisement

Digit Sum Examples for Different Numbers

The table shows the digit sum, the number of digits, the digital root and the divisibility by 3 and 9 that follows from the digit sum.

Number Digit Sum Digit Count Digital Root Divisibility note
0 0 1 0 Divisible by 3 and 9 (0 is a multiple of every integer)
9 9 1 9 Divisible by 3 and 9
18 9 2 9 Divisible by 3 and 9 (18 = 9 × 2)
99 18 2 9 Divisible by 3 and 9 (99 = 9 × 11); 18 → 1+8 = 9
123 6 3 6 Divisible by 3 but not 9 (123 = 3 × 41)
1000 1 4 1 Not divisible by 3 or 9 (remainder 1 mod 9)
12345 15 5 6 Divisible by 3 but not 9; 15 → 1+5 = 6
999999 54 6 9 Divisible by 3 and 9; 54 → 5+4 = 9
1234567890 45 10 9 Divisible by 3 and 9; 45 → 4+5 = 9

Worked check for 12345: \(1+2+3+4+5 = 15\), then \(1+5 = 6\). The digit sum 15 is divisible by 3 but not by 9, so 12345 is divisible by 3 and leaves remainder 6 when divided by 9.

FAQ

Does the digit sum work for very large numbers? Yes — just enter all the digits and they will be added.

What is a digital root used for? It is used in checksum and error-detection tricks like casting out nines, and in recreational mathematics.

What is the digital root of 0? The digital root of 0 is 0.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators