CalcOpenly
English

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.

Drafted with AI writing toolsUpdated Checked examples: 6

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
Decimal places: 3; Nearest, ties away from zero
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 Rows: 3
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.

How to calculate molar mass

Multiply each element's atom count by its standard atomic weight and add the products; the sum, in grams per mole, is the molar mass. Water, H2O, is 2 × 1.008 + 15.999 = 18.015 g/mol, and glucose, C6H12O6, is 180.156 g/mol. The atomic weights are the IUPAC 2021 abridged values.

Molar mass worked by hand

Glucose, C6H12O6, step by step:

  1. Count the atoms: 6 C, 12 H and 6 O.
  2. Multiply each count by its atomic weight: 6 × 12.011 = 72.066, 12 × 1.0080 = 12.096 and 6 × 15.999 = 95.994.
  3. Add the products: 72.066 + 12.096 + 95.994 = 180.156 g/mol.

A symbol with no number after it counts once. The same method gives these totals:

FormulaAtom countsTotal atomsMolar mass (g/mol)
HH: 111.008
H2H: 222.016
H2OH: 2, O: 1318.015
CO2C: 1, O: 2344.009
NaClNa: 1, Cl: 1258.440
C6H12O6C: 6, H: 12, O: 624180.156
Ca3(PO4)2Ca: 3, P: 2, O: 813310.174
CuSO4·5H2OCu: 1, S: 1, O: 9, H: 1021249.677

Hydrogen gas is H2, at 2.016 g/mol, while a single hydrogen atom, H, is 1.008 g/mol. Oxygen gas, O2, is likewise 31.998 g/mol, twice the 15.999 of one oxygen atom.

Mass percent composition

Each element's share is its contribution divided by the molar mass, times 100. In water, hydrogen supplies 2.016 ÷ 18.015 = 11.19% of the mass and oxygen the other 88.81%.

Percentages rounded separately need not total exactly 100: glucose's 40.00% C, 6.71% H and 53.28% O add up to 99.99%.

Brackets and hydrates

A number after a bracket multiplies everything inside it. Ca3(PO4)2 holds 3 Ca, 2 × 1 = 2 P and 2 × 4 = 8 O, for 310.174 g/mol. Brackets can nest: K4[Fe(CN)6] holds 4 K, 1 Fe, 6 C and 6 N, for 368.345 g/mol.

A hydrate dot adds whole water molecules. CuSO4·5H2O is CuSO4 (159.602 g/mol) plus 5 × 18.015, for 249.677 g/mol. Using the anhydrous value for the hydrate overstates the moles in a weighed sample by 56%.

Atomic number and atomic weight of common elements

The atomic number Z is the number of protons, a whole number that identifies the element: chlorine has 17 protons and iron 26.

The standard atomic weight is the average mass of the element's atoms as found in nature, relative to one twelfth of a carbon-12 atom. It is rarely a whole number; chlorine's 35.45 reflects its mix of chlorine-35 and chlorine-37 atoms.

ElementSymbolAtomic number ZStored atomic weight
HydrogenH11.0080
HeliumHe24.0026
LithiumLi36.94
CarbonC612.011
NitrogenN714.007
OxygenO815.999
FluorineF918.998
SodiumNa1122.990
MagnesiumMg1224.305
AluminiumAl1326.982
SiliconSi1428.085
PhosphorusP1530.974
ChlorineCl1735.45
ArgonAr1839.95
PotassiumK1939.098
CalciumCa2040.078
ManganeseMn2554.938
IronFe2655.845
CobaltCo2758.933
NickelNi2858.693
CopperCu2963.546
ZincZn3065.38
BromineBr3579.904
KryptonKr3683.798
SilverAg47107.87
XenonXe54131.29
BariumBa56137.33
PlatinumPt78195.08
GoldAu79196.97
MercuryHg80200.59

These are the 2021 abridged values of the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW table). Lithium, chlorine and a few others carry fewer digits because their isotope mix varies between natural sources.

Elements with no standard atomic weight, such as technetium, take the mass number of a long-lived isotope instead, written in brackets as [97].

Mass of one molecule

One molecule's average mass in daltons is the same number as the molar mass: a water molecule averages 18.015 Da. In grams, divide by the Avogadro constant: 18.015 ÷ (6.02214076 × 10²³) = 2.991 × 10⁻²³ g.

Ionic solids such as NaCl contain no separate molecules, so their 58.440 g/mol describes one formula unit. OpenStax explains formula mass and the mole in more detail.

Common mistakes

  • Wrong capitalization. Co is cobalt (58.933 g/mol); CO is carbon monoxide (28.010 g/mol). Every symbol starts with a capital letter, so h2o is not a formula.
  • Atom instead of molecule. "Molar mass of oxygen" usually means the gas, O2 at 31.998 g/mol, not the atom at 15.999.
  • Hydrate or anhydrous. Use the form on the bottle's label: CuSO4·5H2O is 249.677 g/mol and CuSO4 is 159.602.
  • Whole-number atomic weights. Using 12, 1 and 16 gives glucose 180 instead of 180.156, 0.09% low; close enough for an estimate, not for analytical work.

Inputs worth checking

  • Counts are plain digits after the symbol, as in H2O.
  • Groups can use ( ), [ ] or { } and can nest.
  • Hydrates can be written with ·, . or *, as in CuSO4.5H2O. A leading number works only after the dot, so 2H2O is rejected.
  • Leave out charges and isotope labels: sulfate is SO4, at 96.056 g/mol.

Turn a weighed mass into moles with the grams-to-moles calculator, or a solution's mass and volume into molarity with the molarity calculator.

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: 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: 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: 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.

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

This calculator includes 6 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.