The existing formalism to calculate the degree of unsaturation from the molecular formula of organic molecules cannot be applied to charged and/or disconnected species. Moreover, the calculated value depends on the assumed formal valence of each of the elements. In this work, we introduce a new formalism that eliminates these problems. The suggested property, degree of unsaturation, can be calculated from the molecular formula as well as from any structural representation of a molecule corresponding to that molecular formula.