Skip to content
K Knidox Search…
Chemistry · Stoichiometry

Molar Mass Calculator

Enter any chemical formula to get its molar mass, with a per-element breakdown.

Common compounds — tap to load
Molar mass
180.156g/mol
ElementCountMass (u)Subtotal
C612.01172.066
H121.00812.096
O615.99995.994

To find molar mass, sum the standard atomic mass of every atom in the formula, in g/mol: molar mass = Σ (atomic mass × count). For water, H₂O, that is 2 × 1.008 + 15.999 = 18.015 g/mol — two hydrogens plus one oxygen.

How molar mass is calculated

The molar mass of a compound is the sum of the standard atomic masses of every atom in its formula, in grams per mole. The calculator parses your formula — including nested parentheses like Ca(OH)₂ — and multiplies each element’s atomic weight by how many times it appears, then adds the contributions together.

molar mass = Σ (atomic mass × count)

sum every element’s atomic weight times how many atoms appear

Worked example

Find the molar mass of water, H₂O — two hydrogen atoms and one oxygen.

  1. 1
    Look up each atomic mass. Hydrogen is 1.008 g/mol and oxygen is 15.999 g/mol on the standard scale.
  2. 2
    Multiply by the atom counts. Hydrogen: 2 × 1.008 = 2.016. Oxygen: 1 × 15.999 = 15.999.
  3. 3
    Add the contributions. 2.016 + 15.999 = 18.015 g/mol for one mole of H₂O.

Molar masses of common compounds

Computed from standard atomic weights; values rounded to three decimals.

CompoundFormulaMolar mass (g/mol)
WaterH₂O18.015
Carbon dioxideCO₂44.009
Table saltNaCl58.440
GlucoseC₆H₁₂O₆180.156
Calcium hydroxideCa(OH)₂74.092
Sulfuric acidH₂SO₄98.072

Reading a formula correctly

Subscripts apply to the atom before them. In CO₂ the 2 multiplies only the oxygen, giving one carbon and two oxygens. Each atomic weight is pulled from the same data behind the periodic table.

Parentheses distribute. In Ca(OH)₂ the 2 multiplies everything inside, so there are two oxygens and two hydrogens, not one of each.

Common mistakes. Forgetting to multiply a polyatomic group by its subscript, mixing up the atomic masses of similar symbols (for example Co cobalt vs CO carbon-and-oxygen), and rounding atomic masses too early. Keep full precision until the final sum.

What formulas are supported?
Element symbols, subscripts, and nested parentheses — e.g. H2O, C6H12O6, Ca(OH)2, (NH4)2SO4.
Does it support hydrates (·)?
Dot-notation hydrates aren’t parsed yet — expand them manually, e.g. write CuSO4 and 5 H2O separately.
Where do the atomic masses come from?
Standard atomic weights from the built-in periodic table data, matching the values on the Periodic Table tool.
What’s the difference between molar mass and molecular weight?
Numerically they’re the same number. Molecular weight is unitless (relative to carbon-12); molar mass carries units of g/mol. For schoolwork you can treat them interchangeably.
How do I convert grams to moles with it?
Divide your mass in grams by the molar mass: moles = grams ÷ (g/mol). For example, 36.03 g of water is 36.03 ÷ 18.015 = 2 mol.
How do I enter a charge or an ion like SO₄²⁻?
Enter only the atoms — type SO4 for sulfate. The charge doesn’t change the molar mass, since the mass of the gained or lost electrons is negligible.