Calculate the sum of all digits of a numbers. If the sum is greater than 9 then again sum the digits. The sum is continuing until the sum becomes one digit.