Determine the number of atoms of each element found in the molecular compound. For example, water has two atoms of hydrogen and one atom of oxygen.
Write the molecular formula using subscripts. Water is written H^2O, with the 2 written at the bottom corner of the H as a subscript indicating two atoms of hydrogen. Depending on the level of the class, you might be asked to write the formulas resembling the way they combine in the molecule, or strictly by element and number. For example, acetic acid would be written: CH^3COOH to show how the molecule is formed, or C^2H^4O^2 to show just the number of atoms of each element in the compound.
Use parentheses around polyatomic ions that are used more than once in the formula. Don't break up the ion, it retains its own identity within the compound. For example, ammonium (NH^4) sulfate (SO^4) is written: (NH^4)^2SO^4. Two ammonium ions combine with one sulfate ion.