Digit Sum Calculator
This digit sum calculator adds up all digits of a whole number: the digit sum of 123 is 1 + 2 + 3 = 6. It also shows the digital root and the alternating digit sum and tells you whether the number is divisible by 2 to 11.
Source: Wolfram MathWorld – Digit sum. Updated: .
How it is calculated
The digit sum of a number is the sum of its digits: 4,711 → 4 + 7 + 1 + 1 = 13. It is handy because dividing by 3 or by 9 leaves the same remainder for the number as for its digit sum.
Divisibility rules that use the digit sum
- By 3: if the digit sum is divisible by 3, so is the number (225: digit sum 9 → yes).
- By 9: if the digit sum is divisible by 9, so is the number (4,716: digit sum 18 → yes).
- By 6: the number must be even and its digit sum divisible by 3.
- By 11: use the alternating digit sum: add and subtract the digits from the right. For 918,082 that gives 2 − 8 + 0 − 8 + 1 − 9 = −22, which is divisible by 11.
For 2, 4, 5, 8 and 10 the last one to three digits are enough. The rule for 7 is clumsier: take groups of three digits from the right and add and subtract them alternately, because 1001 = 7 · 11 · 13.
Digital root
If you keep taking the digit sum of the result until a single digit remains, you get the digital root: 123,456,789 → 45 → 9. It equals the remainder after division by 9 (a remainder of 0 is written as 9) and is the basis of casting out nines, a quick check for arithmetic.
Related tools: the prime factorization calculator, the GCD and LCM calculator and the fraction calculator, where divisibility rules help with simplifying.
Frequently asked questions
How do you calculate the digit sum?
Add all digits of the number one by one. Example: the digit sum of 2,026 is 2 + 0 + 2 + 6 = 10. If you like, repeat with the result until one digit is left (10 → 1).
How does the digit sum show that a number is divisible by 3?
If the digit sum is divisible by 3, the number is too. The digit sum of 7,482 is 21, and 21 is divisible by 3 – so 7,482 is as well (= 3 · 2,494).
What is the alternating digit sum?
You add and subtract the digits alternately, starting from the right. If the result is divisible by 11 (0 counts), the number is divisible by 11.
What is the digital root used for?
It gives the remainder of the number after division by 9. Casting out nines uses this to check calculations quickly.
Is there a limit on the number?
The tool is exact for up to 60 digits because it treats the number as a string of digits, not as a floating-point value.
Sources and legal basis
As of: · Editorial policy
Related tools
- Prime Factorization CalculatorPrime factorization calculator with steps: factor any number up to one trillion into primes, see the factor tree, test for primality and count divisors.
- Happy Number CheckerHappy number checker: see every step of the digit-square sum until it reaches 1 or the 4 → 16 → … → 4 loop, spot happy primes and list all happy numbers.
- GCF and LCM CalculatorGCF and LCM calculator for two or more numbers: greatest common factor, least common multiple, prime factorization, Euclidean algorithm and all common factors.
- Fraction CalculatorFraction calculator with steps: add, subtract, multiply and divide fractions and mixed numbers or type a whole expression. Simplify, compare, convert to %.
- Number base converter with stepsConvert between binary, octal, decimal, hex and any base from 2 to 36 – with full working, fractions, repeating digits and two’s complement (8–64 bit).
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- NPSH calculator: NPSH available (NPSHA) and margin to NPSHRNPSH calculator for centrifugal pumps: NPSHA from tank pressure, vapour pressure, liquid level and suction losses, compared with the pump’s NPSHR.
- DNA to mRNA and ProteinConvert DNA to mRNA and read the codons as amino acids: template or coding strand, start at AUG, stop codons, with the standard genetic code of the NCBI.
- Hypergeometric Distribution CalculatorHypergeometric distribution calculator for sampling without replacement: P(X = k), P(X ≤ k) and P(X ≥ k), plus mean and variance with the working shown.