Chemistry

Molar mass calculator

Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). It equals the sum of the atomic weights of every atom in the formula. Type any formula, including brackets such as Ca(OH)₂ and hydrates such as CuSO₄·5H₂O, and this molar mass calculator returns the molar mass, a breakdown by element and the percent composition, using IUPAC standard atomic weights.

Runs in your browser. Nothing you type is sent to us.

Molar mass

180.156 g/mol

C6H12O6

C 40%H 7%O 53%
Atoms per formula unit
24
Different elements
3
Mass of one molecule
2.992 × 10^-22 g

Composition by element

ElementAtomsAtomic massMass in formulaMass %
Carbon (C)612.01172.06640.002%
Hydrogen (H)121.00812.0966.714%
Oxygen (O)615.99995.99453.284%

Key facts

  • Molar mass = Σ (number of atoms × atomic weight) for every element in the formula.
  • Water, H₂O: 2 × 1.008 + 15.999 = 18.015 g/mol. Glucose, C₆H₁₂O₆: 180.156 g/mol.
  • One mole contains 6.02214076 × 10²³ particles (the Avogadro constant).
  • Write symbols with correct capitals: Co is cobalt, CO is carbon monoxide.

What is molar mass?

A mole is a counting unit for particles, like a dozen but far larger: 6.02214076 × 10²³ of them. The molar mass of a substance is the mass of one mole of its formula units. Numerically it matches the formula mass in atomic mass units, so a water molecule of 18.015 u means one mole of water weighs 18.015 g. Molar mass is the bridge between grams, which you can weigh, and moles, which chemical equations use.

How to use the molar mass calculator

  1. Type the formula with correct capital letters, for example NaCl, H2SO4 or C8H10N4O2.
  2. Use brackets for groups: Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6].
  3. Write hydrates with a dot, star or middle dot: CuSO4·5H2O, CuSO4.5H2O or CuSO4*5H2O.
  4. Read the molar mass, the number of atoms, the mass of one molecule and the table of each element’s contribution.

Molar mass formula

M = Σ (nᵢ × Aᵢ)
SymbolMeaning
MMolar mass of the compound (g/mol)
nᵢNumber of atoms of element i in the formula
AᵢStandard atomic weight of element i (g/mol)

Step-by-step examples: molar mass

Example 1: sulfuric acid, H₂SO₄

H: 2 × 1.008 = 2.016. S: 1 × 32.06 = 32.06. O: 4 × 15.999 = 63.996. Total = 98.072 g/mol.

Example 2: calcium hydroxide, Ca(OH)₂

The bracket doubles everything inside: 1 Ca, 2 O and 2 H. M = 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol.

Example 3: copper(II) sulfate pentahydrate, CuSO₄·5H₂O

CuSO₄ = 63.546 + 32.06 + 4 × 15.999 = 159.602. Five waters = 5 × 18.015 = 90.075. Total = 249.677 g/mol. Forgetting the water of crystallisation is a classic exam mistake.

Molar masses of common compounds

CompoundFormulaMolar mass (g/mol)
WaterH₂O18.015
AmmoniaNH₃17.031
MethaneCH₄16.043
Nitrogen gasN₂28.014
Oxygen gasO₂31.998
Hydrochloric acidHCl36.458
Sodium hydroxideNaOH39.997
Carbon dioxideCO₂44.009
EthanolC₂H₅OH46.069
Sodium chlorideNaCl58.44
Nitric acidHNO₃63.012
Sodium bicarbonateNaHCO₃84.006
Calcium carbonateCaCO₃100.086
Potassium permanganateKMnO₄158.032
Iron(III) oxideFe₂O₃159.687
GlucoseC₆H₁₂O₆180.156
CaffeineC₈H₁₀N₄O₂194.194
SucroseC₁₂H₂₂O₁₁342.297

Where the atomic weights come from

The values are the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) abridged standard atomic weights. They are averages over each element’s natural isotopes, which is why chlorine is 35.45 rather than a whole number. For radioactive elements without a stable isotope, the mass number of the longest-lived isotope is used, such as 98 for technetium. Textbooks that use older or rounded values may differ in the second decimal place.

Mistakes to avoid with molar mass

  • Wrong capitals. CO (carbon monoxide, 28.010) and Co (cobalt, 58.933) are different.
  • Applying a subscript to the wrong atoms. In Mg(OH)₂ the 2 applies to both O and H.
  • Ignoring hydrate water. CuSO₄ and CuSO₄·5H₂O differ by 90 g/mol.
  • Confusing molar mass and molecular weight. They have the same number but different units (g/mol vs u or Da).

Next steps: convert grams to moles with the grams to moles calculator, or see each element’s share with the percent composition calculator.

Where atomic weights come from

The atomic weights behind every molar mass are set by the Commission on Isotopic Abundances and Atomic Weights (CIAAW) of the International Union of Pure and Applied Chemistry (IUPAC), which reviews them every two years; this calculator uses the 2021 abridged values. Since 2009, IUPAC has given some elements, such as hydrogen, carbon and oxygen, an interval rather than a single value, because their isotope mix varies in nature; the abridged values are the conventional figures chemists use day to day.

The idea goes back to John Dalton, who published the first table of relative atomic weights in 1805, and to Stanislao Cannizzaro, whose pamphlet at the 1860 Karlsruhe Congress sorted out the confusion between atomic and molecular weights that had held chemistry back for decades, paving the way for Dmitri Mendeleev’s periodic table in 1869. Formulas here can be written in the Hill system order, devised by Edwin Hill of the US Patent Office in 1900, which lists carbon first, then hydrogen, then the other elements alphabetically. Comparing the grams you actually make with the grams predicted from moles gives the percent yield. To turn a mass into moles, use the grams to moles calculator; for each element’s share by mass, the percent composition calculator; and to make a solution of known strength, the molarity calculator.

How this calculator works

  • Parses the formula, including brackets such as Ca(OH)₂, subscripts and hydrate dots such as CuSO₄·5H₂O.
  • Molar mass = Σ (number of atoms × standard atomic weight) in g/mol, using IUPAC 2021 abridged atomic weights.
  • Elements with no stable isotopes use the mass number of their most stable isotope.
  • The table shows each element’s atom count, mass contribution and mass percentage.

Frequently asked questions

How do I calculate molar mass?

Multiply the atomic weight of each element by the number of its atoms in the formula, then add the results. For CO₂: 12.011 + 2 × 15.999 = 44.009 g/mol.

What is the molar mass of water?

H₂O has a molar mass of 18.015 g/mol (2 × 1.008 + 15.999).

What is the molar mass of CO₂?

44.009 g/mol.

What is the molar mass of NaCl?

58.44 g/mol (22.990 for sodium + 35.45 for chlorine).

What is the molar mass of glucose?

C₆H₁₂O₆ has a molar mass of 180.156 g/mol.

Is molar mass the same as molecular weight?

They have the same numerical value. Molar mass is in grams per mole; molecular weight (molecular mass) is in atomic mass units or daltons per molecule.

How do I enter a hydrate?

Separate the water of crystallisation with a dot, star or middle dot, and put the number of waters in front: CuSO4·5H2O or CuSO4.5H2O.

What is the unit of molar mass?

Grams per mole (g/mol). In SI base units it is kg/mol, which is 1,000 times smaller numerically.

Why is the atomic weight of chlorine 35.45?

Natural chlorine is about 76% chlorine-35 and 24% chlorine-37, and 35.45 is the weighted average of the two isotopes.

Sources

  1. IUPAC CIAAW, Standard atomic weights
  2. OpenStax, Chemistry 2e
  3. NIST CODATA, Avogadro constant

Updated November 25, 2026. Formulas checked against published sources and worked examples.

Cite this page: CalcRoster. "Molar mass calculator." calcroster.com/molar-mass-calculator/. Updated November 25, 2026.

Results are estimates for general information. They are not financial, medical or legal advice. Check important decisions with a qualified professional.