Digital Root Calculator
Find the digital root of any integer by summing its digits repeatedly until a single digit remains. Shows each step, additive persistence, and supports any base.
What is a Digital Root?
The digital root of a positive integer is the single digit obtained by repeatedly summing the digits of the number until only one digit remains. The process always terminates because each iteration strictly reduces the number (except for single-digit numbers, where no further reduction is possible).
Example: Starting with 9875:
- 9 + 8 + 7 + 5 = 29
- 2 + 9 = 11
- 1 + 1 = 2
So dr(9875) = 2. The intermediate step of summing digits once (giving 29 in this case) is called the digital sum. The number of iterations required is the additive persistence (here, 3 steps).
Digital roots are one of the oldest number-theory tools. The technique of “casting out nines” - checking arithmetic by digital roots - was used by medieval Arabic and European mathematicians and is still taught as an error-detection method. The digital root has an elegant closed form: dr(n) = 1 + ((n − 1) mod 9) for n > 0, and dr(0) = 0. This makes it extremely fast to compute for arbitrarily large numbers.
Formula
Digital root (base 10): dr(n) = 1 + ((n − 1) mod 9) for n > 0 dr(0) = 0
Equivalent formulation: dr(n) = n mod 9, replacing 0 with 9 (for n > 0)
Digital root in base b: dr_b(n) = 1 + ((n − 1) mod (b − 1)) for n > 0
Additive persistence: the count of digit-sum steps before reaching a single digit.
Variables:
- n - the non-negative integer to analyze
- mod - the modulo (remainder after division) operation
- b - the base (2–36) for other-base calculations
How to Use
- Single Number mode - enter any non-negative integer. The calculator shows the digital root, digital sum, additive persistence, and the closed-form formula result, with every step of the digit-summing process displayed.
- Sequence mode - enter a start and end value (range up to 100). A table shows the digital root and additive persistence for every integer in the range.
- Other Base mode - enter a decimal number and a base (2–36). The calculator converts the number to the target base, sums its digits, and repeats until a single “digit” (less than the base) remains.
- Verify with the formula - the formula result (1 + (n−1) mod 9) is always shown. It should match the iterated result exactly.
- Casting out nines - if the digital root is 9, the number is divisible by 9. If it is 3 or 6, the number is divisible by 3.
Example Calculations
Example 1 — Digital Root of 493
Find dr(493)
Example 2 — Digital Root of a Multiple of 9
Find dr(9999)
Example 3 — Casting Out Nines to Check Arithmetic
Verify: 247 × 38 = 9,386
❓ Frequently Asked Questions
🔗 Related Calculators
What is a digital root?
The digital root of a positive integer is the single digit obtained by repeatedly summing the digits of the number. For example, dr(9875) = 9 + 8 + 7 + 5 = 29 → 2 + 9 = 11 → 1 + 1 = 2. The process always terminates in a single digit (1 through 9). By definition, dr(0) = 0. The digital root is also called the repeated digital sum or the iterated digit sum.
What is the formula for the digital root?
For positive integers: dr(n) = 1 + ((n − 1) mod 9), or equivalently, dr(n) = n mod 9 when n mod 9 ≠ 0, and dr(n) = 9 when n mod 9 = 0 (n > 0). Special case: dr(0) = 0. This formula gives the answer instantly without any iteration. Example: dr(9875) = 1 + (9875 − 1) mod 9 = 1 + (9874 mod 9) = 1 + 1 = 2.
What is additive persistence?
Additive persistence is the number of times you must sum the digits before reaching a single digit. For example, 9875 → 29 → 11 → 2 takes 3 steps, so its additive persistence is 3. Most integers have persistence 1 or 2. The world record (as of 2025) for smallest number with persistence 11 is known; no number with persistence 12 has been found in base 10.
What is the difference between digital root and digital sum?
The digital sum is the result of summing the digits exactly once, which may itself be a multi-digit number. The digital root is the result of repeating the digit-sum process until only one digit remains. For 9875: digital sum = 9+8+7+5 = 29 (two digits), but digital root = 2 (single digit, after further reduction). For single-digit numbers, all three values coincide.
What is casting out nines?
Casting out nines is an ancient arithmetic check: the digital root of n equals n mod 9. This means: (1) if digital root = 9, then 9 | n; (2) if digital root = 3 or 6, then 3 | n; (3) the digital roots of a sum, product, or difference equal the digital root of the result's digital root. This was used to verify long calculations before calculators - if the digital roots of inputs and output are inconsistent, there is an error.
Why does the digital root equal n mod 9?
Every digit d in position k contributes d × 10^k to the number. Since 10 ≡ 1 (mod 9), we have 10^k ≡ 1 (mod 9) for all k. Therefore n ≡ sum of its digits (mod 9). Repeating gives n ≡ digital root (mod 9). The only adjustment is for multiples of 9: their digit sum is also a multiple of 9, and the root is 9 (not 0), so the formula uses the 1 + (n−1) mod 9 form.
What are digital roots used for?
Applications include: (1) Divisibility checks: dr(n) = 9 means 9|n; dr(n) ∈ {3,6,9} means 3|n. (2) Arithmetic verification (casting out nines): check sums and products. (3) Cryptography and checksums: the ISBN check digit algorithm uses a similar modular sum. (4) Recreational mathematics: digital roots follow patterns in multiplication tables, Fibonacci numbers, and powers. (5) Computer science: hash functions sometimes use iterative digit sums.
What is the digital root pattern in multiplication tables?
The digital roots of multiples of any integer from 1 to 9 follow a repeating cycle of length 9. For the 7× table: 7, 14, 21, 28, 35, 42, 49, 56, 63 have digital roots 7, 5, 3, 1, 8, 6, 4, 2, 9 - the same nine values in a different order. For multiples of 9: the digital root is always 9 (since 9, 18, 27, ... are all multiples of 9).
What is the digital root in base 2 (binary)?
In binary (base 2), summing bits gives the number of 1-bits (the Hamming weight or popcount). The digital root in base 2 is simply 0 or 1 - any binary number either has all zero bits (root 0) or eventually reduces to 1 (since summing bits gives a count ≥ 1 which keeps reducing). This equals n mod 1 = 0 or n mod (base−1) = n mod 1, adjusted to be the parity.
What is the digital root of Fibonacci numbers?
The digital roots of Fibonacci numbers in base 10 form a repeating cycle of length 24: 1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6,2,8,1,9,1,1,... (then repeats). This 24-cycle is directly related to the Pisano period of Fibonacci numbers modulo 9. Every ninth Fibonacci number has digital root 9.
Can the digital root be computed for very large numbers?
Yes - the formula dr(n) = 1 + (n−1) mod 9 works for any positive integer, however large. For a 1000-digit number, you don't need to iterate: just compute the number mod 9 (or sum its digits once and compute that mod 9). This calculator handles standard JavaScript integers. For extremely large numbers, sum all digits manually then use the formula on the sum.