Skip to content

Molar Mass Calculator

Type a chemical formula to get its molar mass and convert grams to moles.

Case matters: Co is cobalt, CO is carbon monoxide. Use ( ) and · for hydrates.

Optional, to convert grams to moles.

Calculated on your device. Nothing you enter is sent anywhere.

Molar mass (g/mol)

Molar mass (g/mol): 180.159

One mole of this substance weighs 180.159 grams.

Moles in the sample
0.055506525
Molecules or formula units
3.34268E22
Atoms per formula
21

In short

The molar mass of a compound is the sum of the atomic weights of every atom in its formula, in grams per mole. Aspirin, C₉H₈O₄, has 9 carbons, 8 hydrogens and 4 oxygens, so its molar mass is 9 × 12.011 + 8 × 1.008 + 4 × 15.999 = 180.159 g/mol. Dividing a mass in grams by the molar mass gives moles.

How it works

Molar mass

M = Σ (number of atoms × atomic weight) moles = mass ÷ M particles = moles × 6.02214076 × 10²³

Atomic weights are the IUPAC abridged standard values. They are averages over each element’s natural isotopes, which is why chlorine is 35.45 and not a whole number. Groups in brackets are multiplied by the number after them, and a hydrate such as CuSO₄·5H₂O adds five waters. OpenStax Chemistry rounds carbon to 12.01 and oxygen to 16.00, so its answers can differ from these in the second decimal.

Worked examples

Aspirin, C9H8O4

9 × 12.011 + 8 × 1.008 + 4 × 15.999 = 180.159 g/mol. PubChem lists 180.16; OpenStax gets 180.15 using C = 12.01.

Open this example in the calculator

Copper(II) sulfate pentahydrate, CuSO4·5H2O

CuSO₄ is 159.602 g/mol and five waters add 5 × 18.015 = 90.075, so the hydrate is 249.677 g/mol.

Open this example in the calculator

Moles in 4.7 g of potassium

4.7 g ÷ 39.098 g/mol = 0.1202 mol, which OpenStax Example 3.3 gives as 0.12 mol.

Open this example in the calculator

Using this calculator well

  • Capital letters matter. CO is carbon monoxide (28.01 g/mol); Co is cobalt (58.933 g/mol).
  • Ions use the neutral atom weights. An electron’s mass is too small to matter, so enter NaCl for sodium chloride and SO4 for sulfate.
  • Match your course. If your textbook’s table rounds atomic weights, your answer may differ in the last digit.

Frequently asked questions

What is the difference between molar mass and molecular weight?

They have the same number. Molecular weight, or molecular mass, is the mass of one molecule in atomic mass units (u). Molar mass is the mass of a mole of molecules in grams per mole. Water is 18.015 u per molecule and 18.015 g/mol.

How do I convert grams to moles?

Divide the mass in grams by the molar mass. 36 g of water is 36 ÷ 18.015 ≈ 2 moles. To go back, multiply moles by the molar mass: 0.5 mol of glucose (180.156 g/mol) weighs about 90.08 g.

Why are atomic weights not whole numbers?

Most elements are a mix of isotopes with different numbers of neutrons. The atomic weight is the average weighted by how common each isotope is in nature. Chlorine is about three quarters chlorine-35 and one quarter chlorine-37, giving 35.45.

How do I enter a hydrate or a formula with brackets?

Use brackets for groups, such as Ca3(PO4)2 or Al2(SO4)3. For hydrates, separate the water with a dot or an asterisk and put the number first: CuSO4·5H2O, CuSO4.5H2O or CuSO4*5H2O all work.

Sources and methodology

  1. Abridged Standard Atomic Weights 2024, IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), five-figure values based on Atomic Weights 2021 with the 2024 revisions for Gd, Lu and Zr; e.g. H 1.0080, C 12.011, O 15.999, Cl 35.45 (accessed November 24, 2026)
  2. Chemistry 2e, 3.1 Formula Mass and the Mole Concept, OpenStax, Rice University, formula mass = Σ atoms × atomic mass; CHCl₃ 119.37, aspirin 180.15, ibuprofen 206.27, Al₂(SO₄)₃ 342.14, NaCl 58.44 amu (using C 12.01, O 16.00); Example 3.6: 28.35 g glycine ÷ 75.07 g/mol = 0.3776 mol; N_A = 6.02214076 × 10²³ (accessed November 24, 2026)
  3. PubChem PUG REST: compound properties (MolecularWeight), National Center for Biotechnology Information, U.S. National Library of Medicine, aspirin 180.16, chloroform 119.37, glucose 180.16, caffeine 194.19, water 18.015, sucrose 342.30, CuSO₄·5H₂O 249.69 g/mol (accessed November 24, 2026)

Rounding: Uses the IUPAC abridged standard atomic weights (2024), mostly to 5 significant figures. The molar mass is shown to 4 decimals.

Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.

Changelog
  • 1.0.0 · November 24, 2026: First published.

How we build and test calculators

Embed this calculator on your site

Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.

<iframe src="https://northcalculator.com/embed/en/molar-mass" title="Molar Mass Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>