As vibration errors are the crucial source of error in a high accuracy interferometric test, this paper researches the effect of mechanical vibration on the phase shifting stability. It establishes vibration error models and simulates the immunity of vibration by using the three-step algorithm, five-step algorithm, seven-step algorithm and thirteen-step algorithm, respectively. The results show that the thirteen-step algorithm is the best in immunizing the vibration. For the results agreed with that in other literature, it proves the simulation in this paper is believable. To some extent, the method can give a reasonable prediction of the vibration error which effects the precision of interferometer and it also can evaluate and select the algorithm of phase shifting.