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.

🔢 Digital Root Calculator

Enter any non-negative integer to find its digital root.

Show digital roots for a range of integers (max 100 values).

Find the digital root of n in an arbitrary base (2 to 36).

Digital Root
Digital Sum
Additive Persistence
Formula (1+(n−1) mod 9)
Step-by-step digit summation
Digital Root
Formula (1+(n−1) mod (base−1))
Step-by-step working

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

  1. 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.
  2. 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.
  3. 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.
  4. Verify with the formula — the formula result (1 + (n−1) mod 9) is always shown. It should match the iterated result exactly.
  5. 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)

1
Sum the digits: 4 + 9 + 3 = 16
2
16 is two digits, so sum again: 1 + 6 = 7
Digital root = 7. Verify with formula: 1 + (493−1) mod 9 = 1 + 492 mod 9 = 1 + 6 = 7 ✓
Try this example →

Example 2 — Digital Root of a Multiple of 9

Find dr(9999)

1
Sum the digits: 9 + 9 + 9 + 9 = 36
2
3 + 6 = 9 — single digit reached
Digital root = 9. Since 9999 = 9 × 1111, it is divisible by 9, confirming dr = 9. Formula: 1 + (9999−1) mod 9 = 1 + 9998 mod 9 = 1 + 8 = 9 ✓
Try this example →

Example 3 — Casting Out Nines to Check Arithmetic

Verify: 247 × 38 = 9,386

1
dr(247) = 2+4+7 = 13 → 1+3 = 4
2
dr(38) = 3+8 = 11 → 1+1 = 2
3
dr(4 × 2) = dr(8) = 8
4
dr(9386) = 9+3+8+6 = 26 → 2+6 = 8
Both sides give digital root 8, so the multiplication is consistent. (247 × 38 = 9,386 is correct.)

❓ Frequently Asked Questions

What is a digital root?+
The digital root of a positive integer is found by repeatedly summing its digits until a single digit (0–9) remains. For example, dr(9875) = 9+8+7+5=29 → 2+9=11 → 1+1=2. The digital root is always 0 for 0, and between 1 and 9 for any positive integer. It equals n mod 9 (with 0 replaced by 9 for positive multiples of 9).
What is the formula for the digital root?+
dr(0) = 0. For n > 0: dr(n) = 1 + ((n−1) mod 9). This closed-form avoids any iteration. Example: dr(9875) = 1 + (9874 mod 9) = 1 + 1 = 2. The formula works for arbitrarily large n — just compute n mod 9 (or equivalently, sum all its digits, then compute that mod 9).
What is the difference between digital root and digital sum?+
The digital sum is a single pass: sum all digits once, which may produce a multi-digit result. The digital root continues summing until only one digit remains. For 9875: digital sum = 29 (two digits), digital root = 2 (one digit, after one more step). For single-digit numbers, all three coincide. For numbers 10–18, digital sum = digital root.
What is additive persistence?+
Additive persistence is the number of digit-summing steps needed to reach the digital root. Most numbers have persistence 1 or 2. The smallest number with persistence 3 is 19 (19→10→1). The smallest with persistence 4 is 2,388 (2,388→21→3). The smallest with persistence 5 is 74,899,488 (reported in literature). Persistence grows very slowly with the size of the number.
What is casting out nines?+
Casting out nines is an arithmetic check: the digital root of a sum, difference, or product should equal the digital root of the result. For a product: dr(a × b) = dr(dr(a) × dr(b)). This detects many arithmetic errors (but not all — it fails for errors that are multiples of 9, like transposing adjacent digits). Medieval mathematicians used it to verify long calculations.
Why does the digital root equal n mod 9?+
Since 10 ≡ 1 (mod 9), every power 10^k ≡ 1 (mod 9). The value of a number is ∑ d_k × 10^k, which is congruent to ∑ d_k × 1 = digit sum (mod 9). Repeating gives n ≡ digital root (mod 9). The only subtlety: the formula uses 1+(n−1) mod 9 rather than n mod 9 to handle multiples of 9 (which should give root 9, not 0).
What are the digital roots of perfect squares?+
The digital roots of perfect squares can only be 1, 4, 7, or 9. This follows from the fact that n² mod 9 can only be 0, 1, 4, or 7 (since squares mod 9 cycle through 0,1,4,7,7,4,1,0,0,...). So if a number has a digital root of 2, 3, 5, 6, or 8, it cannot be a perfect square. This is a quick divisibility rule.
How does the digital root work in other bases?+
In base b, the digital root formula is dr_b(n) = 1 + ((n−1) mod (b−1)). This is because the digit place values are powers of b, and b ≡ 1 (mod (b−1)), making the analysis identical to base 10 with 9 replaced by b−1. In base 2 (binary), b−1 = 1, so dr(n) mod 1 = 0, meaning any positive number reduces to 1 after enough steps (since summing binary digits gives the popcount).
What is the digital root pattern of Fibonacci numbers?+
The digital roots of Fibonacci numbers repeat with period 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,2,... (then repeats). This is the Pisano period of Fibonacci numbers modulo 9 (which is 24). Every ninth Fibonacci number (F(9), F(18), F(27), ...) has digital root 9, confirming it is divisible by 9.
Can the digital root be used to check divisibility?+
Yes: (1) Divisible by 9: digital root = 9. (2) Divisible by 3: digital root is 3, 6, or 9. (3) Not divisible by 3: digital root is 1, 2, 4, 5, 7, or 8. Note that divisibility by 2 and 5 depends only on the last digit, not the digital root. Divisibility by 7 and 11 cannot be determined from the digital root alone.