Molar Mass Calculator
This molar mass calculator finds the grams per mole of any chemical formula. Type a formula like H2O or Ca(OH)2, and you'll get the molar mass, which is also the molecular weight, plus a breakdown of how much each element adds. It reads parentheses and subscripts just as you write them. Everything updates as you type, so it's quick for homework or lab prep. It's free and runs in your browser, so nothing you enter leaves your device.
- Molar mass
- Molecular weight
- Handles brackets
- Element breakdown
- Example formulas
Last updated June 17, 2026 Sum of atomic masses Reviewed by the Calcowa team
Check the formula. Use element symbols like H, O, Na, with brackets such as Ca(OH)2.
| Element | Count | Atomic mass | Subtotal |
|---|
How do you calculate molar mass?
Molar mass is the mass of one mole of a substance, in grams per mole, and you find it by adding up the atomic mass of every atom in the formula. The recipe is short: for each element, multiply its atomic mass from the periodic table by how many of those atoms appear, then sum the parts. Take water, written H2O. There are two hydrogen atoms, each about 1.008, and one oxygen at 16.00, so the total is 2 times 1.008 plus 16.00, which is 18.02 grams per mole. Brackets work the way you'd expect: in Ca(OH)2 the subscript 2 multiplies everything inside, so you count two oxygens and two hydrogens along with the one calcium, giving 74.10. The number is also the molecular weight, the two terms line up for any formula. Why bother? Because molar mass is the bridge between grams and moles, the currency of chemistry, so you need it to weigh out a reaction or make up a solution at a target concentration. This tool reads your formula, handles the brackets and subscripts, looks up each atomic mass, and shows both the total and a per-element breakdown the moment you type, so you don't have to chase atomic masses one by one and you'll know it's matched to the periodic table.
Working out a formula, step by step
Here's the routine for water, H2O, and it's just three steps:
- 1
Count each elementWater has 2 hydrogen atoms and 1 oxygen atom.
- 2
Multiply by atomic massHydrogen is 2 times 1.008, and oxygen is 1 times 16.00.
- 3
Add the parts2.016 plus 16.00 is 18.02 grams per mole.
Molar mass of common compounds
Here are molar masses worth knowing, in grams per mole. Tap any formula above to load it, and you'll see the same numbers with a full breakdown. If yours doesn't match, it's usually a capital letter that's off.
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.02 |
| Table salt | NaCl | 58.44 |
| Carbon dioxide | CO2 | 44.01 |
| Glucose | C6H12O6 | 180.16 |
| Calcium hydroxide | Ca(OH)2 | 74.09 |
Frequently asked questions
You type a chemical formula, and it reads each element, multiplies its atomic mass by how many atoms are present, and adds it all up. It handles parentheses and subscripts, so it understands something like Ca(OH)2 the way you'd write it. It then shows the total along with a breakdown of every element's share. Everything runs in your browser, so you'll see the mass the moment you finish typing, and nothing you enter leaves your device.
You add up the atomic mass of every atom in the formula. Look up each element on the periodic table, multiply its atomic mass by the number of those atoms, then total the parts. Water, H2O, has two hydrogens at about 1.008 and one oxygen at 16.00, so 2 times 1.008 plus 16.00 is 18.02 grams per mole. The calculator does that lookup and arithmetic for you, even with brackets, so you don't have to chase atomic masses one by one.
For everyday purposes, yes, the numbers match, though they mean slightly different things. Molar mass is the mass of one mole of a substance in grams per mole, while molecular weight is the mass of one molecule relative to atomic mass units. They come out to the same figure for a given formula, so a molar mass of 18.02 grams per mole and a molecular weight of 18.02 describe water equally well. This tool reports the value you'd use for either.
Use standard notation: capital first letter for each element, lowercase second letter if it has one, and a number after for the count. So sodium chloride is NaCl and glucose is C6H12O6. Use round brackets for repeated groups, like Ca(OH)2 for calcium hydroxide, and the number after the bracket multiplies everything inside. The tool is case-sensitive, since Co is cobalt while CO is carbon monoxide, so type elements exactly as they appear on the table.
Because element symbols are case-sensitive, and a slip changes the meaning. The first letter is always uppercase and any second letter is lowercase, so Mg is magnesium but mg is not an element at all. The classic trap is CO versus Co: carbon monoxide is one carbon and one oxygen, while Co is the single element cobalt. If the calculator flags an element it doesn't recognize, check that you've capitalized it the way the periodic table does.
Yes, it's completely free, with no sign-up, and it runs right in your browser, so nothing you enter leaves your device. Type a formula, tap an example to try one, and read the molar mass with its element breakdown in a tap. Bookmark it for chemistry homework, stoichiometry, or making up solutions, and pair it with the molarity tool, which needs exactly this number to turn grams into a concentration.
Related tools
More chemistry tools.
Molarity, dilution, pH, and more.
Molarity CalculatorMoles per liter of a solution.
pH CalculatorpH, pOH, and ion concentration.
Doing stoichiometry?
Find the molar mass above, then turn grams into a molarity.