Pier top displacement caused by temperature changes is a critical parameter for the design of railway simple-supported girder bridge to ensure its safety. To date, the existing formulas could only be used to calculate such displacement of pier tops with regular shapes, such as round-ended or rectangular cross-sections. Instead, estimation of displacement involving complex cross-sections and arbitrarily temperature fields usually utilize finite element modeling, which is less efficient. Therefore, to solve the aforementioned deficiency, this work proposes a set of general algorithms named horizontal thermal displacement at the pier top algorithm (HTDPT) which are universally applicable, precise and efficient. The special theory solution for a regular cross-section demonstrates that HTDPT provides a theoretical solution to displacement estimation of pier top. And the numerical simulations for regular and irregular cross-sections indicate that for piers height greater than 20 m, the displacements’ error between simulation and this proposed algorithm is less than 5 %. Thus, the horizontal displacement calculated by HTDPT could estimate the overall displacement, which meets the engineering requirements.