Bet_Noire/iStock/GettyImages
In chemistry, a chemical formula is the shorthand that tells you exactly which elements compose a compound and how many atoms of each are present. Even if the notation seems cryptic at first glance, once you understand the rules you can decode any formula with confidence.
A chemical formula uses element symbols from the periodic table and subscripts to indicate the number of atoms. For example, H₂O means two hydrogen atoms and one oxygen atom.
The letters in a formula are the one- or two‑letter symbols that represent specific elements: H for hydrogen, O for oxygen, S for sulfur, Cu for copper, Fe for iron, Au for gold, and so on. If you encounter a symbol you don’t recognize, a quick look at the periodic table will clarify its identity.
Any number that follows an element symbol is a subscript indicating how many atoms of that element are in one molecule. When no number appears, the element count is one. For instance, H₂SO₄ is sulfuric acid: two hydrogens, one sulfur, and four oxygens per molecule.
Sometimes a formula contains parentheses to group atoms that move together as a unit. The number outside the parentheses multiplies the counts of all atoms inside. In Mg(OH)₂, the magnesium hydroxide molecule has one magnesium atom, two hydroxyl groups, and thus two oxygens and two hydrogens in total.
Unlike covalent compounds, ionic solids lack discrete molecules; their formulas describe the stoichiometric ratio of ions. For example, NaCl means one sodium ion for every chloride ion in the crystal lattice. A single ion is written with its charge: Na⁺ and Cl⁻.
Structural formulas depict the spatial arrangement of atoms and bonds, using lines to represent single or multiple bonds. For example, the carbon dioxide molecule is shown as O=C=O, indicating a central carbon atom double‑bonded to two oxygen atoms. These diagrams provide deeper insight into molecular geometry beyond the condensed formula.