Chemistry tool
Molar mass calculator
Type a chemical formula to get its molar mass in g/mol, with a per-element breakdown and mass percent composition. Atomic weights come from the same data as the periodic table.
Calculator
Case matters (Co is cobalt, CO is carbon monoxide). Use brackets for groups and a dot for hydrates.
H2O18.015 g/mol
3 atoms of 2 elements
| Element | Atoms | Atomic mass (u) | Subtotal (g/mol) | Mass percent |
|---|---|---|---|---|
| Hydrogen (H) | 2 | 1.008 | 2.016 | |
| Oxygen (O) | 1 | 15.999 | 15.999 |
How to calculate molar mass
- Write the formula and count the atoms of each element (expand brackets and hydrates).
- Look up each element's standard atomic weight on the periodic table.
- Multiply each atomic weight by its number of atoms.
- Add the results to get the molar mass in g/mol.
Worked example — sulfuric acid, H₂SO₄: 2 × 1.008 (H) + 32.06 (S) + 4 × 15.999 (O) = 98.072 g/mol.
Molar masses of common compounds
Select a formula to load it into the calculator and see its breakdown.
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Carbon dioxide | CO2 | 44.009 |
| Sodium chloride (table salt) | NaCl | 58.440 |
| Glucose | C6H12O6 | 180.156 |
| Sucrose (table sugar) | C12H22O11 | 342.297 |
| Sulfuric acid | H2SO4 | 98.072 |
| Hydrochloric acid | HCl | 36.458 |
| Nitric acid | HNO3 | 63.012 |
| Acetic acid | CH3COOH | 60.052 |
| Ammonia | NH3 | 17.031 |
| Methane | CH4 | 16.043 |
| Ethanol | C2H5OH | 46.069 |
| Oxygen gas | O2 | 31.998 |
| Nitrogen gas | N2 | 28.014 |
| Sodium hydroxide | NaOH | 39.997 |
| Calcium hydroxide | Ca(OH)2 | 74.092 |
| Calcium carbonate | CaCO3 | 100.086 |
| Sodium bicarbonate (baking soda) | NaHCO3 | 84.006 |
| Potassium permanganate | KMnO4 | 158.032 |
| Ammonium nitrate | NH4NO3 | 80.043 |
| Aluminium oxide | Al2O3 | 101.961 |
| Iron(III) oxide (rust) | Fe2O3 | 159.687 |
| Magnesium sulfate | MgSO4 | 120.361 |
| Copper(II) sulfate pentahydrate | CuSO4·5H2O | 249.677 |
| Caffeine | C8H10N4O2 | 194.194 |
| Aspirin | C9H8O4 | 180.159 |
Frequently asked questions
What is molar mass?
Molar mass is the mass of one mole (6.022 × 10²³ particles) of a substance, expressed in grams per mole (g/mol). Numerically it equals the substance's relative molecular or formula mass in atomic mass units.
How do you calculate molar mass?
Multiply the atomic weight of each element by the number of atoms of that element in the formula, then add the results. For water, H2O: 2 × 1.008 + 15.999 = 18.015 g/mol.
What is the difference between molar mass and molecular weight?
They have the same numerical value. Molecular weight (relative molecular mass) is dimensionless or given in atomic mass units (u), while molar mass carries the unit g/mol.
How do I enter hydrates and brackets?
Use a dot, bullet or asterisk for hydrates, e.g. CuSO4·5H2O or CuSO4*5H2O. Parentheses, square brackets and curly braces can be nested with a count after them, e.g. Ca(OH)2 or K4[Fe(CN)6].
What is mass percent composition?
Mass percent is the share of a compound's molar mass contributed by each element: (atoms × atomic weight ÷ molar mass) × 100%. In water, hydrogen is about 11.19% and oxygen about 88.81% by mass.