Cell residence time is a key system parameter for the performance analysis of cellular mobile systems and their related applications. In order to save cost and time before wide implementation and deployment of a mobile system, various network performance metrics, such as network resource occupancy probabilities, should be calculated through analytical results of the mean cell residence time. However, this is difficult to estimate in 5G heterogeneous networks, due to irregular-shaped multi-tier heterogeneous network topologies introduced by a diverse set of small cells. In order to find an efficient way of calculating the cell residence time for 5G heterogeneous networks, we first examine the well-known conventional formula. Then we propose an enhanced closed-form formula for cell residence time by considering more generalized cellular mobile systems, as well as more generic mobility models. The proposed closed-form formula can be directly applied to various complex and reliable network scenarios. It can be adapted to multi-tier heterogeneous networks with randomly positioned irregular-shaped small cells, even though they overlap with each other. Our simulation results show that the proposed formula provides excellent estimation accuracy for general random mobility models, including the Levy walk, which is known to realistically reflect human mobility.