Skip to content
DataTeo Elements

Molar mass calculator

Type a chemical formula to get its molar mass in g/mol and the mass percentage of each element. Brackets and hydrates are supported, for example Ca3(PO4)2 or CuSO4·5H2O.

Symbols are case-sensitive: Co is cobalt, CO is carbon monoxide. Use a dot or · for hydrates.

How it works

Molar mass is the sum of the atomic weights of all atoms in the formula: M = Σ nᵢ × Aᵣ(i), in grams per mole. For water, M(H₂O) = 2 × Aᵣ(H) + Aᵣ(O). Each element’s mass percentage is its share of that total.

The calculator uses the atomic weights published in PubChem’s periodic table data. Results are shown to two decimal places, which is more than the precision of some inputs:

  • 8 elements have abridged weights in the source (Li 7.0, Ar 39.9, Zn 65.4, Ru 101.1, Te 127.6, Sm 150.4, Os 190.2, Pb 207), so formulas containing them are less precise. These elements are flagged in the result.
  • 34 radioactive elements have no standard atomic weight. For them the calculator uses the mass of a representative isotope and shows a warning.

Frequently asked questions

Is molar mass the same as molecular weight?

Numerically, yes. Molecular weight (relative molecular mass) is dimensionless, or given in u per molecule. Molar mass is the same number in grams per mole.

Why does my textbook give a slightly different value?

Different tables round atomic weights differently, and IUPAC gives some elements a range rather than one number. Small differences in the second decimal place are normal.

Can I enter ions or charges?

No. Enter the neutral formula. The mass of the electrons gained or lost by an ion is negligible at this precision.

Source: PubChem (NCBI, U.S. National Library of Medicine) (U.S. government work). Data retrieved 2026-12-05.About this data · Methodology · Report a correction