1. In an atomic force microscopy (AFM) system including a cantilever with a tip used to analyze a sample, the AFM outputting an AFM data file, a computer readable medium storing computer readable program code for causing a computer to perform the steps of: a) receiving user input regarding an analysis to be performed and analysis parameters; b) parsing the AFM data file based on the user input to obtain a deflection of the cantilever; c) determining an indentation depth of the tip into the sample based at least in part on the deflection; d) selecting a model of contact mechanics based on the user input; e) solving the selected model of contact mechanics based on the input analysis using the determined indentation depth; and f) determining and reducing a residual error.