Skip to content
Toolcroft

Molar Mass Calculator - Molecular Weight from Formula

Science & Engineering

Calculate molar mass from formulas like H₂O or CuSO₄·5H₂O. See a per-element breakdown with support for parentheses, nested groups, and hydrates.

How to use this tool

  1. Type a chemical formula into the input field (e.g. H2O, NaCl, C6H12O6).
  2. The calculator parses the formula and displays molar mass in g/mol.
  3. Review the element breakdown table to see each atom's contribution.

How to calculate molar mass

Molar mass equals the sum of (atomic mass × atom count) for every element in the formula. For water (H₂O): (1.008 × 2) + (15.999 × 1) = 18.015 g/mol.

Formula syntax guide

  • Use the capitalised element symbol from the periodic table: H, Na, Fe, Ca.
  • Write the atom count immediately after the symbol: H2O, C6H12O6.
  • Omit "1" - a bare symbol means one atom: NaCl = Na¹Cl¹.
  • Use parentheses for repeating groups: Ca(OH)2 = CaO₂H₂.

Common molar masses

CompoundFormulaMolar mass (g/mol)
WaterH₂O18.015
Carbon dioxideCO₂44.010
Sodium chloride (table salt)NaCl58.44
GlucoseC₆H₁₂O₆180.156
Sucrose (table sugar)C₁₂H₂₂O₁₁342.297
EthanolC₂H₅OH46.069
Sulfuric acidH₂SO₄98.079
Sodium hydroxide (lye)NaOH39.997
AmmoniaNH₃17.031
Acetic acid (vinegar)CH₃COOH60.052
Baking sodaNaHCO₃84.007
Calcium carbonate (chalk)CaCO₃100.087
Iron(III) oxide (rust)Fe₂O₃159.688
AspirinC₉H₈O₄180.159
CaffeineC₈H₁₀N₄O₂194.194

The mole concept

A mole (symbol: mol) is the SI unit of amount of substance. One mole contains exactly 6.02214076 × 10²³ entities (atoms, molecules, ions, or other particles) - Avogadro's number. This bridges atomic-scale mass to laboratory-scale mass:

  • 1 mole of H₂O weighs 18.015 g (its molar mass in grams).
  • 1 mole of NaCl weighs 58.44 g.
  • 1 atom of carbon-12 weighs exactly 12 atomic mass units (u); 1 mole of C-12 weighs 12 g.

Hydrate syntax

For hydrated salts, separate the anhydrous compound from the following formula segment with a middle dot (·), bullet (•), ASCII period (.), or asterisk (*). An integer coefficient after the separator multiplies the entire next segment. For example, copper(II) sulfate pentahydrate is entered as:

CuSO4·5H2O

Molar mass = 63.546 + 32.06 + 4×15.999 + 5×(2×1.008 + 15.999) = 249.677 g/mol.

Frequently asked questions

What is molar mass?

Molar mass is the mass of one mole (6.022 × 10²³ particles) of a substance, expressed in grams per mole (g/mol). It equals the sum of the atomic masses of all atoms in the molecular formula.

How do I write a chemical formula?

Use element symbols exactly as they appear on the periodic table (e.g. Na, Ca, Cl). Follow each symbol with the atom count (omit "1"). Use parentheses for groups such as Ca(OH)₂. For hydrates, separate formula segments with a dot and put the segment coefficient after it, as in CuSO₄·5H₂O. ASCII counts and pasted Unicode subscripts both work.

What is the difference between molar mass and molecular weight?

They are numerically the same but use different units. Molecular weight (or molecular mass) is dimensionless or expressed in unified atomic mass units (u). Molar mass is expressed in g/mol.

Browse all science & engineering