In this paper, the nanoindentation system and atomic force microscope (AFM) are integrated to improve the limitation of the present area function of nanoindentation test used for shallow depth. The projected areas under the shallow contact depth are modified through scanning directly the immediate vinicity of indenter tip. The results indicate that both indentation hardness and reduced modulus obtained from the proposed method are better than those of the present area function as well as the perfect geometry relation.