A chemical formula represents the composition of a single compound, whereas a chemical equation represents a chemical reaction, showing how reactants are converted into products.