Skip to main content
⚛️ Stoichiometry

Molar Mass Calculator

Enter a chemical formula like H₂O, C₆H₁₂O₆ or Ca(OH)₂ to get its molar mass (molecular weight) in g/mol — with a per-element breakdown.

Molar mass in g/mol
Per-element breakdown
Handles parentheses
grams ↔ moles
100% Free
🧪 Open All Chemistry Calculators 📖 Read the Guide

Molar mass — Quick answer

Add the atomic weight of every atom in the formula.

molar mass = Σ (atomic weight × count)  ·  moles = grams ÷ g/mol

Worked example: H₂O → 2×1.008 + 15.999 = 18.015 g/mol.

Examples

FormulaMolar mass
C₆H₁₂O₆180.156 g/mol
NaCl58.44 g/mol
Ca(OH)₂74.092 g/mol

Uses IUPAC standard atomic weights. Case matters: Co ≠ CO.

⚛️ Molar Mass Calculator

Type a formula (use capitals for elements, e.g. Ca(OH)2).

Molar mass
Total atoms
Distinct elements
Heaviest element

ℹ️ Use element symbols and parentheses, e.g. H2O, Al2(SO4)3. Case-sensitive. No hydrate dots or charges.

Molar mass (molecular weight) is the mass of one mole of a compound, found by adding the standard atomic weights of every atom in its formula. This calculator parses a formula — including parentheses and nested groups — and returns the molar mass in g/mol with a per-element breakdown.

Reviewed: June 20, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: IUPAC standard atomic weights, recomputed in code.

How it's summed

Molar mass
M = Σ (atomic weight of element × number of atoms)

Each element symbol contributes its atomic weight times how many of that atom appear. Subscripts multiply the element just before them; a number after a closing parenthesis multiplies everything inside the group. Symbols are case-sensitive — Co is cobalt, but CO is carbon plus oxygen. Once you have the molar mass, moles = mass ÷ molar mass converts grams to moles in stoichiometry.

Worked examples

Water, H₂O:

18.015 g/mol
2(1.008) + 15.999 = 2.016 + 15.999 = 18.015

Glucose, C₆H₁₂O₆:

180.156 g/mol
6(12.011) + 12(1.008) + 6(15.999) = 72.066 + 12.096 + 95.994

Calcium hydroxide, Ca(OH)₂:

74.092 g/mol
40.078 + 2(15.999 + 1.008) = 40.078 + 34.014

Parentheses make groups easy: in Al₂(SO₄)₃ the (SO₄) is taken three times, giving 342.132 g/mol. Knowing the molar mass, 36 g of water is about 2.0 moles, since 36 ÷ 18.015 ≈ 2.

Frequently Asked Questions

How do I calculate molar mass?

Sum atomic weights of all atoms. H2O = 2×1.008 + 15.999 = 18.015 g/mol.

Molar mass of glucose (C6H12O6)?

180.156 g/mol.

How do I write formulas with groups?

Parentheses + subscript, like Ca(OH)2 or Al2(SO4)3. Nested groups work too.

Molar mass vs molecular weight?

Same number; molar mass has units g/mol, molecular weight is relative (dimensionless).

How do I convert grams to moles?

moles = grams ÷ molar mass. 36 g water ÷ 18.015 ≈ 2 mol.

Need more chemistry tools?

Explore molarity, percent composition, theoretical yield, the ideal gas law and more across the AI Calculator suite.

🧪 Open Chemistry Calculators — Free

No registration required · 350+ calculators · PDF report export