How to use it
- Enter each element symbol followed by its amount, for example C 40, H 6.71, O 53.29.
- Choose whether the amounts are mass percent or grams.
- Optionally enter the molar mass to get the molecular formula.
- Read the formula and the step for each element: amount ÷ atomic weight = moles → ratio → whole number.
How it works
- Moles of each element = amount ÷ atomic weight (percentages are treated as grams of a 100 g sample).
- Each number of moles is divided by the smallest one.
- If the ratios are not whole numbers, they are multiplied by the smallest number from 1 to 12 that brings every ratio within 0.1 of a whole number.
- The formula is written in Hill order: C first, then H, then the other elements alphabetically (alphabetically throughout if there is no carbon).
- Molecular formula: n = molar mass ÷ empirical formula mass, rounded.
Atomic weights are the same as in the molar mass calculator.
Worked example
A compound is 40.0% C, 6.71% H and 53.29% O, with a molar mass of 180.16 g/mol:
- C: 40 ÷ 12.011 = 3.3303 mol; H: 6.71 ÷ 1.008 = 6.6567 mol; O: 53.29 ÷ 15.999 = 3.3308 mol.
- Divided by 3.3303: 1 : 1.999 : 1 → CH₂O, 30.026 g/mol.
- 180.16 ÷ 30.026 ≈ 6, so the molecular formula is C₆H₁₂O₆ (glucose).
Common mistakes
- Rounding too early. Keep three or four decimals in the mole ratios; 1.49 rounded to 1 gives the wrong formula.
- Missing oxygen. Analyses often report only C, H and N; oxygen is the rest up to 100%.
- Upper and lower case. Co is cobalt, CO is carbon and oxygen.