Skip to main content
Chemistry LibreTexts

4.03: Chemical Formulas: How to Represent Compounds

  • Page ID
  • Learning Objectives

    • Determine the number of different atoms in a formula.
    • Define chemical formula, molecular formula, and empirical formula.

    A chemical formula is an expression that shows the elements in a compound and the relative proportions of those elements. Water is composed of hydrogen and oxygen in a 2:1 ratio. The chemical formula for water is \(\ce{H_2O}\). Sulfuric acid is one of the most widely produced chemicals in the United States and is composed of the elements hydrogen, sulfur, and oxygen. The chemical formula for sulfuric acid is \(\ce{H_2SO_4}\). This chemical formula tells us that sulfuric acid has 2 units of hydrogen, 1 unit of sulfur and 4 units of oxygen.

    Elements can bond together to form a group that act as a single unit. One type of these groups being a polyatomic ion. Polyatomic ions are discussed in more detail in section 4.08. When writing a chemical formula the polyatomic ions are enclosed in parenthesis followed by a subscript if more than one of the same polyatomic ion exist in a chemical formula. The formula Ca3(PO4)2 represents a compound with the following:

    3 Ca units

    + 2 PO43- ions

    To count the total number of atoms for formulas with polyatomic ions enclosed in parenthesis, use the subscript as a multiplier for each atom or number of atoms.


    3 Ca + 2 x1 P + 2 x 4 O = 3 Ca units + 2 P units + 8 O units

    Molecular Formula

    A molecular formula is a chemical formula of a molecular compound that shows the kinds of elements and how many units of each are present in a unit of the compound. Ammonia is a compound of nitrogen and hydrogen as shown below:

    Molecular formula for ammonia: NH3. There is one atom of nitrogen and 3 atoms of hydrogen in a molecule of ammonia.
    Figure \(\PageIndex{1}\): The molecular formula for ammonia.

    Note from the example that there are some standard rules to follow in writing molecular formulas. The arrangements of the elements depend on the particular structure, so we will not concern ourselves with that point right now. The number of units of each kind of element is indicated by a subscript following the element symbol. If there is only one unit of the element, no number is written. If there is more than one unit of a specific element, the number is written as a subscript following the element symbol. We would not write \(\ce{N_3H}\) for ammonia, because that would mean that there are three units of nitrogen and one unit of hydrogen in each unit of ammonia, which is incorrect.

    Empirical Formula

    An empirical formula is a formula that shows the elements in a compound in their lowest whole-number ratio. Glucose is an important simple sugar that cells use as their primary source of energy. Its molecular formula is \(\ce{C_6H_{12}O_6}\). Since each of the subscripts is divisible by 6, the empirical formula for glucose is \(\ce{CH_2O}\). When chemists analyze an unknown compound, often the first step is to determine its empirical formula.

    • molecular formula: \(\ce{C_6H_{12}O_6}\)
    • empirical formula: \(\ce{CH_2O}\)

    There are a great many compounds whose molecular and empirical formulas are the same. If the molecular formula cannot be simplified into a smaller whole-number ratio, as in the case of \(\ce{H_2O}\) or \(\ce{P_2O_5}\), then the empirical formula is also the molecular formula.


    • A chemical formula is an expression that shows the elements in a compound and the relative proportions of those elements.
    • If only one atom of a specific type is present, no subscript is used.
    • For atoms that have two or more of a specific type of atom present, a subscript is written after the symbol for that atom.
    • Polyatomic ions in chemical formulas are enclosed in parentheses followed by a subscript if more than one of the same type of polyatomic ion exist.
    • Molecular formulas do not indicate how the atoms are arranged in the molecule.
    • The empirical formula tells the lowest whole-number ratio of elements in a compound. The empirical formula does not show the actual number of atoms.


    • Was this article helpful?