M The Backyard Scientist

Molar mass calculator

This free molar mass calculator gives the molar mass of any chemical formula in g/mol — brackets, hydrates and ions included — with the working for each element, percent composition by mass, and an instant grams ↔ moles ↔ particles converter.

Try:

Grams ↔ moles ↔ particles

How to use the molar mass calculator

Type a chemical formula exactly as it is written — H2O, Ca(OH)2, K4[Fe(CN)6] or a hydrate such as CuSO4·5H2O — and the molar mass appears as you type. Below it you get the element-by-element working (atoms × atomic mass), each element's share of the mass (percent composition), and a converter that turns grams into moles and number of particles, or moles back into grams. Copy the result with one click or share a link that opens the same formula.

Formulas are case-sensitive because element symbols are: Co is cobalt, CO is carbon monoxide, and NO is nitric oxide, not nobelium (No). Unicode subscripts (C₆H₁₂O₆) and charges (SO4^2-) are accepted.

What is molar mass?

The molar mass M of a substance is the mass of one mole of it, in grams per mole (g/mol). One mole is exactly 6.022 140 76 × 10²³ particles (the Avogadro constant, fixed in the 2019 SI). Numerically, the molar mass in g/mol equals the average mass of one molecule or formula unit in daltons (Da, also written u or amu), which is why "molecular weight", "formula weight" and "molar mass" give the same number.

How to calculate molar mass by hand

  1. Write the formula and count the atoms of each element. Brackets multiply everything inside: Ca(OH)₂ has 1 Ca, 2 O and 2 H.
  2. For a hydrate, add the water: CuSO₄·5H₂O has 5 extra H₂O, i.e. 10 H and 5 O.
  3. Multiply each count by the standard atomic weight from the periodic table.
  4. Add the products.

Example — glucose, C₆H₁₂O₆: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol. Water: 2 × 1.008 + 15.999 = 18.015 g/mol. Carbon dioxide: 12.011 + 2 × 15.999 = 44.009 g/mol.

Percent composition

The mass percent of an element is its share of the molar mass: (atoms × atomic mass ÷ molar mass) × 100. In water, hydrogen is 2.016 ÷ 18.015 = 11.19 % and oxygen 88.81 %. The bar chart in the results table shows the split at a glance; reverse the process (percent → empirical formula) by dividing each percent by its atomic mass and scaling to whole numbers.

Grams, moles and particles

The three conversions every chemistry student needs: moles = grams ÷ molar mass, grams = moles × molar mass, and particles = moles × 6.022 × 10²³. 100 g of water is 100 ÷ 18.015 = 5.551 mol, or 3.343 × 10²⁴ molecules. Type either the grams or the moles in the converter and the other two update instantly.

Which atomic weights are used?

The calculator uses the IUPAC standard atomic weights (2021 abridged, conventional values for elements with ranges: H 1.008, C 12.011, N 14.007, O 15.999, Cl 35.45, S 32.06). These are the values printed in most textbooks and exam data sheets, so your answers will match the mark scheme. For radioactive elements without a stable isotope, the mass number of the longest-lived isotope is used (e.g. Tc 98, Pu 244). Deuterium (D) and tritium (T) are also accepted.

Molar masses of common compounds

CompoundFormulaMolar mass (g/mol)
WaterH2O18.015
Carbon dioxideCO244.009
Sodium chlorideNaCl58.440
Sodium hydroxideNaOH39.997
Hydrochloric acidHCl36.458
Sulfuric acidH2SO498.072
GlucoseC6H12O6180.156
SucroseC12H22O11342.297
Calcium carbonateCaCO3100.086
AmmoniaNH317.031
Oxygen gasO231.998
Nitrogen gasN228.014
MethaneCH416.043
EthanolC2H5OH46.069
Potassium permanganateKMnO4158.032
Copper sulfate pentahydrateCuSO4·5H2O249.677
Calcium hydroxideCa(OH)274.092
Nitric acidHNO363.012
Baking sodaNaHCO384.006
CaffeineC8H10N4O2194.194

Tips and common mistakes

Next steps: balance the reaction with the chemical equation balancer (it also finds the limiting reagent), work out gas volumes with the ideal gas law calculator, or make solutions with the dilution calculator.

Frequently asked questions

How do you calculate molar mass?

Count the atoms of each element in the formula, multiply each count by that element's atomic weight, and add the results. For H2O: 2 × 1.008 + 15.999 = 18.015 g/mol.

What is the molar mass of water?

18.015 g/mol (2 × 1.008 for hydrogen + 15.999 for oxygen).

What is the molar mass of CO2?

44.009 g/mol (12.011 + 2 × 15.999).

What is the molar mass of NaCl?

58.44 g/mol (22.990 + 35.45).

What is the molar mass of glucose (C6H12O6)?

180.156 g/mol.

How do I convert grams to moles?

Divide the mass in grams by the molar mass. 36 g of water ÷ 18.015 g/mol = 1.998 mol. The converter under the result does it instantly.

Is molar mass the same as molecular weight?

Numerically yes. Molar mass is in g/mol; molecular weight (relative molecular mass) is the same number without units, or in daltons for one molecule.

How are hydrates handled?

Write them with a dot: CuSO4·5H2O, CuSO4.5H2O or CuSO4*5H2O. The water of crystallisation is added to the total: 249.677 g/mol.

More tools