Leave one amount blank and it will be found by difference from 100%.

From percent composition to a formula

The empirical formula is the simplest whole-number ratio of atoms in a compound. The molecular formula is the actual number of each atom in one molecule, always a whole-number multiple of the empirical formula. Glucose has the empirical formula CH₂O and the molecular formula C₆H₁₂O₆, six times larger.

The method: (1) if you have percentages, assume a 100 g sample so each percent becomes grams; (2) divide each mass by the element’s molar mass to get moles; (3) divide every mole value by the smallest one; (4) if a ratio ends in about .5, .33, .67 or .25, multiply all of them by 2, 3 or 4 to reach whole numbers.

Molecular formula. Divide the compound’s molar mass by the empirical formula mass. The answer, n, should be close to a whole number; multiply every subscript by n.

Combustion analysis. Burning a compound of C and H (and possibly O) turns all its carbon into CO₂ and its hydrogen into H₂O. The masses of CO₂ and H₂O give the grams of C and H, and any mass left over from the sample is oxygen.

Rounding. Lab data is never exact, so ratios within about 0.1 of a whole number are rounded. A ratio like 1.5 is never rounded to 2. It means you need to multiply everything by 2.

Worked example: glucose

A compound is 40.0% C, 6.71% H and 53.3% O, with a molar mass of 180.16 g/mol. In a 100 g sample: 40.0 g ÷ 12.011 = 3.330 mol C, 6.71 g ÷ 1.008 = 6.657 mol H, and 53.3 g ÷ 15.999 = 3.331 mol O. Dividing by the smallest (3.330) gives C 1.000, H 1.999, O 1.000, so the empirical formula is CH₂O (30.026 g/mol). Then n = 180.16 ÷ 30.026 = 6.00, so the molecular formula is C₆H₁₂O₆.

Worked example: a ratio that needs a multiplier

Iron oxide with 69.94% Fe and 30.06% O: 69.94 ÷ 55.845 = 1.252 mol Fe and 30.06 ÷ 15.999 = 1.879 mol O. Dividing by 1.252 gives Fe 1.000 and O 1.500. Multiplying both by 2 gives Fe 2 and O 3: Fe₂O₃.

Frequently asked questions

Can the empirical and molecular formulas be the same?

Yes. When n = 1 they match. Water (H₂O), carbon dioxide (CO₂) and methane (CH₄) all have empirical formulas equal to their molecular formulas.

What if the percentages don’t add up to 100%?

Small differences (99.8% or 100.2%) are just rounding and don’t matter. A big gap usually means one element wasn’t listed, most often oxygen. Leave that element’s amount blank and the tool will find it by difference.

How close to a whole number is close enough?

Within about 0.1. A ratio of 2.04 rounds to 2, but 2.5 means multiply by 2, 2.33 or 2.67 means multiply by 3, and 2.25 or 2.75 means multiply by 4. The tool tries multipliers from 1 to 12 and picks the smallest that works.

Do I need the molar mass?

Only for the molecular formula. Percent composition alone can only give the empirical formula, because C₆H₁₂O₆ and CH₂O have exactly the same percentages.