Advanced

Molecular Formula Calculator

Convert an empirical formula into the true molecular formula using the measured molar mass of the compound.
Use element symbols and subscripts, e.g. CH2O or C(OH)2

g/mol

Measured molar mass of the compound
Molecular formula
CH2O × 6 = C6H12O6
n factor
6
Empirical formula mass
30.026 g/mol
Molecular mass
180.156 g/mol
40%
7%
53%
C
H
O
Elemental mass fraction in C6H12O6
Step by step
  1. 1

    Empirical formula mass

    30.026 g/mol
    Sum of each element's atomic weight × atom count in the empirical formula.
  2. 2

    Multiplier n = molar mass ÷ empirical mass

    180.16 ÷ 30.026 = 6
  3. 3

    Molecular mass = empirical mass × n

    30.026 × 6 = 180.156
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Enter the empirical formula and the measured molar mass. The calculator finds the empirical formula mass, divides molar mass by it and rounds to get the integer n, then multiplies every subscript by n to give the molecular formula (e.g. CH2O with 180 g/mol becomes C6H12O6, n = 6).

Formula
n = round(molar mass ÷ empirical formula mass); molecular formula = (empirical formula)ₙ
How this is calculated

The empirical formula gives the simplest whole-number ratio of atoms in a compound. To find the actual molecular formula you need the compound's real molar mass. First the calculator parses your empirical formula (supporting nested parentheses such as Ca(OH)2) and sums the standard atomic weights of every atom to get the empirical formula mass.

It then computes the whole-number multiplier n = round(molar mass ÷ empirical formula mass). Each subscript in the empirical formula is multiplied by n to produce the molecular formula, which is displayed in Hill notation (carbon first, then hydrogen, then the remaining elements alphabetically). The molecular mass shown is the empirical mass times n.

Assumptions: the molar mass should be in g/mol and should be an exact multiple of the empirical mass (within rounding) for a clean result. If your measured molar mass already equals the empirical mass, n = 1 and the molecular formula equals the empirical formula. Unknown element symbols, malformed formulas, or a non-positive molar mass return no result.

Frequently asked questions

The empirical formula is the simplest whole-number ratio of atoms (e.g. CH2O), while the molecular formula gives the actual number of atoms in one molecule (e.g. C6H12O6 for glucose). They differ by the integer factor n.

Divide the experimentally measured molar mass by the empirical formula mass and round to the nearest whole number: n = round(molar mass ÷ empirical mass).

Yes. The parser supports nested parentheses and brackets, distributing the multiplier over every atom inside the group before computing the formula mass.

Also known as

molecular formula
empirical to molecular
formula from molar mass
n factor
find molecular formula
true formula
molecular formula from empirical

APA

TG we-Calculate Editorial Team. (2026). Molecular Formula Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/molecular-formula-calculator

Chicago

TG we-Calculate Editorial Team. "Molecular Formula Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/molecular-formula-calculator.

IEEE

TG we-Calculate Editorial Team, "Molecular Formula Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/molecular-formula-calculator

BibTeX

@misc{wecalculate_molecular_formula_calculator, title = {Molecular Formula Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/molecular-formula-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?