If the have similar shape and molar mass but different boiling points, they must have different intermolecular forces.
Consider the compounds propane, dimethyl ether and ethanol.
Propane, ##”CH”_3″CH”_2″CH”_3##: molar mass = 44 g/mol; boiling point = -42 °C
Dimethyl ether, ##”CH”_3″OCH”_3##: molar mass = 46 g/mol; boiling point = -24 °C
Ethanol, ##”CH”_3″CH”_2″OH”##: molar mass = 46 g/mol; boiling point = 78 °C
These compounds all consist of a chain of three “heavy” atoms with hydrogen atoms attached, and they have similar molar masses, but widely different boiling points.
Propane is a nonpolar compound. It has only weak London dispersion forces, so the molecules can easily escape into the gas phase.
It has a low boiling point and is a gas at room temperature.
Dimethyl ether has polar ##”C-O”## bonds, so its intermolecular forces are the stronger dipole-dipole attractions.
It has a higher boiling point, but it is still a gas at room temperature.
Ethanol has strong . The intermolecular forces are so strong that ethanol is a liquid at room temperature.