Quantitative measurements of frequency shift vs distance curves of ultrahigh-vacuum force microscopy in a noncontact mode are presented. Different contributions from electrostatic, van der Waals, and chemical interactions are determined by a systematic procedure. First, long-range electrostatic interactions are eliminated by compensating for the contact potential difference between the probing tip and the sample. Second, the long-range van der Waals contribution is determined by fitting the data for distances between 1 and 6 nm. Third, the van der Waals part is subtracted from the interaction curves. The remaining part corresponds to the shea-range chemical interaction, and is found to decrease exponentially. A Morse potential is used to fit these data. The determined parameters indicate that the interaction potential between single atoms can be measured by force microscopy in a noncontact mode.