The formula

Percent composition of an element
%X = (mass X / mass compound) × 100%
Moles of each element from a 100 g sample
n(X) = %X / M(X)
Subscript ratio
ratio(X) = n(X) / n(smallest)
Clearing a fractional ratio
multiply every ratio by the smallest integer that makes them all whole

What the symbols mean

SymbolMeaningUnit
%XMass percentage of element X in the compound%
n(X)Moles of element X in the samplemol
M(X)Molar mass of element X, the atomic mass in grams per moleg/mol
mass XMass of element X in the sampleg
mass compoundTotal mass of the sampleg
ratio(X)Mole ratio of X against the least abundant element, which becomes its subscriptdimensionless

When it applies

  • You have percent composition or the mass of each element, and want the formula rather than the other way round.
  • Assume a 100 g sample when the data is in percent, so each percentage reads directly as a mass in grams.
  • The empirical formula alone cannot tell you the molecule. Glucose, formaldehyde and acetic acid all reduce to CH₂O, so a molar mass is needed to go further.
  • Ratios within about 0.02 of a whole number round; anything near .5, .33 or .25 gets multiplied up instead of rounded.

Worked example

Problem. A compound is 40.00% carbon, 6.71% hydrogen and 53.29% oxygen by mass. Find its empirical formula.

  1. Take a 100 g sample, so the percentages become 40.00 g C, 6.71 g H and 53.29 g O.
  2. Convert each to moles with its molar mass: C is 40.00 / 12.011 = 3.3303 mol, H is 6.71 / 1.008 = 6.6567 mol, O is 53.29 / 15.999 = 3.3308 mol.
  3. Divide all three by the smallest, 3.3303 mol: C gives 1.000, H gives 1.999, O gives 1.000.
  4. Those are whole numbers within rounding, so the subscripts are 1, 2 and 1.
  5. The empirical formula is CH₂O. Its formula mass, 30.03 g/mol, is what a molar mass measurement would be compared against to find the molecular formula.

Answer. CH₂O, the simplest whole-number ratio of one carbon to two hydrogens to one oxygen.

Common mistakes

  • Dividing the percentages by each other instead of converting to moles first. Mass ratios and mole ratios are different numbers, and only the mole ratio sets the subscripts.
  • Rounding 1.5 down to 1. A ratio near a half means the whole set has to be doubled, which turns C₁H₁.₅O₁ into C₂H₃O₂.
  • Reporting the empirical formula as the molecular formula. They match only when the multiplier n happens to be 1.
  • Using atomic number instead of atomic mass for the conversion, which quietly wrecks every ratio in the problem.

Related formulas

Sources