Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

Digital Root Calculator

Find the digital root of any whole number up to 9 quadrillion, the single digit left after repeatedly summing its digits, using 1 + ((n − 1) mod 9).

Digital Root Calculator

Digital root
2
The single digit left after repeatedly adding the decimal digits: 1 to 9 for any positive whole number, and 0 only for zero.

Background.

Add up the digits of a number, then add up the digits of the answer, and keep going until one digit is left. That last digit is the number's digital root, and it is more useful than the party trick suggests. Before machines did arithmetic, bookkeepers used it to check long multiplications by casting out nines, and it is still the quickest test of whether a large number divides by 3 or by 9.

It works because 10 is one more than 9. Every power of ten — 10, 100, 1,000 — leaves a remainder of 1 when divided by 9, so a digit in any position contributes exactly its face value to that remainder. Adding the digits therefore never changes a number's remainder on division by 9, and repeating the sum just shrinks the number until only the remainder is left. The one twist is that a multiple of 9 ends at 9 rather than 0.

So the repeated adding can be skipped. For any positive whole number n, the digital root is 1 + ((n − 1) mod 9): subtract one, take the remainder on division by 9, add the one back. The answer here comes from that single step, and it always agrees with summing the digits by hand, however long the number.

Whole numbers from 0 up to 9,000,000,000,000,000 are accepted, written in ordinary base ten; zero is the only number whose digital root is 0. Bigger numbers are still within reach: add their digits once yourself and enter the total, which has the same digital root. Other bases follow the same idea with a different divisor, and negative numbers have no single agreed convention, so both are left out.

What is digital root calculator?

The digital root of a non-negative integer is the single digit obtained by repeatedly summing its decimal digits. For positive integers it always lies between 1 and 9 and equals the remainder on division by 9, except that multiples of 9 give 9 instead of 0; the digital root of 0 is 0. Because it depends only on that remainder, it behaves predictably under arithmetic: the digital root of a sum or a product equals the digital root of the sum or product of the separate digital roots.

How to use this calculator.

  1. Type the whole number without commas, spaces or a decimal point. Decimals and negative numbers are refused, since the digital root is defined here only for non-negative integers.
  2. For a number larger than 9,000,000,000,000,000, add its digits once yourself and enter that total instead. The result is identical, because summing digits never changes the remainder on division by 9.
  3. Read the digital root. A 9 means the number divides exactly by 9; a 3, 6 or 9 means it divides exactly by 3.
  4. To check a multiplication, find the digital roots of both factors, multiply them, reduce that product to one digit, and compare it with the digital root of your answer.

The formula.

dr(n)=0 if n=0; otherwise 1+((n-1) mod 9)

dr(n) = 0 if n = 0, and otherwise dr(n) = 1 + ((n − 1) mod 9). The mod 9 operation gives the remainder after dividing by 9, a whole number from 0 to 8. Shifting n down by one before taking the remainder, and back up by one afterwards, maps those remainders onto 1 to 9 instead of 0 to 8, so multiples of 9 come out as 9. The formula matches repeated digit summing because 10 ≡ 1 (mod 9): a number with digits dₖ…d₁d₀ equals the sum of dᵢ × 10ⁱ, and each 10ⁱ leaves remainder 1, so the number and the sum of its digits share a remainder. The digits' order plays no part, which is why swapping two of them, or inserting or deleting zeros, leaves the digital root unchanged.

A worked example.

Example

Take 9875. Summing the digits by hand: 9 + 8 + 7 + 5 = 29, then 2 + 9 = 11, then 1 + 1 = 2. Three rounds of adding reach a single digit, so the digital root is 2. The shortcut gets there in one step. 9875 − 1 = 9874, and 9874 = 9 × 1097 + 1, so (n − 1) mod 9 is 1 and the digital root is 1 + 1 = 2. Now use it to check 9875 × 34 = 335,750. The factors' digital roots are 2 and 7 (from 3 + 4); their product 14 reduces to 5. The digits of 335,750 sum to 23, which also reduces to 5, so the product passes. Had it been miscopied as 335,570 it would pass too, because swapped digits are invisible to the check.

integer9,875

Frequently asked questions.

What is casting out nines?
It is a way of checking arithmetic with digital roots. Reduce each number in a sum or product to its digital root, do the same operation on those single digits, reduce again, and compare with the digital root of the answer. If they differ, the answer is certainly wrong; if they match, it is probably right but not proven.
Which arithmetic mistakes does casting out nines miss?
Any error that changes the answer by a multiple of 9. That includes swapping two digits, as in 335,750 written as 335,570, and adding or dropping a zero, since 33,575 has the same digital root as 335,750. A misplaced decimal point also goes unnoticed for the same reason, so the check is weakest against exactly the slips people make when copying figures.
How does the digital root show whether a number divides by 3 or 9?
A number divides exactly by 9 when its digital root is 9, and by 3 when its digital root is 3, 6 or 9. Both follow from the root being the remainder on division by 9. The example 9875 has digital root 2, so it divides by neither, and 9875 ÷ 3 leaves remainder 2.
Can a digital root prove a number is not a perfect square?
Yes, in one direction. Every perfect square has digital root 1, 4, 7 or 9, so a number whose root is 2, 3, 5, 6 or 8 cannot be a square; 9875 is ruled out immediately. A root of 1, 4, 7 or 9 proves nothing, because plenty of non-squares share those values too.
Is the digital root the same as the digit sum?
No. The digit sum is a single round of adding: 9875 has a digit sum of 29. The digital root keeps going until one digit remains, giving 2. The two share the same remainder on division by 9, which is why entering a digit sum here returns the same digital root as the original number.
Does the digital root work for negative numbers or other bases?
Not on this page. In base b, digit sums preserve the remainder on division by b − 1, so hexadecimal digits behave the same way with 15 in place of 9 and give different roots. Negative numbers have no single agreed convention, so only non-negative base-ten integers are accepted.

How this page was produced

Published by
Quanta Calculator
Primary sources
3 cited below
Method
dr(n)=0 if n=0; otherwise 1+((n-1) mod 9)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon