The rotary inertia of rigid body is one of important physical concepts,and the calculation on rotary inertia is also one of the difficulties of physics. In this paper,the rotary inertia of homogeneous sphere was firstly calculated according to its definition. Moreover,through analysis of the calculation results,the rotary inertia of homogeneous spherical shell and surface was also analysed by compensation principle. It is helpful for students to understand the calculation of rotary inertia,and it can also arouse the students' interest in learning physics.