Atomic and molecular masses can be measured precisely using mass spectrometry, while average atomic masses used in calculations account for isotope abundances. The periodic table organizes elements and shows repeating patterns of their chemical properties and reactivities. Chemical formulas indicate the number and type of atoms in compounds, and different formula types provide varying levels of structural information. Ions are formed when atoms gain or lose electrons to become positively-charged cations or negatively-charged anions, and ionic compounds consist of ionic bonds between oppositely-charged ions.