The stability of adsorbed molecules on surfaces is fundamental and important for various applications, such as coating, lubrication, friction, and self-assembled structure formation. In this study, we investigated the structures and interaction energies (E-int) of propane, n-pentane, n-heptane, perfluoropropane, n-perfluoropentane, and n-perfluoroheptane adsorbed on the surface of C96H24 (a model surface of graphite). The changes in E-int (Delta E-int = E-int - E-int(0)) associated with the horizontal displacement from the stable position were calculated using dispersion-corrected density functional theory (DFT; B3LYP-D3), where E-int(0) is the E-int at the stable position. The maximum value of Delta E-int (Delta E-int(max)) associated with the horizontal displacement increased as the chain length increased. The Delta E-int(max) for the three n-alkanes were 1.10, 1.82, and 2.35 kcal mol(-1), respectively. The values for n-perfluoroalkanes were 0.57, 0.83, and 1.04 kcal mol(-1), respectively. The Delta E-int(max) values for the n-alkanes were significantly larger than those for the corresponding n-perfluoroalkanes. The E-int(max) value per carbon atom of the n-alkanes (ca. 0.30 kcal mol(-1)) is approximately 2.5 times as large as that of n-perfluoroalkanes (ca. 0.12 kcal mol(-1)). The Delta E-int associated with the horizontal displacement of propane and perfluoropropane on circumcoronene (C54H18) obtained by the B3LYP-D3 calculations are close to those obtained by the second order M & oslash;ller-Plesset (MP2) and dispersion-corrected double hybrid DFT calculations, suggesting the sufficient accuracy of the Delta E-int obtained by the B3LYP-D3. Thus, our quantitative analysis revealed the higher stability of n-alkanes against horizontal displacement on a graphite surface than that of n-perfluoroalkanes.