The number of operational locomotives pulling trains on main lines in the railway industry is determined based on the transport volume or the alternate volume of passengers and goods, which can be done by the chart or the analytical method. In the analytical method, the number of operational locomotives can be calculated according to the average running distance, the average production in a day and night, and the locomotive turnaround coefficient. The article presents the process of developing a calculation program to determine the number of operational locomotives by the locomotive turnaround coefficient, thence applying to calculate the number of operational locomotives on the Hanoi – Saigon line with the forecast data for the transport volume of passengers and goods to 2023. The program allows shortening time, ensuring flexibility and convenience in the calculation process with different options.