Molar Mass Calculator

Enter a chemical formula such as H2O, Ca(OH)2, K4[Fe(CN)6] or CuSO4·5H2O. The calculator counts every atom, uses the current IUPAC atomic weights and shows each step.

Case matters (Co = cobalt, CO = carbon monoxide). Brackets ( ) [ ] { }, hydrates with · * or .
Your inputs are saved in this browser only.

Result

Molar mass M
249.68 g/mol
Molecular formula (Hill notation)
CuH₁₀O₉S
Composition by element
ElementAtomsAtomic mass (g/mol)Mass (g/mol)Mass percent
Cu – Copper163.54663.54625.45 %
S – Sulfur132.0632.0612.84 %
O – Oxygen915.999143.99157.67 %
H – Hydrogen101.008010.08004.04 %
Total21249.68100.00 %
Working
  • Split the formula into parts: CuSO₄ + 5 × H₂O
  • Count the atoms (brackets and coefficients multiplied out): Cu 1, S 1, O 9, H 10
  • Cu: 1 × 63.546 g/mol = 63.546 g/mol
  • S: 1 × 32.06 g/mol = 32.06 g/mol
  • O: 9 × 15.999 g/mol = 143.991 g/mol
  • H: 10 × 1.0080 g/mol = 10.0800 g/mol
  • M = 63.546 + 32.06 + 143.991 + 10.0800 = 249.677 g/mol
  • Check via the parts: M = 159.602 + 5 × 18.015 = 249.677 g/mol
  • Round to 2 decimal places (as precise as the least precise atomic weight): M = 249.68 g/mol

How it is calculated

How to calculate molar mass

The molar mass M of a substance is the mass of one mole of it, in g/mol. For each element, multiply the number of atoms by its atomic weight, then add everything up:

M = Σ (number of atoms × atomic weight)

The atomic weight printed in the periodic table is numerically equal to the molar mass in g/mol. This calculator uses the abridged standard atomic weights published by the IUPAC Commission CIAAW (2021 values, including the 2024 revisions for gadolinium, lutetium and zirconium).

Worked example: copper(II) sulfate pentahydrate, CuSO4·5H2O

  1. Parts: CuSO4 + 5 × H2O
  2. Atoms: Cu 1, S 1, O 4 + 5 · 1 = 9, H 5 · 2 = 10
  3. Cu: 1 × 63.546 = 63.546 · S: 1 × 32.06 = 32.06 · O: 9 × 15.999 = 143.991 · H: 10 × 1.0080 = 10.080
  4. M = 63.546 + 32.06 + 143.991 + 10.080 = 249.677 g/mol
  5. Rounded to 2 decimal places (sulfur is only given to 0.01): M = 249.68 g/mol

Brackets, hydrates and ions

From grams to moles

With the molar mass you can convert between mass m and amount of substance n: n = m / M and m = n × M. Example: 36.03 g of water is n = 36.03 g / 18.015 g/mol = 2 mol.

More chemistry: atomic masses of single elements in the interactive periodic table, density from mass and volume with the density calculator, and the pH of a solution with the pH calculator.

Frequently asked questions

What is the difference between molar mass, molecular weight and molecular mass?

Molar mass is the mass of one mole in g/mol. Molecular mass is the mass of a single molecule in daltons (u), and “molecular weight” is the older, dimensionless term. The numbers are the same: water is 18.015 u per molecule and 18.015 g/mol.

Why does capitalization matter?

Because element symbols would otherwise be ambiguous: Co is cobalt (58.933 g/mol), while CO is carbon monoxide made of one C and one O atom (28.010 g/mol). If you type a formula in lower case, the calculator suggests possible spellings.

How do I enter water of crystallization (hydrates)?

Put a raised dot, an asterisk or a full stop between the salt and the water, with the number of water molecules right before it: CuSO4·5H2O, CuSO4*5H2O and CuSO4.5H2O all give 249.68 g/mol.

How many decimal places should I give?

As many as the least precise atomic weight in the formula. Oxygen is given to 0.001 g/mol, sulfur only to 0.01 g/mol – so H2O gets three decimals and CuSO4·5H2O two. The unrounded value is shown in the working.

Which atomic weights does the calculator use?

The abridged standard atomic weights of the IUPAC Commission CIAAW (Atomic Weights 2021, revised 2024). Elements without stable isotopes, such as technetium, have no standard atomic weight; for these the calculator uses the isotope mass given by PubChem and tells you so.

How do I convert grams to moles?

Divide the mass by the molar mass: n = m / M. 10 g of table salt (NaCl, 58.44 g/mol) is 10 / 58.44 ≈ 0.171 mol. Choose the direction under “Also convert”.

Sources and legal basis

As of:

Related tools