Molar Mass Calculator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free molar mass calculator. Type any chemical formula, including brackets and hydrates, to get g/mol and each element's percentage by mass.
- Atoms per formula unit
- 0
- Elements
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the molar mass calculator
- Type a chemical formula, such as H2O, NaCl, C6H12O6 or Ca(OH)2.
- Use brackets for groups that repeat, for example Mg(NO3)2 or K4[Fe(CN)6].
- Use a dot for hydrates, such as CuSO4·5H2O. A full stop or an asterisk works too: CuSO4.5H2O or CuSO4*5H2O.
- Read the result as you type.
The molar mass calculator shows the molar mass in grams per mole, a table with each element's number of atoms, atomic weight, mass contribution and percentage by mass, and the total number of atoms in one formula unit. Subscript digits such as H₂O are accepted as well as ordinary numbers.
What is molar mass?
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 number of particles: exactly 6.02214076 × 10²³, the Avogadro constant. Because the atomic weights on the periodic table are set relative to carbon-12, the molar mass of a substance in g/mol has the same number as the average mass of one molecule in daltons (atomic mass units).
Molar mass is the bridge between the mass you can weigh on a balance and the number of particles that take part in a reaction. Nearly every calculation in chemistry, from preparing solutions to working out the yield of a reaction, starts with it.
How the molar mass calculator works
The molar mass of a compound is the sum of the atomic weights of all the atoms in its formula:
Molar mass = Σ (number of atoms of each element × atomic weight of that element)
The molar mass calculator reads the formula from left to right, multiplies everything inside brackets by the number after the bracket, adds any hydrate water multiplied by its coefficient, and then adds up the masses.
It uses the standard atomic weights published by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW). For elements whose atomic weight is published as a range, because their isotope mix varies in nature, it uses IUPAC's conventional single values, such as 1.008 for hydrogen, 12.011 for carbon and 15.999 for oxygen. For radioactive elements with no standard atomic weight, such as technetium and plutonium, it uses the mass number of a long-lived isotope and tells you so.
A worked example: glucose
Glucose has the formula C6H12O6.
- Carbon: 6 × 12.011 = 72.066 g/mol.
- Hydrogen: 12 × 1.008 = 12.096 g/mol.
- Oxygen: 6 × 15.999 = 95.994 g/mol.
- Total: 72.066 + 12.096 + 95.994 = 180.156 g/mol.
So one mole of glucose weighs about 180.16 grams. By mass, glucose is about 40.0% carbon, 6.7% hydrogen and 53.3% oxygen. Enter C6H12O6 in the molar mass calculator to see the same breakdown.
More examples
| Substance | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Table salt | NaCl | 58.44 |
| Calcium hydroxide | Ca(OH)2 | 74.092 |
| Sulfuric acid | H2SO4 | 98.072 |
| Glucose | C6H12O6 | 180.156 |
| Copper sulfate pentahydrate | CuSO4·5H2O | 249.677 |
| Potassium ferrocyanide | K4[Fe(CN)6] | 368.346 |
Values from different textbooks can differ in the last decimal place, because some use older or more rounded atomic weights.
Brackets and hydrates
Brackets group atoms that appear more than once. In Ca(OH)2, the 2 after the bracket applies to both the oxygen and the hydrogen, so the formula contains one calcium, two oxygen and two hydrogen atoms. Brackets can be nested, as in K4[Fe(CN)6], where six cyanide groups surround one iron atom.
Hydrates are crystals that contain water molecules locked into their structure. The formula CuSO4·5H2O means each unit of copper sulfate is accompanied by five water molecules. The molar mass calculator multiplies the part after the dot by its leading number, so five waters add 5 × 18.015 = 90.076 g/mol to the 159.602 g/mol of anhydrous copper sulfate. Getting hydrate water right matters when you weigh out a solid to make a solution: using the anhydrous molar mass for a hydrate gives a solution that's weaker than intended.
Percentage composition
The percentage by mass of each element is its contribution divided by the total molar mass. Percentage composition is used to check the purity of a compound, to compare fertilisers or ores by their content of a useful element, and in reverse, to work out an empirical formula from experimental data. For example, water is about 11.2% hydrogen and 88.8% oxygen by mass, even though it has twice as many hydrogen atoms as oxygen atoms, because oxygen atoms are much heavier.
Converting between grams and moles
Once you know the molar mass, converting is simple:
Moles = mass in grams ÷ molar mass
Mass in grams = moles × molar mass
For example, 90 grams of glucose is 90 ÷ 180.156 ≈ 0.4996 moles, and 0.25 moles of table salt weighs 0.25 × 58.44 ≈ 14.61 grams. The molarity calculator uses the molar mass to work out how much solute you need for a solution.
Who uses a molar mass calculator
Chemistry students use it for homework, lab reports and exam revision. Laboratory technicians use it when preparing reagents and standard solutions. Pharmacists and pharmaceutical scientists use it to convert between doses in milligrams and amounts in moles. Chemical engineers use it for process calculations, and teachers use it to check answers and prepare worked examples.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.
Molar mass, molecular weight and formula weight
These terms are often used interchangeably, with slight differences in meaning. Molar mass is the mass per mole, in g/mol. Molecular weight, strictly a relative molecular mass, is the same number without units, and applies to substances made of discrete molecules. Formula weight is used for ionic compounds like sodium chloride, which form a lattice rather than separate molecules. Numerically they're all the same, and the molar mass calculator gives the value for any of them.
Typing formulas correctly
Element symbols are case-sensitive. Co is cobalt, but CO is carbon monoxide; Sn is tin, but SN would be sulfur and nitrogen. The first letter of every symbol must be a capital and the second, if there is one, lower case. The molar mass calculator tells you if it can't recognise a symbol, which usually means a capitalisation mistake. Numbers always come after the element or bracket they apply to, except for the leading number of a hydrate's water.
Isotopes and exact masses
Standard atomic weights are averages over the natural mix of an element's isotopes. That's right for weighing everyday substances. Mass spectrometry, however, measures individual molecules, so chemists there use the exact mass of specific isotopes, called the monoisotopic mass, which differs slightly from the molar mass. For example, the monoisotopic mass of water made of hydrogen-1 and oxygen-16 is about 18.0106, compared with a molar mass of 18.015.
Common mistakes
- Forgetting to multiply everything inside brackets by the number after them.
- Leaving out hydrate water when weighing a hydrated salt.
- Typing element symbols in the wrong case, such as CO for cobalt.
- Mixing up molar mass with mass. Molar mass is per mole; the mass you weigh depends on how many moles you need.
Molar mass of gases
For gases, molar mass links mass to volume. At 0 °C and 1 atmosphere, one mole of an ideal gas occupies about 22.414 litres, so the density of a gas at those conditions is roughly its molar mass divided by 22.414. Carbon dioxide, at about 44.009 g/mol, is about 1.96 grams per litre, heavier than air, which has an average molar mass of about 28.96 g/mol. That's why carbon dioxide collects in low places. The molar mass calculator gives the molar mass, and the ideal gas law calculator handles other temperatures and pressures.
Sources and further reading
- IUPAC Commission on Isotopic Abundances and Atomic Weights: Standard atomic weights, the official table used by this calculator.
- Molar mass on Wikipedia: definitions and calculation.
- NIST: Avogadro constant, the exact number of particles in a mole.
Frequently asked questions
How do I calculate molar mass?
Multiply the number of atoms of each element by its atomic weight and add the results.
What is the molar mass of water?
About 18.015 g/mol: two hydrogen atoms at 1.008 and one oxygen atom at 15.999.
How do I enter a hydrate?
Use a dot, full stop or asterisk before the water, for example CuSO4·5H2O or CuSO4.5H2O.
Which atomic weights does the calculator use?
The IUPAC CIAAW standard atomic weights, with conventional values for elements given as ranges.
What is the difference between molar mass and molecular weight?
They have the same number. Molar mass is in g/mol; molecular weight is a unitless ratio.
Is the molar mass calculator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.