Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Molar mass calculator

Type a chemical formula to get its molar mass, with each element's contribution and mass percent. Uses the IUPAC CIAAW 2024 standard atomic weights.

Use capital letters for each element (Co is cobalt, CO is carbon monoxide). Brackets ( ) [ ] and hydrate dots · or * work.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Turn grams into a solution concentration with the molarity calculator.

What it does

The molar mass of a compound is the mass of one mole of it, in grams per mole. You need it to turn grams into moles for stoichiometry, molarity and yield problems. This calculator reads the formula you type, counts every atom (including atoms inside brackets and water in hydrates), and adds up their standard atomic weights. It also shows what share of the mass each element contributes, which is the percent composition.

How it's calculated

Molar mass = Σ (number of atoms of each element × its standard atomic weight)
Mass % of an element = its contribution ÷ molar mass × 100

The atomic weights are the abridged standard atomic weights published by IUPAC's Commission on Isotopic Abundances and Atomic Weights (CIAAW), 2024 version. They're given to five significant figures where possible. Some elements, like lithium, sulfur, argon and lead, vary in nature depending on where the sample came from, so their values carry a larger uncertainty. The calculator adds those uncertainties up so you can see how many decimals are meaningful.

Reading formulas

  • Brackets: in Ca(OH)2 the 2 applies to everything inside, so it's 1 Ca, 2 O and 2 H.
  • Hydrates: CuSO4·5H2O, CuSO4*5H2O and CuSO4.5H2O all mean one CuSO4 plus five water molecules.
  • Charges: SO4^2- is read as SO4. Electrons weigh so little they don't change the answer at this precision.

Worked example: copper(II) sulfate pentahydrate

CuSO4·5H2O has 1 Cu, 1 S, 4 + 5 = 9 O and 10 H.

ElementAtoms × weightg/molMass %
Cu1 × 63.54663.54625.451%
S1 × 32.0632.0612.841%
O9 × 15.999143.99157.671%
H10 × 1.008010.084.037%
Total249.677100%

Sulfur's uncertainty (±0.02) is the largest here, so 249.68 g/mol is a sensible value to quote.

Limitations

  • Radioactive elements with no stable isotopes, such as technetium, promethium, polonium and everything past uranium, have no standard atomic weight. Their mass depends on the isotope, so the calculator won't guess.
  • Isotope-labeled compounds (like D2O or 13C-glucose) need isotope masses, not standard atomic weights.
  • Fractional formulas such as Fe0.95O can't be typed, because the dot is read as a hydrate separator.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • CuSO4·5H2O = 249.677 g/mol ✓
  • CuSO4*5H2O: copper is 25.451% by mass ✓
  • Ca(OH)2 = 74.092 g/mol ✓
  • Nested brackets: K4[Fe(CN)6] = 368.345 g/mol ✓
  • Al2(SO4)3 = 342.132 g/mol ✓
  • 36.03 g of water is 2 mol ✓
  • Technetium has no standard atomic weight ✓
  • Lowercase formula gets a capital-letter hint ✓
  • Unclosed bracket is caught ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How do you calculate molar mass?

Multiply each element's atomic weight by how many atoms of it are in the formula, then add them up. Water is 2 × 1.0080 + 15.999 = 18.015 g/mol.

What is the molar mass of water?

18.015 g/mol, using the CIAAW abridged atomic weights for hydrogen (1.0080) and oxygen (15.999).

How do I enter a hydrate?

Use a middle dot, an asterisk or a period between the parts: CuSO4·5H2O, CuSO4*5H2O or CuSO4.5H2O.

Is molar mass the same as molecular weight?

In number, yes. Molar mass is in g/mol; molecular weight (relative molecular mass) has no unit; molecular mass in daltons gives the same number again.

How do I find percent composition?

Divide each element's contribution by the total molar mass and multiply by 100. The table under the answer does this for every element.

Related calculators