Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages

Free tool · Math and study

Molar mass calculator

Type a chemical formula and read its molar mass in grams per mole. The table shows every element with its number of atoms, its atomic weight and its share of the total mass.

  • Free
  • No sign-up
  • Runs in your browser

By Maaz Zindani · Updated

Capital letters start each element: NaCl, H2O, Ca(OH)2, C6H12O6. Brackets work. Write a hydrate with a dot: CuSO4·5H2O or CuSO4.5H2O. A charge at the end is ignored.

Result

74.092 g/molmolar mass of Ca(OH)2

  • 3 elements
  • 5 atoms
  • 0.074092 kg/mol
ElementAtomsWeightMass%
Ca140.07840.07854.09%
O215.99931.99843.19%
H21.0082.0162.72%
Total574.092100%
Sum
40.078 + 2 × 15.999 + 2 × 1.008 = 74.092

Working: molar mass = the sum of (number of atoms × atomic weight) over every element. The mass percent of an element is its part of the total, divided by the total.

Atomic weights are the abridged standard values of IUPAC's atomic weights commission (CIAAW, 2024 table), so answers match a textbook that uses three to five digits. The unit is grams per mole.

How to use the Molar Mass Calculator

  1. Type the Chemical formula. Start each element with a capital letter, as in NaCl or C6H12O6.
  2. Use brackets for groups, like Ca(OH)2, and a dot for a hydrate, like CuSO4·5H2O. A charge written at the end is ignored.
  3. To turn a mass into moles or back, type Grams or Moles as well.
  4. Read the molar mass and the element table under Result.

How do I calculate the molar mass of a compound?

Molar mass is the mass of one mole of a substance, in grams per mole. To find it, multiply the atomic weight of each element by the number of its atoms in the formula and add the results. Water, H2O, has two hydrogens and one oxygen: 2 × 1.0080 + 15.999 = 18.015 g/mol.

Brackets multiply everything inside them. In calcium hydroxide, Ca(OH)2, the 2 applies to both O and H, so the formula holds 1 calcium, 2 oxygen and 2 hydrogen atoms: 40.078 + 2 × 15.999 + 2 × 1.0080 = 74.092 g/mol. This calculator reads nested brackets, round, square and curly, so Al2(SO4)3 works too.

The number you get is the same whether you think of grams for one mole or atomic mass units for one molecule. Only the unit differs, so g/mol is the usual choice in a lab.

Some common formulas, from this calculator
SubstanceFormulaMolar mass (g/mol)
WaterH2O18.015
Carbon dioxideCO244.009
Table saltNaCl58.440
GlucoseC6H12O6180.156
Sulfuric acidH2SO498.072
Baking sodaNaHCO384.006

How do I write a hydrate or a formula with a charge?

A hydrate is a salt that holds water in its crystal. It is written with a dot and a number, and the number multiplies the water part. Copper sulfate pentahydrate, CuSO4·5H2O, is CuSO4 plus five waters: 159.602 + 5 × 18.015 = 249.677 g/mol. Type the dot as a middle dot, a normal full stop or an asterisk. The result lists each part so you can see how much of the mass is water.

A charge such as the 2− on sulfate does not change the mass in this calculator. The mass of the electrons is tiny, so SO4^2− and SO4 give the same figure, and the page says that it has ignored the charge. Write SO4^2− in the box and the tool drops the charge.

What is the mass percent of each element?

The mass percent of an element is the mass it contributes divided by the molar mass, times 100. In Ca(OH)2 the calcium part is 40.078 of 74.092, which is 54.09%. The percents of all the elements add to 100. Use them for a percent composition question, or to see which element dominates a compound.

The table in the result gives the atom count, the weight used and the mass for every element. Check each line against your own working, and keep the weights unrounded until the last step. Rounding each weight first can move the last digit of the total.

Where do the atomic weights come from, and how do I use grams and moles?

The weights are the abridged standard atomic weights published by CIAAW, the IUPAC commission for isotopic abundances and atomic weights (2024 table). They are rounded to the precision most courses use, such as 12.011 for carbon. Some elements, for instance hydrogen, carbon and chlorine, vary a little with where the sample came from, so the standard value is a convenient average.

Elements that have no stable isotope and no standard atomic weight, such as technetium, cannot be used. The page tells you so instead of guessing a number.

To convert a mass to moles, divide by the molar mass; to go the other way, multiply. Type grams or moles in the optional boxes and the result adds the conversion. For example 36.03 g of water is 36.03 ÷ 18.015 = 2 mol. When you need the yield of a reaction, the percent yield calculator uses this same molar mass. For heat questions with the same mass, see the specific heat calculator.

Use it with

Questions

What is the molar mass of water?

Water, H2O, is 2 × 1.0080 + 15.999 = 18.015 g/mol with the atomic weights used here.

How do I find the molar mass of a compound with brackets?

Multiply the atom counts inside the bracket by the number after it, then add all atoms. Ca(OH)2 has 1 Ca, 2 O and 2 H, which is 74.092 g/mol.

How do I calculate the molar mass of a hydrate?

Add the mass of the salt and the number of waters times 18.015. CuSO4·5H2O is 159.602 + 5 × 18.015 = 249.677 g/mol.

What is the difference between molar mass and molecular weight?

They have the same number. Molar mass is in grams per mole, and molecular weight is a ratio with no unit, or in atomic mass units.

How do I change grams to moles?

Divide the mass in grams by the molar mass in g/mol. 36.03 g of water divided by 18.015 g/mol is 2 mol.

Why does the tool say my symbol is not an element?

Element symbols start with a capital letter and have at most one small letter after it. Co is cobalt but CO is carbon and oxygen, and "h2o" in small letters is not accepted.

The tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations are checked against the tool's own output.