Molar mass is the sum of atomic weights in a formula: H2O = 2(1.008) + 15.999 = 18.015 g/mol, and glucose C6H12O6 = 180.156 g/mol. Type any formula below, including parentheses and hydrates like CuSO4·5H2O (249.677 g/mol), for the total plus a per-element breakdown.

Chemical Formula

H2O CO2 NaCl Ca(OH)2 H2SO4 Al2(SO4)3 CuSO4·5H2O C9H8O4
Molar Mass
ElementAtomic Mass (g/mol)CountSubtotal (g/mol)

Grams ⇄ Moles

Moles in your sample
Molecules / formula units
Advertisement

Molar Mass of Common Compounds

CompoundFormulaMolar Mass (g/mol)
WaterH2O18.015
MethaneCH416.043
AmmoniaNH317.031
Nitrogen gasN228.014
Oxygen gasO231.998
Hydrochloric acidHCl36.458
Sodium hydroxideNaOH39.997
EthanolC2H5OH46.069
Carbon dioxideCO244.009
Table saltNaCl58.440
Baking sodaNaHCO384.006
Sulfuric acidH2SO498.072
LimestoneCaCO3100.086
Slaked limeCa(OH)274.092
RustFe2O3159.687
Aluminum sulfateAl2(SO4)3342.132
Magnesium nitrateMg(NO3)2148.313
Potassium permanganateKMnO4158.032
Copper(II) sulfate, anhydrousCuSO4159.602
Copper(II) sulfate pentahydrateCuSO4·5H2O249.677
AspirinC9H8O4180.159
GlucoseC6H12O6180.156

Values use IUPAC 2021 conventional atomic weights (C 12.011, H 1.008, O 15.999, S 32.06, Cu 63.546). Your textbook's table may differ in the third decimal if it rounds differently.

How the Molar Mass Calculator Works

Type a formula, get grams per mole. The calculator parses the formula the way your chemistry teacher does: each element symbol carries a count (no subscript means one), parentheses distribute their multiplier across everything inside them, a leading coefficient multiplies the whole group, and a hydrate dot adds waters of hydration. It then sums count × atomic weight for every element and shows the work.

The formula

M = Σ (atomic weight × atom count). For C6H12O6 that's 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol. For a hydrate, CuSO4·5H2O = 159.602 + 5 × 18.015 = 159.602 + 90.075 = 249.677 g/mol. The grams-to-moles card divides mass by the result: n = m ÷ M, and moles × 6.022 × 10²³ gives particle count.

How to use it

Enter the formula with proper capitalization (Co is cobalt, CO is carbon monoxide, and the calculator will not guess for you). Parentheses and multipliers work to any depth, so K4Fe(CN)6 and CH3(CH2)3CH3 both parse. Click any example chip to load it. Edit the mass field and the mole card converts instantly; type into the mole field instead and it works in reverse.

A worked example

How many moles are in 25.0 g of glucose? Molar mass first: 180.156 g/mol from the table above. Then n = 25.0 ÷ 180.156 = 0.1388 mol, which holds 0.1388 × 6.022 × 10²³ ≈ 8.36 × 10²² molecules. Now run it backward for a lab prep: to measure out 0.75 mol of NaCl you'd weigh 0.75 × 58.440 = 43.83 g.

One caution that trips every first-year student: molar mass (g/mol per formula unit) and molecular weight (dimensionless, from unified atomic mass units) are the same number with different labels. Where they diverge is ionic salts, which form formula units rather than molecules; the number still works identically for stoichiometry.

Frequently Asked Questions

What is molar mass?

Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). Numerically it equals the sum of the atomic weights of every atom in the chemical formula: water (H2O) is 2 × 1.008 + 15.999 = 18.015 g/mol, and glucose (C6H12O6) is 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol. One mole always contains 6.022 × 10²³ particles, so molar mass is the bridge between grams on a scale and molecules in a flask.

How do you calculate molar mass from a formula?

Write out the formula, list each element with its count (multiplying through any parentheses), look up each element's atomic weight, multiply by the count, and add the subtotals. For Ca(OH)2: calcium 40.078, plus 2 × oxygen (15.999), plus 2 × hydrogen (1.008), which totals 74.092 g/mol. The calculator automates exactly this, including nested groups like Al2(SO4)3 (342.132 g/mol).

What is the molar mass of water?

18.015 g/mol. Two hydrogens at 1.008 each plus one oxygen at 15.999 sum to 18.015 grams per mole, so one mole of water weighs 18.015 grams, about 18 milliliters.

How do you handle hydrates like CuSO4·5H2O?

Multiply the water count through the whole H2O unit and add it to the anhydrous salt. Copper(II) sulfate pentahydrate is CuSO4 (159.602 g/mol) plus 5 × H2O (5 × 18.015 = 90.075), totaling 249.677 g/mol. The calculator accepts the dot written as ·, ., *, or ~.

How do you convert grams to moles?

Divide mass by molar mass: moles = grams ÷ g/mol. For 25.0 g of glucose, 25.0 ÷ 180.156 = 0.1388 mol. Going the other way, grams = moles × molar mass, so 0.75 mol of NaCl weighs 0.75 × 58.440 = 43.83 g. Multiply moles by 6.022 × 10²³ if you need particle counts.

Advertisement