The molecular formula, on the other hand, shows the number of each type of atom in a molecule. The structural formula shows the arrangement of the molecule. It is also possible for different types of compounds to have equal empirical formulas.

Samples are analyzed in specific elemental analysis tests to determine what percent of a particular element the sample is composed of.

Glucose (C6H12O6), ribose (C5H10O5), acetic acid (C2H4O2), and formaldehyde (CH2O) all have different molecular formulas but the same empirical formula: CH2O. This is the actual molecular formula for formaldehyde, but acetic acid has double the number of atoms, ribose has five times the number of atoms, and glucose has six times the number of atoms.

The chemical compound n-hexane has the structural formula CH3CH2CH2CH2CH2CH3, which shows that it has 6 carbon atoms arranged in a chain, and 14 hydrogen atoms. Hexane's molecular formula is C6H14, and its empirical formula is C3H7, showing a C:H ratio of 3:7.

Suppose you are given a compound such as methyl acetate, a solvent commonly used in paints, inks, and adhesives. When methyl acetate was analyzed in an elemental analysis test, the compound was found to contain 48.64% carbon (C), 8.16% hydrogen (H), and 43.20% oxygen (O). For the purposes of determining empirical formulas, we assume that we have 100 g of the compound. If this is the case, the percentages will be equal to the mass of each element in grams.