Calcamaze

Molar Mass Calculator

Calculate the molar mass of any chemical formula, including brackets and hydrates, with the mass percent of each element.

g

Converts a mass to moles.

Result

Molar mass
180.156 g/mol
Moles in 100 g
0.555074 mol
3.3427 × 10^23 formula units
Atoms per formula unit
24
Composition by element
ElementAtomsAtomic weightMass (g/mol)Mass %
C612.01172.06640%
H121.00812.0966.71%
O615.99995.99453.28%

Type a chemical formula to get its molar mass in grams per mole and the percentage of the mass contributed by each element. Brackets such as Ca(OH)₂ and Fe₂(SO₄)₃, and hydrates such as CuSO₄·5H₂O, are all supported. Add a sample mass to convert grams to moles.

What is molar mass?

The molar mass of a substance is the mass of one mole of it, in grams per mole (g/mol). One mole is exactly 6.02214076 × 10²³ particles, the Avogadro number, chosen so that the molar mass in grams is numerically equal to the substance’s relative molecular mass. It is the bridge between the mass you weigh out on a balance and the number of particles that take part in a reaction.

To find it, add up the standard atomic weights of every atom in the formula. Standard atomic weights are published by IUPAC’s Commission on Isotopic Abundances and Atomic Weights and reflect the natural mix of isotopes of each element; for elements with no stable isotopes, the mass number of the longest-lived isotope is used.

Formula

M = Σ (number of atoms × standard atomic weight)

Multiply each element’s atomic weight by how many times it appears in the formula and add the results. Atomic weights are the IUPAC standard values.

Write symbols with a capital first letter (Co is cobalt, CO is carbon monoxide). For hydrates, separate the parts with a dot or an asterisk: CuSO4*5H2O.

Worked examples

Glucose, C₆H₁₂O₆

Chemical formula
C6H12O6
Mass of sample
90 g
Molar mass
180.156 g/mol
Moles in 90 g
0.499567 mol
Atoms per formula unit
24

6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol.

Calcium hydroxide, Ca(OH)₂

Chemical formula
Ca(OH)2
Mass of sample
100 g
Molar mass
74.092 g/mol
Moles in 100 g
1.349673 mol
Atoms per formula unit
5

The subscript 2 applies to everything in the brackets: 40.078 + 2 × (15.999 + 1.008) = 74.092 g/mol.

Copper(II) sulfate pentahydrate, and moles in 10 g

Chemical formula
CuSO4·5H2O
Mass of sample
10 g
Molar mass
249.677 g/mol
Moles in 10 g
0.040052 mol
Atoms per formula unit
21

CuSO₄ is 159.602 g/mol and five waters add 5 × 18.015, giving 249.677 g/mol. 10 g is 10 ÷ 249.677 = 0.04005 mol.

Molar masses of common compounds

CompoundFormulaMolar mass (g/mol)
WaterH₂O18.015
Carbon dioxideCO₂44.009
Sodium chlorideNaCl58.44
Sulfuric acidH₂SO₄98.072
AmmoniaNH₃17.031
EthanolC₂H₅OH46.069
Calcium carbonateCaCO₃100.086
Iron(III) sulfateFe₂(SO₄)₃399.858

From mass percent back to a formula

The mass percentages work in reverse too. A compound that is 40.0% carbon, 6.7% hydrogen and 53.3% oxygen contains, per 100 g, 40.0 ÷ 12.011 = 3.33 mol C, 6.7 ÷ 1.008 = 6.65 mol H and 53.3 ÷ 15.999 = 3.33 mol O. Dividing by the smallest gives 1 : 2 : 1, the empirical formula CH₂O. A measured molar mass then tells you the molecular formula: at 180 g/mol it is six times CH₂O, or C₆H₁₂O₆.

Common mistakes

  • Applying a bracket’s subscript to only the last atom — in Ca(OH)₂ both O and H are doubled.
  • Leaving out the water of crystallization in a hydrate, which can change the molar mass a lot (CuSO₄·5H₂O is over 50% heavier than CuSO₄).
  • Writing element symbols in the wrong case: CO is carbon monoxide, Co is cobalt.

Frequently asked questions

What is the molar mass of water?

H₂O = 2 × 1.008 + 15.999 = 18.015 g/mol.

Is molar mass the same as molecular weight?

They have the same number. Molar mass is in grams per mole; molecular weight (relative molecular mass) is a ratio with no unit.

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.0 mol. Enter the mass above to do it automatically.

Why do different tables give slightly different molar masses?

Atomic weights depend on the natural mix of isotopes, which varies a little between sources, so IUPAC gives ranges for some elements and rounded conventional values such as 1.008 for hydrogen. Differences in the second decimal place come from this and from rounding.

Sources

  1. Standard Atomic Weights, IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW)
  2. Chemistry 2e, 3.1: Formula Mass and the Mole Concept, OpenStax, Rice University
  3. Avogadro constant (CODATA fundamental physical constants), National Institute of Standards and Technology (NIST)

Last updated · Calculations checked by automated tests· Editorial policy