Molecular Weight Calculator

Find the molar mass of a compound from its chemical formula.

Result

Molar mass
18.015g/mol
Export:
Mass contribution by element
  • H2.0211.2%
  • O1688.8%

Element breakdown

ElementCountSubtotal (g/mol)
H22.016
O115.999

How molar mass is calculated

Every element has a standard atomic weight — its average atomic mass in grams per mole, weighted across natural isotopes. To find a compound's molar mass you count how many atoms of each element the formula contains, multiply each count by that element's atomic weight, and add the results together.

The parser reads the formula left to right, recognising one- and two-letter symbols (Ca, Cl, Na), the numbers that follow them, and parentheses with their own multipliers. So Ca(OH)2 is read as one calcium, two oxygen and two hydrogen, even though the 2 sits outside the bracket.

Reading the breakdown

The headline figure is the molar mass in grams per mole — the mass of one mole (6.022×10²³ units) of the compound. The table and pie chart break that total down by element, showing how much each contributes. For organic molecules carbon and oxygen usually dominate the mass even when hydrogen dominates the atom count, because hydrogen is so light.

Knowing the molar mass lets you convert between grams and moles, which is the starting point for almost every stoichiometry or solution-concentration calculation.

Tips and limitations

Capitalisation matters: "CO" is carbon monoxide (one C, one O) while "Co" is the element cobalt. Write counts as plain numbers after the symbol (H2O, not H₂O) and use round brackets for groups. The tool covers common elements from hydrogen through lead and uses standard average atomic weights, so results reflect natural isotopic abundance rather than a single isotope.

Formula

molar mass = Σ (atomic weight × count)

Frequently asked questions

Which elements are supported?
Common elements from hydrogen to lead are included. Unrecognised symbols raise an error.
Can I use parentheses?
Yes — groups like Ca(OH)2 and nested counts are fully supported.