Get the molar mass and elemental composition of any chemical formula, including hydrates and brackets.
Add up the atomic masses of every atom in the formula. Water, H₂O, is 2 × 1.008 + 15.999 = 18.015 g/mol; glucose, C₆H₁₂O₆, is 180.156 g/mol; table salt, NaCl, is 58.44 g/mol.
The Molecular Weight Calculator finds the molar mass (formula weight) of a compound from its chemical formula. It understands element symbols, subscripts, round and square brackets such as Ca(OH)₂ and K₄[Fe(CN)₆], and hydrates written with a dot such as CuSO₄·5H₂O. The output includes a table of each element's count, atomic mass, mass contribution and mass percent.
Add a sample mass in grams to get the number of moles and the number of formula units. Chemists and students use molar mass to prepare solutions, balance reactions and convert between mass and moles — try the Molarity Calculator next.
The formula is parsed into atom counts, which are multiplied by standard atomic masses.
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Carbon dioxide | CO2 | 44.009 |
| Sodium chloride | NaCl | 58.44 |
| Glucose | C6H12O6 | 180.156 |
| Sulfuric acid | H2SO4 | 98.072 |
| Calcium hydroxide | Ca(OH)2 | 74.092 |
| Aluminium sulfate | Al2(SO4)3 | 342.132 |
| Copper(II) sulfate pentahydrate | CuSO4·5H2O | 249.677 |
| Ethanol | C2H5OH | 46.069 |
Atomic masses are standard (conventional) atomic weights. For radioactive elements without a stable isotope, the mass number of the longest-lived isotope is used.
| Element | Symbol | Atomic mass (g/mol) |
|---|---|---|
| Hydrogen | H | 1.008 |
| Carbon | C | 12.011 |
| Nitrogen | N | 14.007 |
| Oxygen | O | 15.999 |
| Sodium | Na | 22.990 |
| Magnesium | Mg | 24.305 |
| Aluminium | Al | 26.982 |
| Phosphorus | P | 30.974 |
| Sulfur | S | 32.06 |
| Chlorine | Cl | 35.45 |
| Potassium | K | 39.098 |
| Calcium | Ca | 40.078 |
| Iron | Fe | 55.845 |
| Copper | Cu | 63.546 |
| Zinc | Zn | 65.38 |
| Silver | Ag | 107.87 |
| Gold | Au | 196.97 |
Add the atomic masses of all the atoms in the formula. H₂O is 2 × 1.008 + 15.999 = 18.015 g/mol.
They have the same numerical value. Molecular weight is dimensionless (relative to carbon-12); molar mass has units of g/mol.
180.156 g/mol for C₆H₁₂O₆.
Multiply everything inside the brackets by the number after them: Ca(OH)₂ has 2 O and 2 H.
Use a dot or middle-dot: CuSO4·5H2O. The 5 multiplies the water part.
Divide grams by the molar mass. 18.0156 g of glucose is 0.1 mol.
6.02214076 × 10²³ — Avogadro's number.
The share of the compound's mass contributed by each element, shown in the table.
Check capitalisation, unknown symbols and brackets. Element symbols must start with a capital letter.
No. Everything runs in your browser.