An empirical formula gives the ratio of atoms in a compound. Molecular formula tells how many atoms are in a compound. If a compound's empirical formula is C_{6}H_{12}O_{6}, it will have a molecular formula of C_{6}H_{12}O_{6}, C_{12}H_{24}O_{12}, and so on.

The term "empirical" refers to the relative percent composition of a pure chemical substance by element.

Let's find this compound's empirical formula:

First we will assume that we have 100 grams of this compound. So, in 100 grams, there will be 40.00 grams of C (carbon), there will be 6.72 grams of H (hydrogen), there will be 53.29 grams of O (oxygen). Next, we will compare each element. Before we can compare them, we need to convert them to moles:

Notice that the data has four sigfigs. If you use fewer than four significant figures in your calculations, you may have errors in your formula.

Now that we know the moles of each element, we can compare the different elements and determine the empirical formula. We do this by dividing all of the mole quantities by the smallest one. In the example above, the smallest mole quantity would be either carbon or oxygen (3.331 mol):

We now know that the ratio of C:H:O is 1:2:1, which makes the empirical formula CH_{2}O. Let's suppose we use a molecular weight of 180 g/mol for this compound. Knowing this, we can now determine the molecular formula. The formula weight of our empirical formula is 30 g/mol. To find the multiple, divide the molecular weight by the empirical formula weight:

The molecular formula has a multiple of 6:

C_{(1 x 6)} H_{(2 x 6)} O_{(1 x 6)} which results in C_{6}H_{12}O_{6}

We can also determine the empirical and molecular formula from experimental data. We will use the following information:

- We have a compound containing C, H and S
- We burn 7.96 mg of this compound in oxygen which forms 16.65 mg of CO
_{2} - The sulfur in 4.31 mg of this compound is converted into sulfate and precipitates as BaSO
_{4} - The BaSO
_{4}has a mass of 11.96 mg - The molecular weight of the compound is 168 g/mol

We will use stoichiometry to find the mass percent of each element in the compound, then we will use these mass percentages to find the empirical formula. Take note that all of our data is in milligrams.

We know that the CO_{2} that was formed came from the carbon in the compound. Next we'll calculate how many milligrams of carbon are found in 16.65mg of CO_{2}:

We now know the percentage of the sample due to carbon. We can now calculate the percent of carbon in the compound by using the mass of the sample:

We know that the precipitate of BaSO_{4} came from the sulfur in the compound. Next, we need to find how many milligrams of sulfur are in 11.96 mg of BaSO_{4} :

Next, determine the percent of sulfur in the compound by using the mass of sulfur and the mass of the compound:

We can determine the percentage of hydrogen by subtracting our known percentages from 100:

%H = 100.0% - 57.1 %C - 38.1 %S = 4.8 %H

Now that we know the elemental composition, we can find the empirical formula. Again, assume we have 100g of the compound. With 100g of the compound, 57.1g is carbon, 38.0g is sulfur and 4.9g is hydrogen. Convert these masses to moles:

We can now determine the empirical formula by dividing all of the mole quantities by the smallest. This will give us our ratio for each element.

The ratio of C:H:S is 4:4:1 which makes the empirical formula: C_{4}H_{4}S and the molar mass is 84 g/mol. The molecular weight of our compound is 168 g/mol. The molecular formula will be twice the empirical formula:

C_{(4 x 2)} H_{(4 x 2)} S_{(1 x 2)} = C_{8}H_{8}S_{2}