To obtain an ionic compound’s formula, first determine the cation and record its symbol and charge. Then, write down the anion’s symbol and charge on a piece of paper. Finally, unite the two ions to create a chemical molecule that is electrically neutral.