Molecular formula calculator
Enter an empirical formula such as CH2O and the measured molar mass to see how many times the empirical unit repeats in the molecule.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter empirical formula and molar mass of the compound.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
n = molar mass ÷ empirical formula mass, rounded to a whole number; molecular formula = empirical formula × n.
Example
Inputs: Empirical formula = CH2O, Molar mass of the compound = 180.16 g/mol. Result: Molecular formula: C6H12O6; Multiplier n: 6; Empirical formula mass: 30.026 g/mol.
CH2O
C6H12O6
Limits and caveats
- Needs a reasonably accurate measured molar mass; ratios more than 0.1 away from a whole number are rejected.
- Brackets are expanded in the result, and elements keep the order of the formula you typed.
Questions about this tool
How do empirical and molecular formulas differ?
The empirical formula is the simplest atom ratio; the molecular formula is the actual atom count, such as CH2O versus C6H12O6.
Where does the molar mass come from?
Usually from mass spectrometry or a colligative property measurement, or it is given in the problem.
Can both formulas be the same?
Yes, when n = 1, as with water, H2O.
