Molar Mass Calculator
Molar mass from a chemical formula.
Show detailsHide details
Enter a chemical formula and this calculator adds up the standard atomic weights of every atom to give the molar mass in g/mol — with a breakdown showing how much each element contributes, and its percentage by mass.
Loading calculator...
Molar Mass — The Quick Answer
Molar mass is the sum of the atomic masses of all atoms in a formula, in grams per mole. Water (H₂O) is 2 × 1.008 + 15.999 ≈ 18.02 g/mol. Type any formula to get its value.
Shortcut
Molar mass = Σ (number of atoms × atomic mass)
Molar masses of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.02 |
| Carbon dioxide | CO2 | 44.01 |
| Sodium chloride | NaCl | 58.44 |
| Glucose | C6H12O6 | 180.16 |
| Sulfuric acid | H2SO4 | 98.08 |
| Calcium carbonate | CaCO3 | 100.09 |
Molar mass is numerically equal to molecular mass but carries the unit g/mol, connecting the microscopic world of atoms to weights you can measure on a balance: one mole of any substance contains 6.022 × 10²³ particles (Avogadro's number).
How It Works
The Method
Adding up atomic weights
Formula
M = Σ (nᵢ × Aᵢ) where nᵢ = atoms of element i, Aᵢ = its atomic weight
Variables
Subscript
How many atoms of that element appear in the formula. In H2O, hydrogen has n = 2 and oxygen n = 1.
Atomic weight
The standard atomic mass of the element in g/mol, from the IUPAC conventional values (e.g. C = 12.011, O = 15.999).
Molar mass
The sum, in grams per mole — the mass of one mole of the substance.
Note: Brackets multiply everything inside: Ca(OH)2 = Ca + 2 × (O + H). If a formula has water of crystallisation, add the water separately (e.g. CuSO4·5H2O).
Last updated: October 6, 2026

Creators
Computer Scientist & Developer Tools Author
Reviewers
Technical Reviewer
Table of Contents
Quick Facts
Related Tools
Privacy Guaranteed
Your data never leaves your browser. All calculations are 100% private.
Frequently Asked Questions
How do I calculate molar mass?
Add up the atomic masses of every atom in the formula. For water, H2O: 2 × 1.008 (hydrogen) + 15.999 (oxygen) = 18.015 g/mol. This calculator does that automatically for any formula you type.
What is the difference between molar mass and molecular mass?
They're the same number, but different units. Molecular mass is measured in atomic mass units (u), while molar mass is in grams per mole (g/mol). Numerically they match because one mole contains Avogadro's number of particles.
How do I enter brackets like in Ca(OH)2?
Just type them as written: Ca(OH)2. The digit after the bracket multiplies everything inside, so Ca(OH)2 means 1 calcium, 2 oxygen, and 2 hydrogen atoms. Square brackets [ ] work too.
Why does the calculator give small differences from my textbook?
Atomic weights have a small range depending on the sample's isotopic composition. This tool uses the IUPAC conventional values (e.g. C = 12.011 rather than exactly 12), which is standard practice — tiny differences of a few hundredths of a g/mol are normal.