Carbohydrates (literally hydrates of carbon) are chemical compounds, which together with proteins, lipids (fats), and nucleic acids (RNA/DNA), constitute the 4 principal biological macromolecules of which all life on Earth is composed. Together with lipids, carbohydrates are the primary means by which living organisms store energy.