Molar Mass Calculator
Work out molar mass from any chemical formula, including hydrates, convert grams to moles and to particles, and see each element’s percent composition.
Calculator
Brackets, nested groups and hydrates all work. Use ·, * or a full stop before the water of crystallisation.
- Molar mass
- 180.156 g/mol
- Atoms per unit
- 24
- Distinct elements
- 3
Percent composition
Convert
The whole sample
- Mass
- 1 g
- Amount
- 5.5507 mmol
- Formula units
- 3.3427 × 10²¹
- Atoms in total The formula units times the atoms in one unit.
- 8.0226 × 10²²
| Element | Per unit | Atoms | Moles of atoms | Mass |
|---|---|---|---|---|
| O Oxygen | 6 | 2.0056 × 10²² | 33.304 mmol | 532.84 mg |
| C Carbon | 6 | 2.0056 × 10²² | 33.304 mmol | 400.02 mg |
| H Hydrogen | 12 | 4.0113 × 10²² | 66.609 mmol | 67.142 mg |
Formula units N = n × NA, where the Avogadro constant NA is 6.02214076 × 10²³ mol⁻¹ exactly. Each element’s atoms are N times its count in the formula, and its mass is the sample’s mass times its mass percent over 100.
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
IUPAC standard atomic weights
How a molar mass is assembled
Molar mass is the mass of one mole of a substance in grams, and for a
compound it is nothing more than a weighted sum. Take each element in the
formula, multiply its standard atomic weight by how many times that element
appears, and add the terms together:
M = Σ (count × atomic weight). There is no chemistry in the
arithmetic, only bookkeeping, so the errors that occur are almost always
errors of counting rather than errors of multiplication.
The atomic weights themselves are not integers because most elements occur as a mixture of isotopes. Chlorine is quoted as 35.45 rather than 35 because natural chlorine is roughly three parts chlorine-35 to one part chlorine-37. This calculator uses the IUPAC CIAAW abridged atomic weights, given to five significant figures, which is more than enough for any balance found in a teaching or production laboratory.
Worked example: the molar mass of glucose
Glucose, C₆H₁₂O₆, has three elements and three terms:
- Carbon:
6 × 12.011 = 72.066 - Hydrogen:
12 × 1.008 = 12.096 - Oxygen:
6 × 15.999 = 95.994 - Total:
72.066 + 12.096 + 95.994 = 180.156 g/mol
Textbooks often round this to 180.16 g/mol, which is the same figure to five significant figures. Rounding the individual atomic weights before multiplying is what introduces drift, so keep the full values until the final addition.
How to convert grams to moles
To convert grams to moles, divide the mass by the molar mass:
n = m / M. Going the other way, moles to grams, multiply
instead: m = n × M. To count the particles in the sample,
multiply the moles by the Avogadro constant, N = n × N_A,
where N_A = 6.02214076 × 10²³ mol⁻¹ exactly; to go from a
number of particles back to moles, divide by it. The calculator does all
three from whichever quantity you give it: choose
Mass → moles, Moles → mass or
Particles → moles under Convert, and the panel under it
lists the whole sample as a mass, an amount in moles, a number of formula
units and a number of atoms, then splits the atoms and the mass by element.
A formula unit is one copy of the formula as written. For a molecular substance such as water it is one molecule, and for a lone element such as iron it is one atom. An ionic solid such as sodium chloride has no molecules, so its particles are counted as formula units of NaCl, each one sodium ion and one chloride ion. A count of atoms is shared out first: 2 × 10²⁴ atoms of NaCl are 10²⁴ formula units, because each unit holds two.
Worked example: 10 g of water to moles and molecules
Water, H₂O, has a molar mass of
2 × 1.008 + 15.999 = 18.015 g/mol. Then:
- Moles:
n = 10 g / 18.015 g/mol = 0.55509 mol, which the calculator shows as 555.09 mmol - Molecules:
N = 0.55509 mol × 6.02214076 × 10²³ mol⁻¹ = 3.3428 × 10²³ - Atoms of hydrogen:
2 × N = 6.6857 × 10²³, and of oxygen1 × N = 3.3428 × 10²³ - Atoms in total:
3 × N = 1.0029 × 10²⁴
The reverse runs the same equations backwards: 1.0 × 10²⁴ molecules of
water are 10²⁴ / (6.02214076 × 10²³) = 1.6605 mol, and
1.66054 mol × 18.015 g/mol = 29.915 g. Carry the unrounded
moles into the second step, as the calculator does: 1.6605 × 18.015 gives
29.914, and the last figure drifts.
Percent composition by mass
The percent composition of a compound is each element’s share of the
molar mass: its count times its atomic weight, divided by the molar mass,
times 100, or % = count × A_r / M × 100. The Percent composition
table above prints it for every element in the formula, with a bar for
each, and the shares add up to 100%, give or take rounding in the last
figure.
For water, hydrogen is 2.016 / 18.015 × 100 = 11.19% and
oxygen is 15.999 / 18.015 × 100 = 88.81%. Because the share
is the same in any amount of the compound, the 10 g sample above holds
1.1191 g of hydrogen and 8.8809 g of oxygen, the masses the whole-sample
table lists. To go the other way, from measured percentages back to a
formula, use the
empirical formula calculator,
which divides each percentage by its atomic weight and finds the
whole-number ratio. For an amount in solution rather than a weighed solid,
the molarity calculator takes
the molar mass and a volume instead.
How much precision to carry
The molar mass is rarely the limiting source of uncertainty. A balance reading 2.922 g to the nearest milligram already carries about one part in three thousand, which is looser than the atomic weights being used. Carrying molar mass to two decimal places is therefore sufficient for solution preparation, and quoting more digits does not make a weighing more accurate.
Elements with wide isotopic variability are the exception. Sulfur, boron and lead differ measurably between geological sources, and CIAAW quotes intervals rather than single values for them. For high-accuracy isotope work, use the value appropriate to the material rather than the conventional average.
Common mistakes
- Using the anhydrous mass for a hydrate. CuSO₄ is 159.60 g/mol, but CuSO₄·5H₂O is 249.68 g/mol. The waters of crystallisation are part of the solid being weighed, so omitting them makes you weigh about 36% too little.
- Misreading capitalisation. Co is cobalt at 58.933 g/mol while CO is carbon monoxide at 28.010 g/mol. A single case error changes the answer by more than a factor of two.
- Not distributing a bracketed group. Ca(OH)₂ contains two oxygens and two hydrogens, giving 74.092 g/mol. Counting one of each gives 57.085 and is a common slip in hydroxides and nitrates.
- Ignoring reagent purity. Molar mass assumes the pure compound. For a reagent supplied at 97%, divide the calculated mass by 0.97 to get the amount actually to weigh out.
Converting units first? Use the mass and amount of substance conversion tables.
Common questions
What is the difference between molar mass and molecular weight?
Only the units: molecular weight is a relative mass and strictly dimensionless, while molar mass carries units of grams per mole, and numerically they are the same figure. In everyday lab use the two terms are used interchangeably, and both come from summing the standard atomic weights in the formula.
How do I handle a hydrate like CuSO4·5H2O?
Include the water. Type the dot as ·, * or a full stop and the waters of crystallisation are added to the total. Anhydrous copper sulfate is 159.60 g/mol but the pentahydrate is 249.68, so using the wrong one makes you weigh out about 36 percent too little.
Which atomic weights does this use?
The IUPAC CIAAW abridged standard atomic weights, quoted to five significant figures. Elements with no characteristic isotopic composition on Earth, such as technetium, promethium and most elements from polonium upwards, have no standard atomic weight, so the mass number of the longest-lived isotope, or of one of them where CIAAW lists several, is used instead and the result is flagged as nominal.
How do I convert grams to moles?
Divide the mass by the molar mass, n = m / M. Water is 18.015 g/mol, so 10 g of it is 10 / 18.015 = 0.55509 mol. Choose Mass → moles under Convert and the calculator divides by the molar mass of whatever formula you type; Moles → mass multiplies instead, m = n × M.
How many molecules or atoms are in a sample?
Multiply the moles by the Avogadro constant, exactly 6.02214076 × 10²³ per mole, for the number of formula units, then by the atoms in one formula unit for the number of atoms. 10 g of water is 0.55509 mol, which is 3.3428 × 10²³ molecules and 1.0029 × 10²⁴ atoms. Particles → moles runs the same steps backwards from a count of formula units or atoms.
How do I find the percent composition of a compound?
Divide each element’s contribution to the molar mass by the molar mass and multiply by 100. In water, hydrogen contributes 2 × 1.008 = 2.016 of the 18.015 g/mol, which is 11.19 percent, and oxygen the other 88.81 percent. The Percent composition table shows this for every element in the formula you type.
Can I work out a formula from percent composition?
Not with this calculator, which goes from a formula to its percentages. The empirical formula calculator goes the other way: it divides each mass percentage by its atomic weight, scales the results to the smallest whole-number ratio, and with a molar mass also gives the molecular formula.