Skip to content

Molar Mass Calculator

Type any chemical formula to get its molar mass, the mass percent of each element and grams ↔ moles.

Your details

Unit system

Case matters (Co is cobalt, CO carbon monoxide). Brackets, hydrates (CuSO4·5H2O or CuSO4.5H2O) and subscripts (H₂O) are accepted; a charge such as SO4^2- or NH4+ is ignored.

Converts this mass to moles.

Converts this amount to a mass.

mol

Results update as you type

Molar mass M

180.156 g/mol

Moles in the sample
0.138769 mol
Mass composition
C 40 % · H 6.71 % · O 53.28 %
Atoms per formula unit
24
Mass of one molecule / formula unit
2.9916 × 10⁻²² g = 180.156 u

Step-by-step solution
  1. M = 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol
  2. n = m / M = 25 g ÷ 180.156 g/mol = 0.138769 mol

The molar mass of a substance is the mass of one mole of it — 6.022 × 10²³ molecules, ions or formula units — expressed in grams per mole (g/mol). Numerically it equals the molecular (or formula) mass in daltons: water weighs 18.015 u per molecule and 18.015 g per mole. It is the bridge between what you weigh on a balance and what reacts in a flask, so almost every stoichiometry, solution or yield calculation starts with it.

This molar mass calculator reads the formula you type and adds up the atomic weights for you. It understands brackets — Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6] — hydrates such as CuSO4·5H2O (a dot or a full stop both work), subscripts pasted from a document (H₂SO₄) and ionic charges such as SO4^2- or NH4+, which it ignores. The atomic weights are the current IUPAC/CIAAW standard values, using the abridged conventional figures for elements whose weight varies in nature (H 1.008, C 12.011, O 15.999, Cl 35.45).

Besides M, you get the mass percent of every element in a table and a chart, the total number of atoms in the formula, the mass of a single molecule, and optional conversions from a sample mass to moles, or from moles to grams.

How to use this calculator

  1. Type the chemical formula. Respect capital letters: each element symbol starts with one (NaCl, not nacl; Co is cobalt, CO is carbon monoxide).
  2. For a hydrate, write the water after a dot: CuSO4·5H2O or CuSO4.5H2O. Use brackets for repeated groups: Mg(NO3)2.
  3. Optionally enter a mass to convert it to moles, or an amount in moles to get the mass.
  4. Read the molar mass in g/mol, the composition table and the step showing how each element contributes.

The formula

The molar mass is the sum, over every element ii in the formula, of the number of atoms nin_i times the standard atomic weight Ar(i)A_r(i):

M=∑ini Ar(i)g/molM = \sum_i n_i \, A_r(i) \quad \text{g/mol}

The mass percent of element ii (percent composition) is its share of that total:

wi=ni Ar(i)M×100 %w_i = \frac{n_i \, A_r(i)}{M} \times 100\,\%

Moles and mass are linked by n=m/Mn = m / M and m=n⋅Mm = n \cdot M. The mass of a single molecule is M/NAM / N_A, with NA=6.02214076×1023 mol−1N_A = 6.02214076 \times 10^{23}\ \text{mol}^{-1}.

Worked example

Glucose, C6H12O6. M=6×12.011+12×1.008+6×15.999M = 6 \times 12.011 + 12 \times 1.008 + 6 \times 15.999 = 180.156 g/mol. Carbon makes up 40 % of the mass, hydrogen 6.71 % and oxygen 53.28 %. A 25 g sample is 25 / 180.156 = 0.1388 mol.

A hydrate, CuSO4·5H2O. Copper(II) sulfate pentahydrate has MM = 249.68 g/mol, of which the five water molecules account for 36.08 %. Weighing anhydrous CuSO4 instead (159.6 g/mol) would put 56 % more copper sulfate in a solution than the recipe intended.

Calcium phosphate, Ca3(PO4)2. The bracket multiplies P and O by 2: MM = 310.17 g/mol, with 38.76 % calcium. Half a mole weighs 155.1 g.

Where the atomic weights come from

Most elements are mixtures of isotopes, so their atomic weight is an average weighted by natural abundance. The IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) reviews these averages every two years. For about a dozen elements — hydrogen, carbon, nitrogen, oxygen, chlorine, sulfur and others — the abundance varies enough between sources that CIAAW gives an interval rather than a single value; for everyday work IUPAC publishes an abridged conventional value for each, which this calculator uses.

Radioactive elements with no stable isotope (technetium, promethium, the transuranium elements) have no standard atomic weight; the mass number of the longest-lived isotope is used, as on most periodic tables. Results are shown to three decimals, which matches the precision of the input data.

Molar mass, molecular weight and formula mass

Term Unit Meaning
Molar mass MM g/mol mass of one mole of the substance
Molecular mass u or Da mass of one molecule
Relative molecular mass MrM_r ("molecular weight") none molecular mass ÷ 1 u
Formula mass u the same for ionic solids, per formula unit

All four give the same number for a given compound; only the unit and the wording change. Once you have M, the moles calculator converts grams, particles and gas volumes, and the molarity calculator tells you how much to weigh for a solution.

Frequently asked questions

How do I calculate the molar mass of a compound by hand?

Count the atoms of each element (multiply everything inside brackets by the subscript after them), multiply each count by the atomic weight from the periodic table, and add the products. For H2SO4: 2 × 1.008 + 32.06 + 4 × 15.999 = 98.072 g/mol.

How do I enter a hydrate?

Write the salt, a dot and the number of water molecules: CuSO4·5H2O, CaCl2·2H2O or Na2CO3.10H2O. The water of crystallisation is part of what you weigh, so it must be in the molar mass when you prepare a solution from the hydrate.

Does the charge of an ion change its molar mass?

Not measurably. An electron weighs about 0.00055 g/mol, much less than the uncertainty of atomic weights, so the sulfate ion SO4²⁻ and a neutral SO4 group both have M = 96.06 g/mol. The calculator strips the charge and tells you it did.

Why is my result slightly different from my textbook?

Older tables use O = 15.9994, H = 1.00794 or Cl = 35.453; the current conventional values are 15.999, 1.008 and 35.45. The difference shows up in the second decimal for large molecules (Ca3(PO4)2 gives 310.17 here and 310.18 with older values) and does not matter for lab work.

What is the percent composition used for?

It tells you how much of a sample is a given element: the fraction of nitrogen in a fertiliser, of iron in a supplement, or of water in a hydrate. Comparing measured percentages with calculated ones is also how chemists confirm an empirical formula.

Sources

Last updated:

More Chemistry calculators

People also use