Evaluation method of nano-scale internal cracks by ultrasonic atomic force microscopy (UAFM) is proposed based on two approaches. The first one is a linear vibration analysis of the contact stiffness calculated from a finite element method analysis of a model including a subsurface gap. The second one is a nonlinear vibration analysis of a stiffening or softening spring representing the opening-and-closing behavior of the gap. These methods were verified by obtaining the resonance frequency mapping, the load dependence of the resonance frequency and the resonance spectra in UAFM on a subsurface gap in highly oriented pyrolytic graphite. As a result, it was proved that the proposed method is useful for evaluating the opening-and-closing behavior of the gap. Although the present study is focused on a nano-scale gap, this method is applicable to larger scale cracks using a larger tip and more stiff support than those used in AFM.