The occurrence of a crack could change the gear mesh stiffness and consequently influence gear vibration properties. Cracks may occur on the tooth root and tooth surface, but the surface crack type has been seldomly concerned. This study proposes a comprehensive time-varying mesh stiffness (TVMS) calculation method in which the crack position is considered and emphasized. Two tooth crack types (Root crack type: the crack occurs on the root fillet; Surface crack type: the crack occurs on the tooth surface) are modeled and analyzed, and corresponding analytical calculation expressions of TVMS are derived. The finite element method is applied to validate the applicability and accuracy of the proposed analytical method for both root and surface crack types. Besides, by establishing a nonlinear dynamic model for a spur gear system, the influences of the crack depth and crack position on the gear dynamic characteristics are investigated. Several statistic parameters are also applied to evaluate the health conditions for the spur gear system. The method and analysis results reported here may be of interest to researchers and engineers attempting to handle the gear fault analysis analytically and effectively.