Watch: every four-digit number falls into 6174
Sort the digits high to low and low to high, subtract, repeat. Numberphile shows Kaprekar's routine reaching 6174 from almost any four-digit start, in seven steps at most.
— Numberphile, 6174 - Numberphile — YouTube video