🧮
🧮 Math & statistics

Digit Sum Calculator (sum of the digits of a number)

Results update as you type.

Your numbers

Understanding the digit sum calculator — concept and principle

This calculator adds the digits of a number and uses the result for quick divisibility tests by 3 and 9. It also gives the number of digits, the alternating digit sum used for the test by 11, the digital root and the average digit. Use it for number puzzles, checking arithmetic and divisibility homework.

Digit sumDigits of 98,7659+8+7+6+5÷ 3 or 9?noAlternating7 → not ÷ 11Digital root3 + 5 = 8Digit sum9 + 8 + 7 + 6 + 5 = 35
A number is divisible by 3 or 9 exactly when its digit sum is.

How it is calculated

Digit sum = sum of all the digits

Alternating digit sum = ones − tens + hundreds − … (from the right)

Digital root = repeat the digit sum until one digit remains

Average digit = digit sum ÷ number of digits

The principle

10 leaves a remainder of 1 when divided by 9 (and by 3), so 100, 1,000 and every power of 10 do too. A number such as 98,765 = 9 × 10,000 + 8 × 1,000 + … therefore has the same remainder as 9 + 8 + 7 + 6 + 5. That is why the digit sum tests divisibility by 3 and 9, and why "casting out nines" checks sums and products. For 11, the powers of 10 leave remainders 1 and −1 alternately, which gives the alternating sum.

Worked example

Default input: 98,765.

  1. Digits added: 9 + 8 + 7 + 6 + 5 = 35, from 5 digits.
  2. 35 is not a multiple of 3 or 9: not divisible by 3 or by 9.
  3. Alternating sum from the right: 5 − 6 + 7 − 8 + 9 = 7, not a multiple of 11, so 98,765 is not divisible by 11 either.
  4. Digital root: 35 → 3 + 5 = 8.
  5. Average digit = 35 ÷ 5 = 7.
How Digit sum changes with NumberHow Digit sum changes with Number2025303524,69149,38274,07498,765123,456148,148197,530Example: 35Number
Each point is the calculator re-run with only “Number” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
NumberDigit sum
24,69125
49,38231
74,07429
98,76535
123,45621
148,14826
197,53025

How to read the result

The digit sum is a quick check, not a value in its own right. If you change the order of the digits, the digit sum and the divisibility by 3 and 9 do not change. Remainders carry over too: 98,765 leaves remainder 8 when divided by 9, the same as its digital root.

Common mistakes

Keep in mind: Digit-sum checks catch many arithmetic slips but not all; for example, swapped digits go unnoticed.

Frequently asked questions

How do I know if a number is divisible by 3?

Add its digits; if the total is divisible by 3, so is the number.

What is the digit sum of 98,765?

35.

What is casting out nines?

A check of arithmetic using digit sums modulo 9.

Sources: OpenStax, Prealgebra 2e (2020), §2.4 Find Multiples and Factors · E. W. Weisstein, "Digital Root", Wolfram MathWorld

Checked 9 Nov 2026. OpenStax, Prealgebra 2e (2020), §2.4 Find Multiples and Factors — “Use Common Divisibility Tests” (a number is divisible by 3 if the sum of its digits is divisible by 3); Weisstein, E. W., “Digital Root”, Wolfram MathWorld (repeated digit sums, additive persistence).

🧮 All math & statistics tools →🌍 Calculators by country →