Molar mass calculator

Type a formula using element symbols and subscript numbers, such as H2O, Ca(OH)2 or CuSO4·5H2O. The calculator adds up the atomic weights and shows the share of each element. Enter a sample mass in grams to get the number of moles too.

Capital letter starts each symbol (Co is cobalt, CO is carbon monoxide). Use ( ) or [ ] for groups and a dot or · for hydrates, such as CuSO4·5H2O.
Fill in to see the amount of substance in moles.
Molar mass249.677 g/mol
Copper (Cu) × 1
63.546 g/mol · 25.45 %
Hydrogen (H) × 10
10.08 g/mol · 4.04 %
Oxygen (O) × 9
143.991 g/mol · 57.67 %
Sulfur (S) × 1
32.06 g/mol · 12.84 %

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Type the formula. Use capital letters for the first letter of each element and numbers for counts.
  2. Add brackets for groups, such as Al2(SO4)3, or a dot for water of crystallisation.
  3. Read the molar mass in g/mol and the list of elements with their share of the total mass.

How it works

The formula is read into element counts. Brackets multiply everything inside, and a hydrate coefficient multiplies the whole part after the dot. Each count is multiplied by the element’s atomic weight and the products are added. Results are shown to three decimals.

Worked example

Ca(OH)₂ has one calcium (40.078), two oxygen (2 × 15.999) and two hydrogen (2 × 1.008): 40.078 + 31.998 + 2.016 = 74.092 g/mol. Oxygen makes up 31.998 ÷ 74.092 = 43.19 percent of the mass.

Tips

  • Element symbols are case sensitive: Co is cobalt, CO is carbon monoxide.
  • Write subscripts as ordinary digits; Unicode subscripts such as H₂O also work.

Frequently asked questions

What is molar mass?

It is the mass of one mole of a substance, usually in grams per mole (g/mol). It equals the sum of the atomic weights of all atoms in the formula, for example water, H₂O, is 2 × 1.008 + 15.999 = 18.015 g/mol.

How do I enter a hydrate such as copper sulfate pentahydrate?

Write CuSO4·5H2O. A dot, a middle dot (·), a bullet or an asterisk all work before the water part, and the number in front multiplies everything after it. CuSO4·5H2O comes to 249.677 g/mol.

Which atomic weights are used?

The conventional values from the periodic-table tool on this site, rounded to the usual three or more decimal places. For precise laboratory work check the current IUPAC values for your sample.

Does it work for ions or charges?

Charges are not part of the formula parser. For an ion, enter just the atoms, for example SO4 for sulfate; the mass of electrons is negligible at this precision.

What do I do with the moles result?

Moles = mass in grams ÷ molar mass. Use it for reaction calculations or to find a molarity with the molarity calculator.

More in Education

All tools in this category: Education ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.