Example: Write the chemical formula involving calcium and nitrogen.

Step 1: Write the symbols (including charge) of the cation and anion, with the cation listed first.
Step 2: Determine the smallest number of each kind of ion needed to give an overall charge of zero.
Step 3: Write the chemical formula, using the appropriate subscripts to make the compound neutral in charge.