Skip to content
Daily Dose of Utilities

Empirical & Molecular Formula Calculator

Assume 100 g, convert each element's grams to moles, divide by the smallest, then scale to whole numbers. 40.00% C, 6.71% H and 53.29% O gives CH2O, and with a molar mass of 180.16 g/mol the molecular formula is C6H12O6.

ElementPercent by mass
%
%
%
g/mol

Add it to find the molecular formula too.

Empirical formula

CH₂O

Molecular formula

C₆H₁₂O₆

Show the math

  1. 1

    Assume a 100 g sample

    40% C → 40 g · 6.71% H → 6.71 g · 53.29% O → 53.29 g

    In 100 g of the compound, each percentage becomes the same number of grams.

    = 100 g sample

Read the steps as text
  1. Assume a 100 g sample. 40% C → 40 g · 6.71% H → 6.71 g · 53.29% O → 53.29 g In 100 g of the compound, each percentage becomes the same number of grams.
  2. Moles of Carbon. 40 g ÷ 12.011 g/mol = 3.3303 mol Divide each mass by the element's atomic mass to count atoms in moles.
  3. Moles of Hydrogen. 6.71 g ÷ 1.008 g/mol = 6.6567 mol
  4. Moles of Oxygen. 53.29 g ÷ 15.999 g/mol = 3.3308 mol
  5. Divide by the smallest number of moles. C: 3.3303 ÷ 3.3303 = 1.000 · H: 6.6567 ÷ 3.3303 = 1.999 · O: 3.3308 ÷ 3.3303 = 1.000 This gives the ratio of atoms, with the scarcest element set to 1.
  6. Round to whole numbers for the empirical formula. C 1, H 2, O 1 → CH₂O The empirical formula is the simplest whole-number ratio of atoms.
  7. Empirical formula mass. 12.011 + 2 × 1.008 + 15.999 = 30.026 g/mol
  8. How many empirical units fit in the molar mass?. 180.16 ÷ 30.026 = 6.00 ≈ 6 The molecular formula is a whole-number multiple of the empirical formula.
  9. Molecular formula. (CH₂O) × 6 = C₆H₁₂O₆

Finding an empirical formula step by step

The empirical formula is the simplest whole-number ratio of atoms in a compound. If you know its percent composition, assume you have exactly 100 g of it, so each percentage becomes a mass in grams. Dividing each mass by the element's atomic mass converts it to moles, which counts atoms.

Next, divide every mole value by the smallest one, so the scarcest element becomes 1. If the ratios are all close to whole numbers, those are the subscripts. If one ends in about .5, .33, .25 or similar, multiply every ratio by 2, 3, 4 and so on until they are all whole. The calculator picks the smallest multiplier that brings every ratio within 0.1 of a whole number.

Iron oxide that is 69.94% iron and 30.06% oxygen gives 1.2524 mol Fe and 1.8789 mol O, a ratio of 1 : 1.5. Doubling gives 2 : 3, so the empirical formula is Fe2O3.

From empirical to molecular formula

Several compounds can share an empirical formula. Formaldehyde, acetic acid and glucose are all CH2O. To tell them apart you need the compound's molar mass, usually measured by mass spectrometry. Divide it by the empirical formula mass, round to a whole number n, and multiply every subscript by n.

For glucose the empirical formula mass is 30.026 g/mol, and 180.16 ÷ 30.026 = 6.00, so the molecular formula is C6H12O6. If the division doesn't come out close to a whole number, the calculator warns you to double-check the molar mass.

Frequently asked questions

What is the difference between an empirical and a molecular formula?
The empirical formula is the simplest whole-number ratio of atoms (CH2O for glucose). The molecular formula is the actual number of atoms in one molecule (C6H12O6), which is always a whole-number multiple of the empirical formula.
Why do we assume a 100 g sample?
It makes each percentage equal to a mass in grams, so 40% carbon is simply 40 g. Any sample size gives the same ratio; 100 g just skips a step.
What if my mole ratio is 1.5 or 1.33?
Multiply all the ratios by the same whole number to clear the fraction: 1.5 needs × 2, 1.33 needs × 3, and 1.25 needs × 4. Don't round 1.5 down to 1 or up to 2, because that changes the formula.
Can I use grams instead of percentages?
Yes. Switch to Mass of each element and enter the grams measured in an experiment, for example from burning magnesium: 2.43 g Mg combined with 1.60 g O gives MgO.

Related tools