FT FreeToolHub
All Tools Guides About Privacy Terms

Molecular weight calculator (molar mass, MW)

This molecular weight calculator, also searched as a molecular mass calculator, molar mass calculator or MW calculator, adds up the atomic masses of every atom in a chemical formula and returns the molar mass in g/mol. It handles nested parentheses such as Ca3(PO4)2, shows the percent mass of each element, and can turn a mass in grams into moles.

How to use it

  1. Type the formula, for example H2SO4, C6H12O6 or Al2(SO4)3. Capital letters matter: Co is cobalt, CO is carbon monoxide.
  2. Optional: enter a mass in grams to get the number of moles.
  3. Read the molar mass and the element by element table with count, atomic weight, mass contribution and percent mass.

How molecular weight is calculated

Molecular weight = sum of (number of atoms × atomic mass) for every element in the formula. For sulfuric acid, H2SO4:

2 × 1.008 + 1 × 32.065 + 4 × 15.999 = 98.077 g/mol

Textbooks often round atomic masses (H = 1, O = 16), which gives 98 for H2SO4. The calculator uses more precise values, so expect small differences from rounded textbook answers.

Molar mass of common compounds

  • H2O: 18.015 g/mol
  • CO2: 44.009 g/mol
  • NaCl: 58.443 g/mol
  • NaOH: 39.997 g/mol
  • CaCO3: 100.086 g/mol
  • KMnO4: 158.032 g/mol
  • C6H12O6 (glucose): 180.156 g/mol
  • Ca3(PO4)2: 310.174 g/mol
  • Al2(SO4)3: 342.147 g/mol

From mass to moles, and percent composition

Moles = mass ÷ molar mass. For example, 49 g of H2SO4 is 49 ÷ 98.077 ≈ 0.50 mol. Percent composition is each element's share of the molar mass: in water, hydrogen is 2.016 ÷ 18.015 ≈ 11.19% and oxygen is about 88.81%.

Once you have the molar masses, you can move on to reaction amounts. Balance the equation first with the chemical equation balancer, and look up any element on the periodic table.

Hydrates and ions

The formula parser does not read the dot in hydrates such as CuSO4·5H2O. Write the water in brackets instead: CuSO4(H2O)5 gives 249.682 g/mol. Leave out charge signs for ions, since the mass of the electrons is negligible.

Frequently asked questions

What is the difference between molecular weight and molar mass?

Molecular weight is the mass of one molecule in atomic mass units, molar mass is the mass of one mole in g/mol. The numbers are the same, only the units differ. For ionic compounds such as NaCl the correct term is formula mass.

Why does my textbook answer differ slightly?

Textbooks usually round atomic masses to whole numbers, while this calculator uses more precise values. The difference is small and comes only from rounding.

How do I enter a hydrate like CuSO4·5H2O?

Type CuSO4(H2O)5. Brackets with a number after them are supported, and the result is 249.682 g/mol.

Why do I get an unknown element or unexpected character error?

Element symbols are case sensitive: write Co for cobalt, not CO or co. Remove spaces, dots and charge signs such as + or − from the formula.

How do I convert grams to moles?

Enter the mass in grams under the formula. The calculator divides it by the molar mass and shows the moles.

Related keywords

molecular weight calculatormolecular mass calculatormolar mass calculatormw calculatormolar mass of h2so4percent composition calculatorgrams to moles

Related tools

Statistics CalculatorChemical Equation BalancerGPA CalculatorTrigonometry CalculatorLinear System Solver