A compound containing carbon, hydrogen, and oxygen gave the following analytical data:
C = 40% and H = 6.67%
Calculate the molecular formula of the compound if its molecular mass is 180.
Solution
Here, only the percentage of carbon and hydrogen is mentioned. The percentage of oxygen is calculated as
Percentage of Oxygen = 100 – (percentage of carbon + percentage of Hydrogen)
Percentage of Oxygen = 100 – (40+6.67) = 53.33%
Step 1: Calculate the empirical formula
There are four steps required to calculate an unknown sample’s empirical formula, which is summarized below -

The empirical formula of the compound is CH2O.
Step 2- Calculation of empirical formula mass
The empirical formula mass is calculated as,
Empirical formula mass of CH2O = 12 + 2 + 16 = 30
Step 3- Finding the value of n
The value of n is obtained by dividing the empirical formula mass by the molecular mass of the sample.

= 180/30 = 6
Step 4- Calculation of molecular formula
The molecular formula is n times empirical formula.
Molecular formula = n x Empirical Formula
Therefore, the molecular formula is
= 6 x CH2O = C6H12O6
Cross-check
By cross-checking the calculated versus obtained masses, we see that,
Calculated = C6H12O6= 6 x 12 + 12 + 6 x 16 = 180 g
Obtained = 180 g
So, the molecular formula calculated is the same as that of the unknown sample.
Related reading -
Molecular Formula (subscribers only premium article)
Empirical Formula (subscribers only premium article)
How to calculate Empirical Formula from percentage composition and atomic masses (subscribers only premium article)
How to calculate molecular formula from empirical formula and molecular masses (subscribers only premium article)
Difference between empirical and molecular formula (free)
Hill nomenclature (free)