The invention discloses a method for calculating the time-varying meshing stiffness of a planetary gear based on a tooth shape correction method, which belongs to the technical field of mechanical dynamics, fully considers the influence of the tooth shape on the calculation of the comprehensive meshing stiffness, and improves the calculation accuracy of the time-varying meshing stiffness of the planetary gear , including the following specific steps: First, the basic parameters of the sun gear, planetary gear and ring gear should be specified, and then the radius of the sun gear and planetary gear should be r f The relative positional relationship between the +c*m circle and the base circle, clarify the relative positional relationship between the addendum circle and the base circle of the internal gear, and then calculate the meshing stiffness of the individual teeth of the sun gear, planetary gear and internal gear, including Shear stiffness, axial tension and compression stiffness, bending stiffness, contact stiffness and flexible deformation stiffness of the gear base, and finally calculate the comprehensive time-varying meshing stiffness, including the time-varying meshing stiffness of the outer meshing of the sun gear and the planetary gear, the inner ring gear and the planetary gear The inner meshing stiffness of the wheel meshing is time-varying, and the invention has the advantages of simple principle, easy calculation and strong practicability.