This paper proposes an algorithm for time-dependent effects in the finite element analysis of concrete bridges. Based on the primary influence of concrete shrinkage and creep on bridge structures, the calculation formulas for the equivalent nodal load increments of beam elements caused by the shrinkage and creep effects were deduced according to the initial strain method. To simplify the calculation process and improve calculation speed, the formulas for shrinkage and creep in the bridge design code were fitted with an exponential function, and the recurrence equations for shrinkage and creep calculation were obtained. Thus, a finite element method formulation for concrete shrinkage and creep calculated according to the divided time steps was established. The algorithm was programmed into a self-developed program, and the correctness of the program's calculation was verified through 20 years of on-site monitoring results of a concrete girder cable-stayed bridge with a main span of 500 m. The method proposed in this paper can substantially improve the speed of the program to calculate the time-dependent effects during the construction and operation of large-span concrete bridges, while ensuring the reliability of the calculation results, and is easy to be applied in various types of finite element method programs.