A variety of atomic force microscopy (AFM) modes is employed in the field of surface science. The most prominent AFM modes include the amplitude modulation (AM) and the frequency modulation (FM) mode. Over the years, different ways for analyzing data acquired with different AFM modes have been developed, where each analysis is usually based on mode-specific assumptions and approximations. Checking the validity of the seemingly different approximations employed in the various analysis methods can be a tedious task. Moreover, a straightforward comparison of data analyzed with different methods can, therefore, be challenging. Here, we combine the existing evaluation methods which have been separately developed for the different AFM modes and present a unifying set of three equations. These three AFM equations allow for a straightforward analysis of AFM data within the harmonic approximation, regardless of the AFM mode. The three AFM equations provide the three and only pieces of information about the tip-sample force available within the harmonic approximation. We demonstrate the generality of our approach by quantitatively analyzing three-dimensional AFM data obtained in both the AM and FM mode.