Take any number of any digit. Then rearrange the digits of the above number. Take the difference of both the numbers, add the digits of the difference. Go no adding the digits of result. The last result will be 9.
Ex: 1679, 1976. The diff is 297. Add 2+9+7=18, 1+8=9.