About the Molar Mass Calculator
The molar mass of a substance is the mass of one mole of it, measured in grams per mole (g/mol). A mole is a fixed count of particles — 6.022 × 10²³ of them — so molar mass is the bridge between the mass you can weigh on a balance and the number of atoms or molecules taking part in a reaction. Every calculation in chemistry that involves grams and reactions, from making a solution to balancing a recipe of reagents, passes through it.
This molar mass calculator reads any chemical formula, including brackets and hydrates, and adds up the standard atomic weights of every atom. It shows the molar mass, the percentage of each element by mass, the number of atoms, and — if you enter a sample mass — the number of moles and molecules in it.
How to Use the Molar Mass Calculator
Type the chemical formula. Capital letters matter: CO is carbon monoxide, while Co is cobalt.
Use brackets for groups, such as Ca(OH)2 or Mg3(PO4)2, and square brackets for complexes, such as K4[Fe(CN)6].
Write hydrates with a dot, such as CuSO4·5H2O; a full stop or asterisk also works.
Optionally, enter a sample mass in grams to convert it to moles.
The Formula
molar mass M = Σ (number of atoms of each element × its atomic weight)
moles = mass ÷ molar mass
molecules = moles × 6.02214076 × 10²³
% element = (atoms × atomic weight) ÷ M × 100
Step-by-Step Examples
Water, H2O.
H 2 × 1.008 = 2.016
O 1 × 15.999 = 15.999
M = 18.015 g/mol
Oxygen makes up 15.999 ÷ 18.015 = 88.81 percent of water's mass. A litre of water, about 1,000 g, contains 1,000 ÷ 18.015 = 55.51 moles, or about 3.343 × 10²⁵ molecules.
Copper sulfate pentahydrate, CuSO4·5H2O.
Cu 1 × 63.546 = 63.546
S 1 × 32.06 = 32.06
O 9 × 15.999 = 143.991
H 10 × 1.008 = 10.08
M = 249.677 g/mol
Glucose, C6H12O6: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol.
Molar Masses of Common Substances
Substance Formula Molar mass (g/mol)
water H2O 18.015
carbon dioxide CO2 44.009
sodium chloride NaCl 58.440
sodium hydroxide NaOH 39.997
sulfuric acid H2SO4 98.072
acetic acid CH3COOH 60.052
calcium hydroxide Ca(OH)2 74.092
ammonium sulfate (NH4)2SO4 132.134
glucose C6H12O6 180.156
Atomic Weights
The atomic weights used here are the standard values published by IUPAC, the body that sets chemical conventions, to the precision printed on most periodic tables: hydrogen 1.008, carbon 12.011, nitrogen 14.007, oxygen 15.999, sodium 22.990, chlorine 35.45, and so on. They are averages over each element's natural mix of isotopes, which is why they are not whole numbers. Chlorine, for example, is about three-quarters chlorine-35 and a quarter chlorine-37, giving 35.45. For elements with no stable isotopes, such as technetium or radium, the mass number of the longest-lived isotope is used.
Molar Mass, Molecular Weight and Formula Mass
These terms are used almost interchangeably. Molar mass has units of g/mol. Molecular weight or relative molecular mass is the same number without units, relative to one-twelfth of a carbon-12 atom. Formula mass is used for ionic compounds such as sodium chloride, which form lattices rather than separate molecules. Numerically, all three give the same answer for a given formula.
Using Molar Mass in the Lab
Molar mass turns a recipe written in moles into something you can weigh. To make a solution of known molarity, multiply the molarity by the volume in litres and by the molar mass to get the grams of solute. To find how much product a reaction can make, convert the grams of each reactant to moles, use the balanced equation's ratios, then convert back to grams with the product's molar mass. Always check whether a reagent is a hydrate: copper sulfate pentahydrate weighs about 56 percent more per mole than anhydrous copper sulfate, and using the wrong one throws off every concentration.
Percentage Composition and Empirical Formulas
The percentage composition shown by the calculator tells you what fraction of a compound's mass comes from each element. It works in reverse too. If an analysis shows a compound is 40.00 percent carbon, 6.71 percent hydrogen and 53.28 percent oxygen, dividing each percentage by the element's atomic weight gives a mole ratio of 1 : 2 : 1, the empirical formula CH2O. Knowing the molar mass — for example 180 g/mol from another measurement — then tells you the molecular formula is six times larger, C6H12O6, which is glucose. This is how chemists identify new compounds from combustion analysis and mass spectrometry. The same composition figures are used in industry to work out how much of a valuable element, such as a metal in an ore, a given mass of compound contains.
The Mole and Avogadro's Number
The mole is defined as exactly 6.02214076 × 10²³ particles, a number chosen so that the mass of one mole of a substance in grams equals its relative molecular mass. That is why molar masses and atomic weights share the same numbers: a carbon atom has a relative mass of about 12, and a mole of carbon atoms weighs about 12 grams. The mole lets chemists count atoms by weighing them, since individual atoms are far too small to count directly.
Understanding Your Result
The headline is the molar mass in g/mol.
The composition line shows each element's count, contribution and percentage by mass.
The atoms line counts the atoms and elements in one formula unit.
The moles line converts your sample mass to moles and molecules, or shows what one mole weighs.
When Should You Use This Calculator?
Use it for chemistry homework and exam practice.
Use it to prepare solutions of known concentration.
Use it to work out percentage composition or empirical formulas.
Use it to convert between grams, moles and particles.
Common Mistakes
Getting capital letters wrong. CO and Co are different substances.
Forgetting the subscript after a bracket. In Ca(OH)2 the 2 applies to both O and H.
Ignoring water of crystallisation. A hydrate's water counts towards its molar mass.
Using rounded atomic weights. Small differences add up for large molecules.