Two substances are miscible if they are able to form a homogeneous (evenly distributed) mixture when added together in any proportion. The enthalpy of solution () indicates whether a solution forms when two substances are mixed. If the enthalpy of solution is less than zero, , the attractive forces between solvent and solute molecules are greater than the sum of the attractive forces between like molecules, and the solution formation is exothermic. This can happen when hydrogen bonds (an attractive intermolecular force between a hydrogen atom on one molecule and a more electronegative atom on another molecule) exist between unlike molecules. When , the solution will form. This is the case when two liquids are miscible or when a liquid solvent can dissolve a solid solute.A solution for which is an ideal solution. The attractive forces between solvent and solute molecules are approximately equal to the sum of the attractive forces between solvent-solvent molecules and solute-solute molecules. The solute molecules in an ideal solution are similar to the solvent molecules, as in the case of benzene (C6H6) and toluene (C6H5CH3). Finally, when the heat needed to separate the solute-solute and solvent-solvent molecules is less than the heat released when solvent-solute molecules interact, , and the solution formation is endothermic. A that is both large and positive indicates that the solute-solvent attractive forces are much smaller than the attractive forces between the like molecules, and a solution will not form. This is the case for water and oil. These liquids are immiscible, which means they are not able to form a homogeneous (evenly distributed) mixture when added together. The nonpolar oil molecules are not attractive enough to the water molecules to break the hydrogen bonds between the water molecules. Just because , however, does not necessarily mean that a solution will not form. The dissolution of sodium chloride in water has a of approximately 3.88 kJ/mol, and yet table salt is readily soluble in water. This is because the entropy of the solution is greater than the entropy of the pure solute and solvent. Entropy is a measure of the disorder of a system, and the tendency of the universe is for entropy to increase, so any process that has a net increase of entropy will happen spontaneously, without external assistance. So, if is positive but small, dissolution is likely to occur. Molecules with similar structures have similar intermolecular forces and are therefore soluble or miscible with each other, such as HOH (water) and CH3CH2OH (ethyl alcohol). The familiar H2O formula for water is written as HOH to emphasize the group in its structure. If the intermolecular forces are significantly different, they will be immiscible, such as HOH and CH3(CH2)6CH3 (octane). Both water and ethyl alcohol have groups that contribute to hydrogen bonding. They are both polar molecules. Octane, on the other hand, is nonpolar and has no group. Octane is immiscible in water.
The presence of an group in a compound's structure does not necessarily mean it is soluble in water. For example, octyl alcohol (CH3(CH2)6CH2OH) could be expected to be soluble in water because it has an group that could form hydrogen bonds with water. However, the carbon chain is so long that the alcohol's group cannot compensate for its nonpolar properties. Octyl alcohol is not soluble in water. The molecular structures of octyl alcohol and water are too dissimilar.