Molar Mass CalculatorMolecular weight of any chemical formula, element by element
Type a formula or build it by clicking the periodic table. Brackets, nested groups and hydrates all work.
How do you calculate molar mass?
Add the atomic weight of every atom in the formula. Multiply each element’s atomic weight by its subscript and sum the results, giving g/mol. For water, H₂O = 2 × 1.008 + 15.999 = 18.015 g/mol. For carbon dioxide, CO₂ = 12.011 + 2 × 15.999 = 44.009 g/mol.
3 elements · 21 atoms
Click an element to add it to the formula. Highlighted elements are in your compound.
| Element | Atoms | Atomic weight | Subtotal (g/mol) | Mass % |
|---|---|---|---|---|
| Total | 100% |
Mass percent by element
The molar mass formula
Calculating molar mass by hand
- Write out the formula and expand brackets: Ca(OH)₂ contains 1 Ca, 2 O and 2 H.
- Look up each atomic weight: Ca 40.078, O 15.999, H 1.008.
- Multiply and add: 40.078 + 2(15.999) + 2(1.008) = 74.092 g/mol.
- For hydrates, add the water: CuSO₄·5H₂O = 159.602 + 5(18.015) = 249.677 g/mol.
Worked example: aspirin, C₉H₈O₄
Aspirin is the calculator’s default compound, and one of the best-known compounds in medicine.
- Carbon: 9 × 12.011 = 108.099
- Hydrogen: 8 × 1.008 = 8.064
- Oxygen: 4 × 15.999 = 63.996
- Total: 108.099 + 8.064 + 63.996 = 180.159 g/mol
So a standard 325 mg aspirin tablet contains 0.325 ÷ 180.159 = 1.80 × 10⁻³ mol, or 1.80 mmol, of acetylsalicylic acid. The grams to moles calculator does that last step for any compound.
Molar masses of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Oxygen gas | O2 | 31.998 |
| Carbon dioxide | CO2 | 44.009 |
| Ammonia | NH3 | 17.031 |
| Sodium chloride | NaCl | 58.440 |
| Sodium bicarbonate | NaHCO3 | 84.006 |
| Calcium carbonate | CaCO3 | 100.086 |
| Sulfuric acid | H2SO4 | 98.072 |
| Ethanol | C2H5OH | 46.069 |
| Glucose | C6H12O6 | 180.156 |
| Sucrose | C12H22O11 | 342.297 |
| Caffeine | C8H10N4O2 | 194.194 |
| Paracetamol | C8H9NO2 | 151.165 |
| Ibuprofen | C13H18O2 | 206.285 |
Molar mass, molecular weight and formula mass
Related chemistry calculators
Molar mass is the starting point for nearly every stoichiometry and solution calculation.
Molar mass FAQs
Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). It equals the sum of the atomic weights of all atoms in the chemical formula. Water's molar mass is 18.015 g/mol.
Multiply each element's atomic weight by the number of atoms of that element in the formula, then add the results. For CO2: 12.011 + 2 × 15.999 = 44.009 g/mol.
Numerically yes. Molar mass is expressed in g/mol, while molecular weight (relative molecular mass) is a unitless ratio to one-twelfth of a carbon-12 atom. Both give 18.015 for water.
Use parentheses or square brackets for groups, such as Ca(OH)2 or K4[Fe(CN)6]. For hydrates use a dot, an asterisk or a middle dot: CuSO4·5H2O, CuSO4.5H2O and CuSO4*5H2O all work.
Element symbols start with a capital letter and any second letter is lower case. CO is carbon monoxide (28.010 g/mol), while Co is cobalt (58.933 g/mol).
It uses IUPAC conventional standard atomic weights, such as 1.008 for hydrogen and 12.011 for carbon. Results can differ in the last decimal from textbooks that use rounded values like 1.0 or 12.0.
H2O = 2 × 1.008 + 15.999 = 18.015 g/mol.
NaCl = 22.990 + 35.45 = 58.44 g/mol.
C6H12O6 = 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol.
Yes, type the formula without the charge, for example SO4 for sulfate. The mass of the missing or extra electrons (about 0.00055 g/mol each) is negligible for most purposes.
Radioactive elements with no stable isotopes, such as Tc, Pm and Po, use the mass number of their longest-lived or most common isotope, a common convention in chemistry references.
Multiply moles by molar mass. Enter the number of moles in the calculator's mole box to get grams directly, for example 0.25 mol of NaCl × 58.44 = 14.61 g.
Sources
This molar mass calculator uses IUPAC conventional standard atomic weights. For isotope-labelled compounds or exact monoisotopic masses (mass spectrometry), use isotope-specific values.
