🔬 Molecular Formula Calculator
Enter the empirical formula mass and the compound’s actual molar mass to find the whole-number multiplier used to build the molecular formula.
From empirical to molecular formula
An empirical formula gives the simplest whole-number ratio of atoms in a compound, while the molecular formula gives the actual number of atoms in one molecule. The molecular formula is always a whole-number multiple of the empirical formula.
The formula used
The multiplier n is found with n = molar mass ÷ empirical formula mass, rounded to the nearest whole number. Multiplying every subscript in the empirical formula by n gives the molecular formula. For example, an empirical formula of CH2O (mass 30 g/mol) with an actual molar mass of 180 g/mol gives n = 6, so the molecular formula is C6H12O6.
- The empirical formula mass is the sum of atomic masses for the empirical formula’s atoms.
- The actual molar mass usually comes from mass spectrometry or a known compound identity.
Because the raw ratio rarely lands on an exact whole number due to rounding of atomic masses, this calculator also reports the rounding error so you can sanity-check the result. This tool is intended for general chemistry education and lab planning purposes.