  A spreadsheet algorithm is given for the atomic force microscope that
accounts for non-linear behavior in the deflection of the cantilever and in the
photo-diode response. In addition, the data analysis algorithm takes into
account cantilever tilt, friction in contact, and base-line artifacts such as
drift, virtual deflection, and non-zero force. These are important for accurate
force measurement and also for calibration of the cantilever spring constant.
The zero of separation is determined automatically, avoiding human intervention
or bias. The method is illustrated by analyzing measured data for the
silica-silica drainage force and slip length.
