The molecular formula of a substance represents the number and types of atoms that are found in a single molecule of that substance. This differs from the empirical formula, which is also known as the "simplest formula" and merely shows the ratios between the atoms of the molecule. In some instances like water, the molecular and empirical formulas may be identical. For other molecules, however, there are significant differences. If you want a true representation of a molecule's makeup, you'll need to find the molecular formula for that molecule.
TL;DR (Too Long; Didn't Read)
To find the molecular formula of a molecule, first determine the empirical formula. Calculate the empirical mass of the molecule using the empirical formula and a periodic table, then use the formula n = molecular mass ÷ empirical mass to determine how many empirical units make up a single molecule. Calculate the molecular formula by multiplying the subscript of each atom in the empirical formula by n.
Finding the Empirical Formula
To find the molecular formula of a molecule, you'll first need to know which atoms make it up and what their relations are. This means determining the empirical formula for the atom. You may get this information, or you may have to calculate it using equipment such as a mass spectrometer.
If you aren't given the empirical formula, you can determine it by finding the mass of each compound within the molecule and comparing them to the total molecular mass. Look up the mass of each element on a periodic table and determine the percentage of the whole molecular mass that each compound represents. Once you've determined percentages, you can use this information and the mass of each element to generate the empirical formula for the molecule.
Calculating Empirical Mass
Once you have the empirical formula for a molecule, calculate the empirical mass by adding the atomic mass for each atom represented in the formula. If any of the elements in the formula have a subscript, be sure to multiply the atomic mass for that element by the subscript in your calculations. After going through the entire empirical formula, the result is the mass of a single empirical unit within the molecule.
Determining Empirical Unit Count
Using the mass you calculated for a single empirical unit, determine how many of these units make up a single molecule of the substance you're determining a molecular formula for. Use the formula n = molecular mass ÷ empirical mass for this calculation, where n equals the number of empirical units contained within a single molecule of your substance.
Creating the Molecular Formula
Now that you know how many empirical units are in a single molecule of your substance, multiply the empirical formula by n to find the molecular formula for the substance. To do this, multiply the subscript on each element in the empirical formula by n. If there is no subscript present for an element, assume a subscript of 1. This gives you a molecular formula, with all of the atoms found in a single molecule represented.