The empirical formula gives the simplest ratio of atoms in a compound, while the molecular formula gives the actual number of atoms in a molecule of the compound.