CalcOpenly

Molar mass calculator

Molar mass in g/mol and mass percent composition of any chemical formula, with brackets and hydrates such as CuSO4·5H2O, from IUPAC 2021 atomic weights.

Updated Checked against 6 worked examples

Case matters: Co is cobalt, CO is carbon monoxide. Hydrates: CuSO4·5H2O, CuSO4.5H2O or CuSO4*5H2O
Try
Molar mass
g/mol
Molar mass: 180.156 g/mol
Shown to 3 decimal places, half-up
Hill formula
C6H12O6
Mass percent
C 40.00%, H 6.71%, O 53.28%
Atoms per formula unit
24
Different elements
3
Mass of one formula unit
2.99156 × 10⁻²²g

One mole of C₆H₁₂O₆ weighs 180.156 g; oxygen contributes the most mass (53.28%).

Mass percent by element

180.156g/mol
C40.00%H6.71%O53.28%
Composition (3 rows)
ElementAtomsAtomic weightMass (g/mol)Mass %
C (Carbon)612.01172.06640.00%
H (Hydrogen)121.008012.0966.71%
O (Oxygen)615.99995.99453.28%
How it's calculated S
  1. Count the atoms

    C:6, H:12, O:6\mathrm{C}: 6,\ \mathrm{H}: 12,\ \mathrm{O}: 6

    Brackets multiply everything inside; a hydrate's leading number multiplies its whole part. Hill formula: C6H12O6.

  2. Add the atomic weights

    M=6×12.011+12×1.0080+6×15.999=180.156 g/molM = 6\times 12.011 + 12\times 1.0080 + 6\times 15.999 = 180.156\ \mathrm{g/mol}

    Shown to 3 decimals: the IUPAC abridged atomic weights carry about 5 significant figures, and some (Li, S, Cl, Pb…) fewer.

  3. Mass of one formula unit

    m=MNA=180.1566.02214076×1023=2.99156×10−22 gm = \frac{M}{N_A} = \frac{180.156}{6.02214076\times10^{23}} = 2.99156 \times 10^{-22}\ \mathrm{g}

About the molar mass calculator

Molar mass is the mass of one mole of a substance, in grams per mole. The calculator reads the formula, counts the atoms of each element (multiplying through brackets and hydrate dots) and adds count × standard atomic weight, using the IUPAC 2021 abridged values. Each element's share of the total is its mass percent.

Chemists need molar mass to convert between grams and moles when weighing reagents. Glucose, C6H12O6, comes to 180.156 g/mol, of which oxygen supplies 53.28 %; a single molecule weighs 2.99 × 10⁻²² g.

Results are shown to three decimals because the abridged atomic weights carry about five significant figures. For elements with no standard atomic weight, such as technetium, the mass number of a long-lived isotope stands in, and the page says so.

Worked examples

Water

Chemical formula
H2O
Molar mass
18.015 g/mol
Mass percent
H 11.19%, O 88.81%
Atoms per formula unit
3

Checked against: Python 3.8 decimal with IUPAC 2021 abridged weights: 2 × 1.0080 + 15.999 = 18.015 (PubChem 18.015)

Glucose

Chemical formula
C6H12O6
Molar mass
180.156 g/mol
Hill formula
C6H12O6

Checked against: Python 3.8 decimal: 6 × 12.011 + 12 × 1.0080 + 6 × 15.999 = 180.156 (PubChem 180.16)

Copper sulfate pentahydrate

Chemical formula
CuSO4·5H2O
Molar mass
249.677 g/mol
Hill formula
CuH10O9S

Checked against: Python 3.8 decimal: 63.546 + 32.06 + 9 × 15.999 + 10 × 1.0080 = 249.677 (PubChem 249.69 with older S = 32.065)

Hydrate written with a plain dot

Chemical formula
CuSO4.5H2O
Molar mass
249.677 g/mol

Checked against: Same compound as above; '.' is read as the hydrate dot

Questions

Is molar mass the same as molecular weight?

Numerically, yes. Molar mass carries units of g/mol, while molecular weight (relative molecular mass, Mr) is the same number without units, measured against one twelfth of the mass of a carbon-12 atom. Water has a molar mass of 18.015 g/mol and a relative molecular mass of 18.015. For ionic solids such as NaCl, which have no discrete molecules, the usual term is formula mass.

How do you calculate molar mass by hand?

Multiply each element's atom count by its atomic weight and add the products. For water, H2O: 2 × 1.008 + 15.999 = 18.015 g/mol. Brackets multiply everything inside them, so Ca3(PO4)2 holds 2 phosphorus and 8 oxygen atoms. A hydrate's water counts in full: CuSO4·5H2O adds 10 hydrogen and 5 oxygen atoms to copper sulfate, for 249.677 g/mol.

Why does my textbook give a slightly different molar mass?

Atomic weights are revised as isotope measurements improve, and books round them differently. IUPAC's 2021 abridged table gives sulfur as 32.06 where older tables used 32.065, so copper sulfate pentahydrate comes to 249.677 g/mol here and 249.69 g/mol on PubChem. A difference in the second decimal place is normal; use whichever table your course or method specifies.

What does mass percent composition tell you?

It is the share of a compound's mass that each element contributes: the element's mass in one formula unit divided by the molar mass, times 100. Glucose is 40.00 % carbon, 6.71 % hydrogen and 53.28 % oxygen. Chemists compare these figures with percentages measured by combustion analysis to confirm a sample's identity or work out an empirical formula.

Why does capitalisation matter in a chemical formula?

Every element symbol starts with a capital letter and any second letter is lowercase, so case decides which atoms you mean. Co is cobalt, 58.933 g/mol, while CO is carbon monoxide, one carbon and one oxygen atom, 28.010 g/mol. Likewise NO is nitric oxide but No is nobelium. Type formulas with standard capitalisation to get the compound you intend.

How accurate is the molar mass calculator?

Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 6 worked examples whose answers come from independent sources; for example, “Water” is checked against Python 3.8 decimal with IUPAC 2021 abridged weights: 2 × 1.0080 + 15.999 = 18.015 (PubChem 18.015).

Where does the method come from?

IUPAC CIAAW — Standard atomic weights of the elements 2021 (Prohaska et al., Pure Appl. Chem. 94, 573, 2022), abridged values; PubChem compound pages (molecular weight cross-check).

About this calculator

M=∑ini Ar(i)  g/mol,wi=niAr(i)MM = \sum_i n_i\,A_r(i)\ \ \mathrm{g/mol},\qquad w_i = \frac{n_i A_r(i)}{M}

Sources

  1. IUPAC CIAAW — Standard atomic weights of the elements 2021 (Prohaska et al., Pure Appl. Chem. 94, 573, 2022), abridged values
  2. PubChem compound pages (molecular weight cross-check)

Checked against references

6 worked examples with independently sourced answers ship with this calculator. They run in the test suite; you can run them here too.

Related calculators

Allow optional Google Analytics to measure page visits? Calculators work either way. Privacy and choices

Optional analytics: off.