A molar mass calculator works out how many grams one mole of a substance weighs. Type a chemical formula such as H2O, C6H12O6 or Ca(OH)2, and this free molar mass calculator adds up the atomic weights of every atom, shows how much each element contributes, and converts between grams, moles and the number of particles. It uses the standard atomic weights published by IUPAC's Commission on Isotopic Abundances and Atomic Weights (CIAAW).
What is molar mass?
The molar mass (M) of a substance is the mass of a sample divided by the amount of substance in it, measured in moles: M = m ÷ n. Its SI unit is kilograms per mole, but molar masses are almost always given in grams per mole (g/mol). Because natural elements are mixtures of isotopes, the molar mass is a weighted average worked out from standard atomic weights. Molecular weight and formula weight are often used to mean the same number.
A mole contains exactly 6.02214076 × 10²³ particles, the Avogadro constant, fixed when the SI mole was redefined in 2019. So the molar mass also tells you what 6.02214076 × 10²³ molecules of a substance weigh.
How to calculate molar mass
- Count the atoms of each element in the formula, including those inside brackets and hydrates.
- Multiply each count by the element's atomic weight.
- Add the results. The total is the molar mass in g/mol.
For water, H2O: two hydrogen atoms at 1.008 each give 2.016, one oxygen atom gives 15.999, and the total is 18.015 g/mol.
How to use the molar mass calculator
- Type the formula with capital letters for each element, for example NaCl, H2SO4 or CuSO4·5H2O. Brackets work, so Ca(OH)2 counts two O and two H. Use a dot or an asterisk between parts of a hydrate.
- Or tap an example such as water, carbon dioxide or glucose.
- Press Calculate. The result shows the molar mass, the sum of atomic weights, and each element's mass and percentage share.
- Convert an amount. Choose Grams to moles or Moles to grams and type the amount to see the other value and the number of particles.
Molar mass of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Carbon dioxide | CO2 | 44.009 |
| Sodium chloride | NaCl | 58.440 |
| Sulfuric acid | H2SO4 | 98.072 |
| Hydrochloric acid (hydrogen chloride) | HCl | 36.458 |
| Glucose | C6H12O6 | 180.156 |
| Ammonia | NH3 | 17.031 |
| Methane | CH4 | 16.043 |
| Ethanol | C2H5OH | 46.069 |
| Calcium carbonate | CaCO3 | 100.086 |
These values come from the abridged standard atomic weights, such as 12.011 for carbon, 15.999 for oxygen and 35.45 for chlorine. Other books may round the atomic weights differently, so their answers can differ in the last decimal place.
Where the atomic weights come from
The calculator uses the abridged standard atomic weights from CIAAW, the IUPAC commission that reviews them. Abridged values are quoted to five significant figures, unless that precision isn't possible because the isotopic make-up of an element varies in normal materials or because of the limits of measurement. That is why hydrogen is listed as 1.0080 and carbon as 12.011, while lithium is given only as 6.94 and sulfur as 32.06. Elements with no stable isotopes, such as technetium, have no standard atomic weight, so the calculator asks you to check those symbols instead of guessing a value. For school and most laboratory work, these abridged values are more than precise enough.
Converting grams to moles
Because molar mass links mass and amount of substance, you can use it to convert either way:
- Moles = grams ÷ molar mass
- Grams = moles × molar mass
- Number of particles = moles × 6.02214076 × 10²³
For example, 36 g of water is 36 ÷ 18.015 = 1.9983 mol, which is about 1.2034 × 10²⁴ water molecules. In the other direction, 0.5 mol of sodium chloride weighs 0.5 × 58.44 = 29.22 g. The calculator does both conversions as soon as you type an amount.
Why molar mass matters
Chemical equations count particles, not grams, but in the laboratory you weigh things on a balance. Molar mass is the bridge between the two. You need it to work out how much of each reactant to weigh out, to predict how much product a reaction should make, to calculate the concentration of a solution in moles per litre, and to find the percentage of each element in a compound.
Common mistakes
- Wrong capital letters. Co is cobalt, but CO is carbon monoxide. Each element symbol starts with a capital letter, and a second letter is always lower case.
- Forgetting brackets. In Mg(OH)2 the 2 applies to both O and H, so there are two of each.
- Ignoring water of crystallisation. Copper sulfate pentahydrate, CuSO4·5H2O, is much heavier per mole than anhydrous CuSO4.
- Mixing up molar mass and mass. Molar mass is a property of the substance; the mass of your sample depends on how much you have.
Related chemistry tools
See what share of a compound each element makes up with the percent composition calculator, balance reactions with the chemical equation balancer, look up any element in the periodic table, and work out solution strengths with the dilution calculator.
What next
Use this often? Add Molar Mass to your Home screen.
Frequently asked questions
How does the molar mass calculator work?
It reads the formula, counts the atoms of each element, multiplies each count by the element's standard atomic weight and adds them up to give g/mol.
What is the molar mass of water (H2O)?
18.015 g/mol: two hydrogen atoms at 1.008 and one oxygen atom at 15.999.
How do I convert grams to moles?
Divide the mass in grams by the molar mass. 36 g of water is 36 ÷ 18.015 = 1.9983 mol.
Is molar mass the same as molecular weight?
They have the same number. Molar mass is in g/mol for a mole of substance; molecular mass is the mass of one molecule in daltons.
What is the molar mass of glucose (C6H12O6)?
180.156 g/mol, from six carbon, twelve hydrogen and six oxygen atoms.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.