Molecular Formula Calculator

A molecular formula is always a whole-number multiple of the empirical formula, the simplest ratio of atoms in a compound. To go from one to the other you need the molar mass of the actual compound and the mass of a single empirical formula unit. Dividing the molar mass by the empirical formula mass gives a multiplier that, rounded to the nearest whole number, tells you how many empirical units make up one molecule. This calculator computes that multiplier and the rounded value. Read atomic masses from the NIST periodic table to find your empirical formula mass.

0.00
0.00
0.00

Molecular formula formula

raw multiplier = molar mass / empirical formula mass
n = round(raw multiplier)
molecular formula = empirical formula with every subscript times n
implied molar mass = n * empirical formula mass

Both masses must be greater than zero, and the molar mass should be at least the empirical formula mass. Compare the implied molar mass to your measured value to check the rounding.

Molecular formula context

  • The molecular formula is always n times the empirical formula, where n is a whole number.
  • Glucose has empirical formula CH2O (about 30.03 g/mol) and molar mass 180.16 g/mol, giving n = 6.
  • When n equals 1 the empirical and molecular formulas are identical.
  • Atomic masses for the empirical formula mass come from the NIST periodic table of the elements.
  • A raw multiplier far from a whole number suggests an error in the molar mass or empirical formula.

Molecular formula: frequently asked questions

What is the difference between empirical and molecular formula?

An empirical formula shows the simplest whole-number ratio of atoms in a compound. A molecular formula shows the actual number of atoms in one molecule. The molecular formula is always a whole-number multiple of the empirical formula, for example glucose has empirical formula CH2O and molecular formula C6H12O6.

How do I find the molecular formula from the empirical formula?

Divide the molar mass of the compound by the mass of one empirical formula unit to get a whole-number multiplier n. Multiply every subscript in the empirical formula by n. This calculator computes that multiplier from the two masses you supply.

What is the empirical formula mass?

The empirical formula mass is the sum of the atomic masses of all atoms in one empirical formula unit. For CH2O it is 12.011 + 2 times 1.008 + 15.999, about 30.03 g/mol. You can read atomic masses from the NIST periodic table.

Why is the multiplier rounded to a whole number?

Atoms come in whole units, so the multiplier must be a whole number. Small deviations from a whole number come from rounding in the measured molar mass or atomic masses. This calculator shows both the raw ratio and the rounded whole-number multiplier.

What if the multiplier is 1?

If the molar mass equals the empirical formula mass, the multiplier is 1 and the empirical formula is already the molecular formula. Water (H2O) and carbon dioxide (CO2) are examples where the two formulas are identical.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.