Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say we have an integer x. How should I delineate a summation of its' digits until I get a single digit.

For example:

x = 12345
1 + 2 + 3 + 4 + 5 = 15
1 + 5 = 6

I believe it is possible, just can't find a mathematical way to do so. Would be glad if anyone shared their ideas or point me to the right direction.

share|cite|improve this question
up vote 3 down vote accepted

What you're finding is called the digital root or iterated digit sum.

For positive $x$, the digital root is $9$ if $x$ is a multiple of $9$; otherwise it is the remainder of the division $x\div 9$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.