Math & Science

Molar Mass Calculator

Type a formula — brackets and hydrates included — and get its molar mass broken down element by element.

Written and maintained by the MarsCalc Hub editorial team Formula checked against IUPAC standard atomic weights Updated

Capitalisation matters: Co is cobalt, CO is carbon monoxide. Use a dot for hydrates.

g

Add a mass to convert it to moles.

About the Molar Mass Calculator

Type a chemical formula and this calculator returns its molar mass in grams per mole, broken down element by element so you can see where the total came from.

It parses real formulas, not just simple ones. Nested brackets work — Ca(OH)₂, K₄[Fe(CN)₆] — and so do hydrates written with a dot or a full stop, such as CuSO₄·5H₂O. The breakdown shows each element's atom count, its atomic weight and its percentage of the total mass.

Atomic weights come from the IUPAC standard values. These are averages weighted by natural isotopic abundance, which is why chlorine reads 35.45 rather than a whole number — natural chlorine is a mixture of chlorine-35 and chlorine-37.

How to use the Molar Mass Calculator

  1. Type a chemical formula, or tap one of the examples.
  2. Use brackets for groups — Ca(OH)2 — and a dot for hydrates.
  3. Optionally enter a mass in grams to convert to moles.
  4. Select Calculate molar mass.
  5. The table breaks the total down by element with percent composition.

What molar mass is (and the molecular weight calculator)

Molar mass is the mass of one mole of a substance, in grams per mole. One mole is 6.02214076 × 1023 particles — a number now fixed by definition rather than measured.

The convenient part is that molar mass in g/mol is numerically identical to the molecular mass in atomic mass units. Water is 18.015 u per molecule and 18.015 g/mol in bulk. The mole exists to make that correspondence exact, so you can weigh out substances in the laboratory and know how many molecules you have.

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

Worked example

Calcium hydroxide, Ca(OH)₂. The subscript applies to everything in the brackets, so there are two oxygens and two hydrogens.

Ca: 1 × 40.078 = 40.078

O: 2 × 15.999 = 31.998

H: 2 × 1.008 = 2.016

74.09 g/mol

Calcium alone is 54% of that mass, which is why the breakdown is worth reading.

Writing formulas the calculator understands

TypeExampleMolar mass
SimpleH2O18.015 g/mol
SimpleNaCl58.44 g/mol
BracketsCa(OH)274.09 g/mol
BracketsAl2(SO4)3342.15 g/mol
NestedK4[Fe(CN)6]368.35 g/mol
HydrateCuSO4·5H2O249.68 g/mol
Common saltKClO3122.55 g/mol
Common acidH3PO497.99 g/mol

Capitalisation is not optional

Element symbols follow a strict rule: the first letter is always capital, any second letter is always lowercase. That rule is what lets a parser tell one element from another, and getting it wrong changes the molecule completely.

WrittenRead asMolar mass
COCarbon + oxygen (carbon monoxide)28.01 g/mol
CoCobalt58.93 g/mol
NONitrogen + oxygen (nitric oxide)30.01 g/mol
NoNobelium259 g/mol
HFHydrogen + fluorine20.01 g/mol
HfHafnium178.49 g/mol

Writing co or CO2 as Co2 gives you cobalt, not carbon dioxide — and a molar mass more than double the right one. If a result looks wildly wrong, check the capital letters first.

Mass to moles formula: converting between grams and moles

moles = mass (g) ÷ molar mass (g/mol)

mass (g) = moles × molar mass (g/mol)

To dissolve 0.25 moles of copper sulfate pentahydrate: 0.25 × 249.68 = 62.42 grams. To find how many moles are in 10 g of NaCl: 10 ÷ 58.44 = 0.171 moles.

Once you have moles, the gas volume calculator will give you the volume that quantity of gas occupies.

Hydrates and the water of crystallisation

Many salts crystallise with water molecules locked into the structure. That water has real mass and must be counted. Copper sulfate is the classic case:

  • CuSO₄ (anhydrous, white) — 159.61 g/mol.
  • CuSO₄·5H₂O (pentahydrate, blue) — 249.68 g/mol.

The five waters add 90 g/mol, over a third of the total. Weigh out the blue crystals using the anhydrous figure and your solution comes out about 36% too dilute. Write the dot as either · or a full stop — the parser accepts both.

Molar masses of common compounds

Here are values students look up most. They use standard atomic weights and are rounded to two decimals. Type any of them above to see the element-by-element breakdown.

CompoundFormulaMolar mass (g/mol)
Hydrochloric acidHCl36.46
Ammonium hydroxideNH4OH35.05
Nitric acidHNO363.01
Sodium acetateCH3COONa82.03
Phosphoric acidH3PO497.99
Potassium chlorateKClO3122.55
Sodium sulfateNa2SO4142.04
Copper(II) sulfateCuSO4159.61
Sodium phosphateNa3PO4163.94
Calcium nitrateCa(NO3)2164.09
Copper sulfate pentahydrateCuSO4·5H2O249.69

Molar mass vs molecular mass and formula mass

The two numbers are the same, but the units differ. Molecular mass is the mass of one molecule, in atomic mass units (u or Da). Molar mass is the mass of one mole, in grams per mole. Water is 18.02 u per molecule and 18.02 g/mol.

Other ways to use this calculator

Molar mass sits behind many chemistry calculations.

  • Molecular mass and chemical mass calculator — type any formula, including brackets and hydrates.
  • Grams to moles — enter a mass in grams to convert it to moles.
  • Molarity calculations — moles from this tool ÷ litres of solution gives molarity.
  • Molecular mass calculator and chemical formula mass — type any formula, including brackets and hydrates.
  • Moles from grams — divide the mass in grams by the molar mass.
  • KClO3 molar mass, molar mass of Na2SO4 and molar mass of H3PO4 — 122.55, 142.04 and 97.99 g/mol, as in the table above.

Related guides

Frequently asked questions

Molar mass is the mass of one mole of a substance in grams per mole, found by adding the atomic weights of every atom in the formula. Water, H₂O, is (2 × 1.008) + 15.999 = 18.015 g/mol. It is numerically the same as the molecular mass in atomic mass units, which is precisely what makes the mole useful — you can weigh a substance and know how many molecules you have.

Write the salt, then a dot, then the water with its count — CuSO4·5H2O. A full stop works too, as CuSO4.5H2O. The number before H2O multiplies the whole water molecule, so five waters add 90.08 g/mol. Always include the water when weighing a hydrated salt: using the anhydrous mass for blue copper sulfate makes your solution about 36% too dilute.

Divide the mass in grams by the molar mass. For 10 g of sodium chloride at 58.44 g/mol, that is 10 ÷ 58.44 = 0.171 moles. Reverse it to go the other way: 0.25 moles of CuSO₄·5H₂O at 249.68 g/mol needs 62.42 grams. Get the molar mass right first, particularly for hydrates.

Because element symbols follow a strict rule — first letter capital, second letter lowercase — and that is the only way to tell them apart. CO is carbon monoxide at 28.01 g/mol, while Co is cobalt at 58.93. Similarly HF is hydrogen fluoride and Hf is hafnium. If your result looks far off, check the capitals before anything else.

Potassium chlorate, KClO3, has a molar mass of about 122.55 g/mol: potassium 39.10 + chlorine 35.45 + three oxygens 48.00.

Anhydrous copper(II) sulfate is about 159.61 g/mol. The blue pentahydrate, CuSO4·5H2O, is about 249.69 g/mol because it includes five water molecules.

For everyday chemistry, yes. Molecular weight is the mass of one molecule in daltons, and molar mass is the mass of one mole in grams per mole. The numbers are the same, so water is 18.015 either way.

Sources and further reading

  1. IUPAC — Atomic weights of the elements — the standard atomic weights used in this tool
  2. NIST — Avogadro constant — the exact value 6.02214076 × 10²³ per mole
  3. NIST — SI unit of amount of substance: mole — the 2019 definition of the mole