Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 38 · The Mole

Empirical and Molecular Formulas

Find an empirical formula from percent composition or masses, then use molar mass to get the molecular formula, with worked examples and a solver.

Suppose a lab analysis tells you that an unknown compound contains carbon, hydrogen and oxygen in certain percentages. What is its formula? Working backwards from data to formula is a classic job of the mole concept, and it shows why moles are the right way to count: formulas are about ratios of atoms, and moles let you count atoms from masses.

Two kinds of formula

  • The empirical formula shows the simplest whole-number ratio of atoms. Ethene is C₂H₄ but its empirical formula is CH₂.
  • The molecular formula shows the actual number of atoms in one molecule. It is a whole-number multiple of the empirical formula.
Compound Molecular formula Empirical formula
Water H₂O H₂O
Hydrogen peroxide H₂O₂ HO
Glucose C₆H₁₂O₆ CH₂O
Ethane C₂H₆ CH₃

Ionic compounds such as NaCl have only empirical formulas, because they are lattices rather than molecules.

Finding the empirical formula

Experiments give masses or percentages. The procedure:

  1. Assume a 100 g sample, so each percent becomes grams. (If you have masses, use them directly.)
  2. Convert each mass to moles using its atomic mass.
  3. Divide every mole value by the smallest.
  4. If the ratios are not whole numbers, multiply all by the smallest integer that makes them whole (×2 for x.5, ×3 for x.33 or x.67).

Worked example 1. A compound is 40.0% C, 6.7% H and 53.3% O by mass.

Element Grams Moles ÷ smallest
C 40.0 40.0 / 12.011 = 3.33 1.00
H 6.7 6.7 / 1.008 = 6.65 2.00
O 53.3 53.3 / 15.999 = 3.33 1.00

The ratio C : H : O is 1 : 2 : 1, so the empirical formula is CH₂O.

Worked example 2 (a ratio of 1.5). An iron oxide is 69.94% Fe and 30.06% O.

  • Fe: 69.94 / 55.845 = 1.2524 mol
  • O: 30.06 / 15.999 = 1.8788 mol
  • Divide by 1.2524: Fe 1.000, O 1.500

The ratio 1 : 1.5 is not whole, so multiply by 2 to get 2 : 3. The formula is Fe₂O₃.

Python Empirical formula solver

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The 0.08 tolerance allows for the rounding in measured data. Real laboratory results are never exactly whole numbers, so chemists accept ratios that are within about 0.1 of a whole number.

Never round a ratio like 1.33 or 1.5 down to 1. Round only when you are within about 0.1 of a whole number. Ratios of 1.33, 1.5 and 1.67 signal that you must multiply by 3, 2 and 3 respectively.

From empirical to molecular formula

The molecular formula is n times the empirical formula, where

n = molar mass of compound / empirical formula mass

Worked example 3. The empirical formula of a compound is CH₂O, and its molar mass is found to be about 180 g/mol.

  • Empirical formula mass: 12.011 + 2 × 1.008 + 15.999 = 30.026 g/mol
  • n = 180 / 30.026 = 5.99, so n = 6
  • Molecular formula: C₆H₁₂O₆

The molar mass of the compound can come from other experiments, such as mass spectrometry or measuring the density of a vapor, so you will usually be given it in a problem.

flowchart TD
    A["Percent or mass data"] --> B["Convert to moles"]
    B --> C["Divide by smallest"]
    C --> D["Whole-number ratio:<br/>empirical formula"]
    D --> E["× n = M / empirical mass"]
    E --> F["Molecular formula"]

From experimental data to molecular formula.

Python Molecular formula from empirical formula and molar mass

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Combustion analysis in one paragraph

Many empirical formulas for organic compounds come from burning a known mass of the compound and weighing the CO₂ and H₂O produced. All carbon in the compound ends up in CO₂ and all hydrogen in H₂O, so moles of C = moles of CO₂ and moles of H = 2 × moles of H₂O. Oxygen is found by subtracting the masses of C and H from the sample mass. Then you proceed as above.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the empirical formula of a compound with molecular formula C₆H₁₂O₆?

    Divide all subscripts by their greatest common divisor, 6, to get CH₂O.
  2. 2. A compound has ratios C : H = 1 : 1.5 after dividing by the smallest. What do you do next?

    Multiplying by 2 turns 1 : 1.5 into 2 : 3, whole numbers.
  3. 3. The empirical formula is CH₂ and the molar mass is 56 g/mol (CH₂ = 14.027). What is the molecular formula?

    n = 56 / 14.027 = 3.99, about 4, so C₄H₈.
  4. 4. A sample is 52.14% C, 13.13% H and 34.73% O. Which ratio of moles C : H : O (smallest = 1) is correct? (C = 12.011, H = 1.008, O = 15.999)

    C 4.341, H 13.03, O 2.171 mol. Dividing by 2.171 gives 2.00 : 6.00 : 1.00, so C₂H₆O.

Summary

  • Empirical formula: simplest whole-number atom ratio; molecular formula: actual atom counts.
  • Convert masses (or percents of a 100 g sample) to moles, divide by the smallest, and scale to whole numbers.
  • Molecular formula = empirical formula × (molar mass ÷ empirical mass).
  • Ratios such as 1.5 or 1.33 mean you multiply, not round.

Next: Mole Ratios from Balanced Equations