By Tim King · Updated
Molar Mass Calculator
Molecular Weight and g/mol of Any Formula With Per-Element Breakdown
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Molar Mass Calculator works
This molar mass calculator reads any chemical formula, including brackets such as Ca(OH)2, square brackets in complexes and hydrates written with a dot like CuSO4·5H2O, and adds up the atomic masses to give grams per mole. It shows the sum element by element, the mass of a single molecule, and how many moles are in a sample if you enter its mass.
Molar mass is the mass of one mole of a substance, 6.022 × 10²³ formula units, in grams. It links the mass you can weigh on a balance to the number of particles that take part in a reaction, so it is the first number you need for almost every calculation in chemistry. Atomic masses here are the IUPAC standard values, rounded the way most textbooks print them.
How the molar mass calculator works
The formula is simple: molar mass = Σ (number of atoms × atomic mass) over every element in the formula. Brackets multiply everything inside them by the number after, and a hydrate dot adds the water molecules on the end. The result is in g/mol, which is numerically the same as the molecular weight in daltons.
First example. Calcium hydroxide, Ca(OH)2, has 1 Ca, 2 O and 2 H: 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol. A 10 g sample is 10 ÷ 74.092 = 0.135 mol.
Second example. Copper sulfate pentahydrate, CuSO4·5H2O, has 1 Cu, 1 S, 9 O and 10 H once the five waters are counted, which gives 249.677 g/mol. Forgetting the water gives 159.6 g/mol, a 36% error.
How many grams are in one mole of water? Two hydrogens and one oxygen give 2 × 1.008 + 15.999 = 18.015 g, so a mole of water is about 18 mL.
Molar masses of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Carbon dioxide | CO2 | 44.009 |
| Oxygen | O2 | 31.998 |
| Nitrogen | N2 | 28.014 |
| Methane | CH4 | 16.043 |
| Ammonia | NH3 | 17.031 |
| Sodium chloride | NaCl | 58.440 |
| Ethanol | C2H5OH | 46.069 |
| Glucose | C6H12O6 | 180.156 |
| Sucrose | C12H22O11 | 342.297 |
| Sulfuric acid | H2SO4 | 98.072 |
| Hydrochloric acid | HCl | 36.458 |
| Nitric acid | HNO3 | 63.012 |
| Sodium hydroxide | NaOH | 39.997 |
| Calcium carbonate | CaCO3 | 100.086 |
| Sodium bicarbonate | NaHCO3 | 84.006 |
| Acetic acid | CH3COOH | 60.052 |
| Hydrogen peroxide | H2O2 | 34.014 |
| Propane | C3H8 | 44.097 |
| Copper(II) sulfate pentahydrate | CuSO4·5H2O | 249.677 |
| Potassium permanganate | KMnO4 | 158.032 |
| Calcium hydroxide | Ca(OH)2 | 74.092 |
| Iron(III) oxide | Fe2O3 | 159.687 |
| Aspirin | C9H8O4 | 180.159 |
| Caffeine | C8H10N4O2 | 194.194 |
Tips and pitfalls
- Capital letters matter. Co is cobalt; CO is carbon monoxide. Each element symbol starts with a capital and any second letter is lower case.
- Count the hydrate water. Lab bottles often hold the hydrated salt, and its molar mass is noticeably larger than the anhydrous one.
- Ionic compounds have formula units. NaCl does not form molecules, but the molar mass works the same way per formula unit.
- Keep the precision. Round only at the end; rounding atomic masses early adds up in big molecules.
FAQ
How do you calculate molar mass?
Count how many atoms of each element are in the formula, multiply each count by that element's atomic mass from the periodic table, and add the results. For CO2 that is 12.011 + 2 × 15.999 = 44.009 g/mol. Brackets and hydrates just change the counts.
Is molar mass the same as molecular weight?
They are numerically equal but have different units. Molar mass is grams per mole, while molecular weight is the mass of one molecule in daltons or atomic mass units. Water is 18.015 g/mol and one water molecule weighs 18.015 Da, so most people use the terms interchangeably.
What is the molar mass of water?
Water, H2O, has a molar mass of 18.015 g/mol: two hydrogen atoms at 1.008 each plus one oxygen at 15.999. That means 18 g of water, about one tablespoon, contains roughly 6.022 × 10²³ water molecules.
How do I enter brackets and hydrates?
Type the formula as it is printed, for example Mg(NO3)2, K4[Fe(CN)6] or CuSO4·5H2O. The dot in a hydrate can be a middle dot, a full stop or an asterisk. A number after a closing bracket multiplies every atom inside it.
Why do different sources give slightly different molar masses?
Atomic masses are averages over natural isotope mixtures, and IUPAC publishes some as ranges because the mix varies by source. Textbooks round them to different numbers of decimal places, so answers can differ in the second or third decimal without either being wrong.
See also: all Chemistry tools, Physics, Electronics.
Related tools
Grams To Moles Converter
Grams to moles and back for any formula.
Percent Composition Calculator
Mass percent of each element in any formula.
Molarity Calculator
Molarity, mass to weigh and volume for any solution.
Interactive Periodic Table
All 118 elements, coloured by category, block or property.
Chemical Equation Balancer
Balance any chemical equation with whole-number coefficients.