a system and method for the analysis of afm data is provided . the system and method can be used in conjunction with an atomic force microscopy system including a cantilever with a tip used to analyze a sample , the afm outputting an afm data file . an exemplary embodiment of the invention includes a computer readable medium storing computer readable program code for causing a computer to receive user input regarding an analysis to be performed and analysis parameters ; parse the afm data file based on the user input to obtain a deflection of the cantilever ; determine an indentation depth of the tip into the sample based at least in part on the deflection ; select a model of contact mechanics based on the user input ; solve the selected model of contact mechanics based on the input analysis using the determined indentation depth ; and determine a residual error .