About the Empirical Formula Calculator
This empirical formula calculator finds the simplest whole-number ratio of atoms in a compound from its elemental analysis. Enter each element’s mass percent — or the grams of each element found in a sample — and it converts masses to moles, divides by the smallest, and scales to whole numbers, showing every step in a table. Add the compound’s molar mass and it also returns the molecular formula.
It is built for chemistry students solving percent-composition problems and for anyone interpreting combustion or CHN analysis results. Up to five elements are supported, element symbols are case-insensitive (fe, FE and Fe all work), and carbon compounds are written in Hill order (carbon first, hydrogen second, then the rest alphabetically); other compounds keep the element order you enter, so put the metal first for salts such as NaCl or Fe₂O₃.
Real analytical data never gives perfect ratios, so the calculator accepts a mole ratio as whole when it is within 0.1 of an integer and otherwise tries multiplying by 2, 3, 4 and so on (a ratio of 1.5 becomes 3 : 2, 1.33 becomes 4 : 3). Atomic weights are IUPAC standard values.
How to use the empirical formula calculator
- 1Choose whether your data are mass percentages or grams.
- 2Pick the number of elements and type each symbol (case does not matter).
- 3Enter each element’s percentage or mass.
- 4Optionally enter the molar mass to get the molecular formula.
- 5Read the empirical formula and check the step-by-step table.
Formula and method
Treat mass percentages as grams in a 100 g sample (or use the grams you measured). Divide each mass by the element’s atomic weight to get moles, then divide every mole value by the smallest one. The results are the atom ratios; if they are not all within 0.1 of whole numbers, multiply them all by the smallest integer k (2, 3, 4…) that makes them whole.
The molecular formula is a whole-number multiple of the empirical formula. Dividing the measured molar mass M by the empirical formula mass gives that multiple n, and every subscript is multiplied by n. For example, CH₂O has a mass of 30.03 g/mol, and glucose at 180.16 g/mol is 6 × CH₂O = C₆H₁₂O₆.
- Aᵢ
- Standard atomic weight of element i, g/mol
- k
- Smallest multiplier that makes all ratios whole numbers
- M
- Measured molar mass of the compound, g/mol
- n
- Molecular formula ÷ empirical formula multiple
Worked examples
Glucose from 40.00% C, 6.71% H, 53.29% O
In 100 g: 40.00/12.011 = 3.330 mol C, 6.71/1.008 = 6.657 mol H, 53.29/15.999 = 3.331 mol O. Dividing by 3.330 gives 1 : 2 : 1, so CH₂O (30.03 g/mol); 180.16 ÷ 30.03 = 6 gives C₆H₁₂O₆.
Iron oxide from 69.94% Fe and 30.06% O
69.94/55.845 = 1.2524 mol Fe and 30.06/15.999 = 1.8789 mol O give a ratio of 1 : 1.50. Multiplying by 2 gives Fe₂O₃.
From grams: 2.43 g Mg burned with 1.60 g O
2.43 g ÷ 24.305 = 0.1000 mol Mg and 1.60 g ÷ 15.999 = 0.1000 mol O, a 1 : 1 ratio, so the product is MgO.
Frequently asked questions
How do you find the empirical formula from percentages?+
Assume 100 g so each percent becomes grams, divide each by its atomic weight to get moles, divide all by the smallest mole value, and round to whole numbers — multiplying by 2 or 3 first if you get ratios like 1.5 or 1.33.
What is the difference between empirical and molecular formula?+
The empirical formula is the simplest whole-number ratio of atoms (CH₂O); the molecular formula is the actual number of atoms in a molecule (C₆H₁₂O₆). The molecular formula is always a whole-number multiple of the empirical one.
What do I do with a ratio like 1.5 or 2.33?+
Multiply all ratios by the same small integer to clear the fraction: ×2 for .5, ×3 for .33 or .67, ×4 for .25 or .75. Never round 1.5 to 2 — that gives the wrong formula.
How do I find the molecular formula?+
Divide the compound’s molar mass by the empirical formula mass to get a whole number n, then multiply every subscript by n. Benzene, with empirical formula CH (13.02 g/mol) and molar mass 78.11 g/mol, is C₆H₆.
What if my percentages do not add up to 100?+
Often oxygen is not measured directly in combustion analysis. Subtract the sum of the other percentages from 100 to get the oxygen percentage, then include it as an element.