Skip to content
Toolzent

Molar Mass Calculator

Find the molar mass of any compound in g/mol. Enter a chemical formula like NaCl or H2SO4 for an instant per-element breakdown and total molar mass.

Updated 2026-06-14 · Free · No sign-up · Runs privately in your browser

Molar mass of
Element Atomic weight Atoms Mass (g/mol) % of mass

How the Molar Mass Calculator Works

This calculator returns the molar mass of any compound in grams per mole (g/mol). Enter a chemical formula such as NaCl, H2SO4, or Ca(OH)2, and it parses the element symbols, subscripts, and parentheses, then sums the standard atomic weights to give the total molar mass plus a per-element breakdown.

How to Use It

  1. Type a chemical formula in the input box using standard notation — capitalised element symbols (Na, Cl), plain-number subscripts (O2), and parentheses for groups (Ca(OH)2).
  2. The molar mass updates as you type. There is no button to press.
  3. The top card shows the total molar mass; the table below lists every element with its atomic weight, atom count, mass contribution, and percentage of the total.
  4. Tap an example chip to load a common compound instantly.

The Formula

Molar mass is the sum of the atomic weights of all atoms in the formula:

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

The tool uses IUPAC standard atomic weights for all 118 elements, so the numbers agree with a periodic table and chemistry textbooks.

Worked Example: Sulfuric Acid (H2SO4)

Count each element and multiply by its atomic weight:

  • Hydrogen: 2 × 1.008 = 2.016
  • Sulfur: 1 × 32.06 = 32.06
  • Oxygen: 4 × 15.999 = 63.996

Add them together:

2.016 + 32.06 + 63.996 = 98.07 g/mol

Why Molar Mass Matters

Molar mass is the bridge between the mass you weigh on a balance and the number of moles in a reaction:

  • Grams to moles — moles = mass ÷ molar mass.
  • Solution concentration — a 1 molar solution contains one molar mass in grams per litre.
  • Stoichiometry — molar masses let you find limiting reagents and theoretical yields.

Common Molar Masses

CompoundFormulaMolar mass (g/mol)
Sodium chlorideNaCl58.44
WaterH2O18.015
Carbon dioxideCO244.009
Sulfuric acidH2SO498.07
Calcium hydroxideCa(OH)274.092
Aluminium sulfateAl2(SO4)3342.15

Frequently asked questions

What is molar mass?+

Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). It equals the sum of the standard atomic weights of every atom in the chemical formula. For sodium chloride, NaCl, the molar mass is 22.99 + 35.45 = 58.44 g/mol.

How do I calculate molar mass from a formula?+

Multiply each element's standard atomic weight by the number of its atoms in the formula, then add the products. For sulfuric acid, H2SO4: (2 × 1.008) + 32.06 + (4 × 15.999) = 98.07 g/mol.

Is molar mass the same as molecular weight?+

The two share the same number. Molecular weight is dimensionless or in atomic mass units (amu) and refers to one molecule, while molar mass carries units of g/mol and refers to a mole of molecules. You can use either term for the value this calculator returns.

How do I use molar mass to convert grams to moles?+

Divide the mass in grams by the molar mass in g/mol: moles = grams ÷ molar mass. For example, 18 g of water divided by 18.015 g/mol is about 1 mole. To go the other way, multiply moles by molar mass.

Does the calculator handle parentheses and multiple elements?+

Yes. It parses multi-letter symbols (Na, Cl, Mg), subscripts (O2, H2), and bracketed groups with multipliers such as Ca(OH)2 or Al2(SO4)3. The result shows each element's mass contribution and its percentage of the total.