Molecular Weight Calculator
Molecular Weight Calculator
Enter a chemical formula - simple ones like H2O or NaCl, or ones with parentheses like Ca(OH)2 or Fe2(SO4)3 - and this calculator parses it, looks up each element's atomic mass, and adds them together to give the compound's molecular weight (molar mass) in grams per mole.
Molecular weight is simply the sum of every atom's atomic mass in the formula — water (H₂O) works out to 2 × 1.008 (hydrogen) plus 15.999 (oxygen), giving 18.015 g/mol. Parentheses with a subscript multiply everything inside them by that number, so Ca(OH)₂ expands to 1 calcium, 2 oxygen, and 2 hydrogen atoms total (the entire OH group is duplicated, not just the oxygen) — correctly parsing this nested structure is exactly the kind of detail that makes calculating molecular weight by hand error-prone for anything beyond the simplest formulas.
- Molecular weight (molar mass) is the sum of the atomic masses of every atom in the formula, e.g. water (H₂O) = 2 × 1.008 (hydrogen) + 15.999 (oxygen) = 18.015 g/mol.
- Parentheses with a subscript multiply everything inside, so Ca(OH)₂ means 1 calcium, 2 oxygen, and 2 hydrogen atoms (the OH group is duplicated).
- The result includes a step-by-step breakdown showing each element's contribution to the total, plus a bar chart of each element's share of the total mass.
How do I calculate the molecular weight of a compound?
Add up the atomic mass of every atom in the formula - for example glucose (C6H12O6) is 6 carbon + 12 hydrogen + 6 oxygen atoms, giving a molar mass of about 180.16 g/mol.
What is the molecular weight of water?
Water (H2O) has a molecular weight of about 18.015 g/mol: 2 hydrogen atoms (2 × 1.008) plus 1 oxygen atom (15.999).
Molecular Weight Calculator


Enter a chemical formula - simple ones like H2O or NaCl, or ones with parentheses like Ca(OH)2 or Fe2(SO4)3 - and this calculator parses it, looks up each element's atomic mass, and adds them together to give the compound's molecular weight (molar mass) in grams per mole.
Molecular weight is simply the sum of every atom's atomic mass in the formula — water (H₂O) works out to 2 × 1.008 (hydrogen) plus 15.999 (oxygen), giving 18.015 g/mol. Parentheses with a subscript multiply everything inside them by that number, so Ca(OH)₂ expands to 1 calcium, 2 oxygen, and 2 hydrogen atoms total (the entire OH group is duplicated, not just the oxygen) — correctly parsing this nested structure is exactly the kind of detail that makes calculating molecular weight by hand error-prone for anything beyond the simplest formulas.

- Molecular weight (molar mass) is the sum of the atomic masses of every atom in the formula, e.g. water (H₂O) = 2 × 1.008 (hydrogen) + 15.999 (oxygen) = 18.015 g/mol.
- Parentheses with a subscript multiply everything inside, so Ca(OH)₂ means 1 calcium, 2 oxygen, and 2 hydrogen atoms (the OH group is duplicated).
- The result includes a step-by-step breakdown showing each element's contribution to the total, plus a bar chart of each element's share of the total mass.
How do I calculate the molecular weight of a compound?
Add up the atomic mass of every atom in the formula - for example glucose (C6H12O6) is 6 carbon + 12 hydrogen + 6 oxygen atoms, giving a molar mass of about 180.16 g/mol.
What is the molecular weight of water?
Water (H2O) has a molecular weight of about 18.015 g/mol: 2 hydrogen atoms (2 × 1.008) plus 1 oxygen atom (15.999).
