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.