Skip to content

Empirical and Molecular Formulas from Data

A formula is a statement about how many atoms of each element are combined. Laboratory data, however, arrive as masses and percentages. This guide shows how to turn those measurements into the simplest whole-number ratio of atoms, how to decide when a decimal ratio really means a fraction, and how a molar mass upgrades an empirical formula to a molecular one.

Published

Simplest ratio versus actual composition

An empirical formula gives the smallest whole-number ratio of atoms in a compound. A molecular formula gives the actual number of each kind of atom in one molecule, and it is always a whole-number multiple of the empirical formula. Hydrogen peroxide has the molecular formula H₂O₂ and the empirical formula HO. Glucose, C₆H₁₂O₆, has the empirical formula CH₂O, which it shares with formaldehyde and acetic acid.

Mass data alone can only reveal the empirical formula, because H₂O₂ and HO have identical percent compositions. A separate measurement of molar mass is needed to find the multiple. For ionic compounds such as sodium chloride, which form extended lattices rather than discrete molecules, the formula unit is usually written as an empirical formula by convention. The exceptions keep a polyatomic ion intact, as in sodium peroxide, Na₂O₂, which contains the peroxide ion O₂²⁻.

Percent composition from a known formula

Mass percent of an element is the mass of that element in one mole of the compound divided by the molar mass, times 100. This guide uses IUPAC standard atomic weights rounded to two decimal places: H 1.01, C 12.01, N 14.01, O 16.00, S 32.06, and Fe 55.85.

Worked example 1. Ammonium sulfate, (NH₄)₂SO₄, is used as a nitrogen fertilizer. What is its mass percent nitrogen? One formula unit contains 2 N, 8 H, 1 S, and 4 O, so the molar mass is 2(14.01) + 8(1.01) + 32.06 + 4(16.00) = 28.02 + 8.08 + 32.06 + 64.00 = 132.16 g/mol. Nitrogen: 28.02 ÷ 132.16 × 100 = 21.20% N. The other elements work out to 6.11% H, 24.26% S, and 48.43% O, and the four values sum to 100.00%, a useful check that no atoms were missed.

Turning masses into a whole-number mole ratio

Subscripts count atoms, and atoms are counted in moles, so the method always passes through moles. Grams of different elements cannot be compared directly because their atoms have different masses.

The decimal-to-fraction step needs judgment. Experimental ratios are rarely exact, so a value within about 0.1 of a whole number can usually be rounded, but a value near 1.5, 1.33, 1.67, 1.25, or 1.75 signals a fraction. Multiply every ratio by 2, 3, or 4 as appropriate. For example, an iron oxide sample containing 1.737 g Fe and 0.747 g O gives 0.03110 mol Fe and 0.0467 mol O. The ratio O:Fe is 1.50, so doubling gives Fe₂O₃.

  • Start from masses. If you have percentages, assume a 100 g sample so each percentage becomes grams.
  • Convert each mass to moles using that element's atomic weight.
  • Divide every mole value by the smallest one.
  • If any ratio is not close to a whole number, multiply all ratios by the smallest integer that makes them whole.
  • Write the subscripts in the conventional order (for organic compounds, C first, then H, then the rest alphabetically).

Worked example: a carboxylic acid from percent composition

Worked example 2. Analysis of a white crystalline acid gives 40.68% C, 5.13% H, and 54.19% O by mass. A separate measurement places its molar mass at 118 g/mol. Find the empirical and molecular formulas.

Assume 100 g, so the sample has 40.68 g C, 5.13 g H, and 54.19 g O. Convert to moles: 40.68 g ÷ 12.01 g/mol = 3.387 mol C; 5.13 g ÷ 1.01 g/mol = 5.079 mol H; 54.19 g ÷ 16.00 g/mol = 3.387 mol O. Divide by the smallest value, 3.387: C 1.000, H 1.500, O 1.000.

The hydrogen ratio of 1.500 is a half, not a rounding error, so multiply every ratio by 2: C₂H₃O₂. Its formula mass is 2(12.01) + 3(1.01) + 2(16.00) = 59.05 g/mol. The multiple is 118 ÷ 59.05 = 2.00, so the molecular formula is C₄H₆O₄. This is the formula of succinic acid. Rounding 1.5 up to 2 would have given CH₂O (30.03 g/mol), and 118 ÷ 30.03 = 3.93 is not a whole number, a sign that the empirical formula is wrong.

Worked example: combustion analysis of an organic liquid

Worked example 3. A 0.3150 g sample of a liquid containing only C, H, and O is burned completely in excess oxygen. It produces 0.6293 g CO₂ and 0.2577 g H₂O. The vapor has a molar mass of about 88 g/mol. Find both formulas.

All of the carbon ends up in CO₂ and all of the hydrogen in H₂O. Mass of C = 0.6293 g CO₂ × (12.01 g C / 44.01 g CO₂) = 0.17173 g. Mass of H = 0.2577 g H₂O × (2.02 g H / 18.02 g H₂O) = 0.028888 g. Oxygen cannot be traced the same way, because much of the oxygen in the products came from the O₂ supply, so find it by difference: 0.3150 − 0.17173 − 0.028888 = 0.11438 g O.

Moles: 0.17173 ÷ 12.01 = 0.014299 mol C; 0.028888 ÷ 1.01 = 0.028602 mol H; 0.11438 ÷ 16.00 = 0.0071488 mol O. Dividing by 0.0071488 gives 2.000 : 4.001 : 1, so the empirical formula is C₂H₄O, with a formula mass of 44.06 g/mol. The multiple is 88 ÷ 44.06 = 2.0, giving C₄H₈O₂. Several different compounds share this molecular formula, including ethyl acetate and butanoic acid, so identifying the substance would need structural evidence such as spectroscopy.

Where empirical-formula calculations go wrong

Most errors happen at two points: choosing what to convert into moles, and deciding how to treat a ratio that is not a whole number. Check both before you write the final formula.

Then test the answer against the data. Recalculate the percent composition of the formula you propose and compare it with the measured values; good data usually agree within a few tenths of a percent. In worked example 2, C₄H₆O₄ gives 40.68% C, 5.13% H, and 54.19% O, matching the analysis.

  • Rounding a ratio of 1.5 or 1.33 to the nearest integer instead of multiplying through.
  • Rounding the mole values to one or two significant figures, which can turn a clear 1.50 into something ambiguous.
  • Dividing a mass of oxygen by 32.00 g/mol. Use the atomic weight of O, 16.00, because subscripts count atoms.
  • Assigning oxygen in combustion products to the sample. Find the sample's oxygen by difference.
  • Ignoring a missing element. If the stated percentages sum to well under 100%, another element, often oxygen, is present.
  • Accepting a non-integer molecular multiple. If molar mass ÷ empirical formula mass is not close to a whole number, recheck the empirical formula.

Limitations and appropriate use

  • Real analytical data carry experimental error, so an observed ratio such as 1.46 may require judgment and sometimes a repeat measurement. This guide's examples use data constructed to be close to ideal.
  • Empirical and molecular formulas do not identify a compound's structure; isomers share both.
  • Combustion analysis as described here applies to compounds containing only C, H, and O. Nitrogen, sulfur, or halogens require additional measurements.
  • The molecular formula is only as reliable as the molar mass measurement, which in practice comes from methods such as mass spectrometry or gas density.