Article — Empirical Formula Calculator
How the empirical formula calculator works
An empirical formula gives the smallest whole-number ratio of atoms in a compound. Glucose (C6H12O6) reduces to CH2O. The calculator above converts mass percent composition into the empirical formula by dividing each percent by atomic mass, normalizing to the smallest ratio, multiplying up to whole numbers, then reducing by greatest common divisor.
The technique dates to the early 1800s and remains the standard way to characterize an unknown organic compound from its combustion analysis or elemental percentage data.
What an empirical formula is
The empirical formula is the simplest integer ratio of elements. It tells you the relative proportions but not the actual molecular size. CH2O could be formaldehyde (CH2O), acetic acid (C2H4O2), or glucose (C6H12O6) — all three have the same empirical formula because they share the same C:H:O ratio of 1:2:1.
Empirical formulas always use whole-number subscripts. Fractional subscripts are not allowed by definition — if you get 1.5 in your ratio, multiply through by 2 to get integers.
Empirical formula vs molecular formula
The molecular formula is the actual atom count in one molecule. To go from empirical to molecular you need an extra piece of information: the molecular molar mass, usually from mass spectrometry, freezing point depression, or vapor density.
n = Mmol / Memp multiplierMolecular = n × Empirical Glucose 180.16 / 30.03 = 6 → C6H12O6Benzene 78.11 / 13.02 = 6 → C6H6Some compounds have identical empirical and molecular formulas. Water is H2O for both because the ratio 2:1 is already in lowest terms. Methane is CH4. Most simple inorganic salts — NaCl, CaCO3, MgO — do too.
The four steps from mass percent to empirical formula
The algorithm is mechanical:
- Step 1 — Assume a 100 g sample. Each mass percent becomes grams directly. 40% C in a 100 g sample is 40 g of carbon.
- Step 2 — Divide by atomic mass. 40 g / 12.011 g/mol = 3.33 mol of C.
- Step 3 — Divide every mole count by the smallest one. If the smallest is 3.33 mol, dividing by it gives unitless ratios.
- Step 4 — Multiply up to whole numbers (typical factors are 2, 3, 4, 5, 6) and then reduce by the greatest common divisor.
The calculator tries multipliers from 1 to 6 with a tolerance of 0.06 (so 1.94 rounds to 2, but 1.5 forces multiplier 2). After that it divides by the GCD of all subscripts to make sure the formula is in lowest terms.
Joseph Proust's law of definite proportions, published in 1799, says compounds always combine elements in fixed mass ratios. Empirical formula determination grew directly out of that observation and gave John Dalton the foundation for his atomic theory eight years later.
Worked empirical formula examples
Glucose — 40.0% C, 6.71% H, 53.29% O. In 100 g: 40 / 12.011 = 3.33 mol C, 6.71 / 1.008 = 6.66 mol H, 53.29 / 15.999 = 3.33 mol O. Divide by 3.33 to get 1: 2: 1, already whole. Empirical formula: CH2O, empirical mass 30.03 g/mol.
Hydrogen peroxide — 5.93% H, 94.07% O. Moles: 5.93 / 1.008 = 5.88 mol H, 94.07 / 15.999 = 5.88 mol O. Ratio 1: 1. Empirical formula: HO. The molecular formula H2O2 doubles it because measured molar mass is 34.01 g/mol.
Aspirin — 60.00% C, 4.48% H, 35.52% O. Moles: 60 / 12.011 = 5.00 mol C, 4.48 / 1.008 = 4.44 mol H, 35.52 / 15.999 = 2.22 mol O. Divide by 2.22 to get 2.25: 2.00: 1.00. Multiply by 4 (smallest factor that works) to get 9: 8: 4. Empirical formula: C9H8O4.
Handling non-integer mole ratios
Sometimes the smallest mole ratio is not 1. Common patterns:
- 1.50 — multiply by 2 (becomes 2:3)
- 1.33 or 2.67 — multiply by 3 (becomes 4:3 or 8:3)
- 1.25 or 2.25 — multiply by 4 (becomes 5:4 or 9:4)
- 1.20 or 1.40 — multiply by 5
If a number is close to a whole number but off by less than about 0.06, round it. Experimental percent compositions rarely come in better than ±0.1% accuracy, so 2.98 should round to 3 without hesitation.
If your sample is a hydrated salt like CuSO4 · 5 H2O, the percentage analysis will include hydrogen and additional oxygen from the water. The calculator will give you a hydrate formula, not the anhydrous salt. Dry the sample first or subtract the water mass before entering percentages.
Empirical formula from combustion analysis
For organic compounds the percent composition usually comes from combustion analysis. You burn a known mass of sample in excess oxygen and weigh the CO2 and H2O produced. From the masses:
mass of C = mass of CO2 × (12.011 / 44.010), and mass of H = mass of H2O × (2 × 1.008 / 18.015). Mass of oxygen (and nitrogen, sulfur etc.) is found by difference.
Plug those masses (or the equivalent percentages) into the calculator and the empirical formula falls out.
For homework-grade accuracy, the sum of all your mass percentages should land within 0.5% of 100. Larger deviations usually mean you forgot an element — commonly oxygen in organic compounds, which is rarely measured directly and shows up as the missing remainder.
Common empirical formula mistakes
- Wrong atomic mass — using H = 1 instead of 1.008 introduces a 0.8% error that can throw off marginal ratios.
- Stopping at fractional ratios — 1: 1.5: 1 is not a final answer; multiply by 2.
- Forgetting the GCD step — subscripts 2:4:2 should reduce to 1:2:1.
- Mixing percent and gram counts — if you start with grams, make sure the implicit 100 g assumption is consistent.
- Ignoring oxygen — in organic analysis oxygen is usually found by difference, not directly measured.
If you get an empirical formula that does not match a known compound, two things to check: did you miss an element, and did you handle hydration water correctly? Standard atomic mass tables sometimes omit minor elements like sulfur or phosphorus from analytical reports because the analysis was specific to C, H, and N. Add them in if you have evidence (smell, color, separate analyses) before declaring victory.
Finally, an empirical formula does not specify connectivity or isomerism. C2H6O fits both ethanol (CH3CH2OH) and dimethyl ether (CH3OCH3); the empirical formula CH3O fits glycolaldehyde, methoxy radicals, and many others. To pin down the actual structure you need spectroscopy — NMR, IR, or mass spec fragmentation patterns — on top of the elemental ratios.