# Digital Root

#### What is Digital Root

Suppose you are given some digits, say 123456, the digital root will be calculated like this:

Summing each digit repeatedly to get a single digit is how we get the digital root.

#### How to effectively find the digital root

An intuitive solution would be to recurse steps: 1. get singles digits from the given number. 2. sum up all. However, if the given number is really big, this is not an effective solution.

Luckily, there’s a formula to calculate the digital root. This wikipedia page explains what the formula and how it works: Digital root.

The formula is:

Why this is the answer? The digital root sees how many numbers are there after the closest of multiple of 9 which is less than the given number. If the given number is 123456, its closest, multiple of 9 is 123453. So, the digital root of 123456 is 3.