When atomic force microscopy is used to retrieve nanomechanical surface properties of materials, unsuspected measurement and instrumentation errors may occur. In this work, some error sources are investigated and operating and correction procedures are proposed in order to maximize the accuracy of the measurements. Experiments were performed on sapphire, Ni, Co and Ni-30%Co samples. A triangular pyramidal diamond tip was used to perform indentation and scratch tests, as well as for surface visualization. It was found that nonlinearities of the z-piezo scanner, in particular the creep of the z-piezo, and errors in the determination of the real dimensions of tested areas, are critical parameters to be considered. However, it was observed that there is a critical load application rate, above which the influence of the creep of the z-piezo can be neglected. Also, it was observed that deconvolution of the tip geometry from the image of the tested area is essential to obtain accurate values of the dimensions of indentations and scratches. The application of these procedures enables minimizing the errors in nanomechanical property measurements using atomic force microscopy techniques.