Skip to content

Molar mass calculator

Type a chemical formula to get its molar mass in g/mol, a table with each element's count, atomic mass and mass percent, and a quick conversion from grams to moles and particles.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Type a chemical formula, such as C6H12O6.
  2. Check the molar mass in g/mol.
  3. Review the element table and mass percentages.
  4. Enter a mass in grams to get moles and number of particles.
Try it now

How molar mass is calculated

The molar mass of a compound is the sum of the atomic masses of all atoms in its formula, in grams per mole (g/mol). Numerically it equals the molecular (or formula) weight in atomic mass units.

Example: sulfuric acid, H₂SO₄

ElementCountAtomic massSubtotal
H21.0082.016
S132.0632.06
O415.99963.996
Total98.072 g/mol

The calculator builds this table for any formula and runs entirely in your browser.

Formula syntax

  • Case matters. Co is cobalt; CO is carbon monoxide. Element symbols start with a capital letter.
  • Parentheses and brackets group atoms: Ca(OH)₂ is entered as Ca(OH)2, and nested groups such as [Fe(CN)6] work too.
  • Hydrates use a dot or asterisk: CuSO4·5H2O or CuSO4*5H2O (molar mass about 249.68 g/mol).
  • Charges such as SO4^2- or NH4+ are ignored, since electrons add almost no mass.

Quick buttons fill in common examples: water (18.015 g/mol), carbon dioxide (44.009), table salt (58.44), glucose (180.156) and ethanol.

Grams to moles and particles

moles = mass (g) ÷ molar mass (g/mol)

particles = moles × 6.02214076 × 10²³ (Avogadro's number)

Example: 10 g of NaCl ÷ 58.44 g/mol ≈ 0.1711 mol, which is about 1.03 × 10²³ formula units.

To go from moles to grams, multiply: 2 mol of water × 18.015 g/mol = 36.03 g.

Mass percent composition

The last column shows each element's share of the total mass. In water, hydrogen is 2.016 / 18.015 ≈ 11.19% and oxygen 88.81%. Mass percent helps with empirical formula problems, fertilizer labels (such as nitrogen content) and checking lab results.

Where the atomic masses come from

The tool uses IUPAC standard atomic weights, abridged to the precision usually used in coursework (for example 12.011 for carbon and 15.999 for oxygen). For radioactive elements without a stable isotope, it uses the mass number of the longest-lived isotope. Your textbook may round slightly differently, so answers can differ in the last decimal place. Round your final answer to the number of significant figures your problem calls for, usually matching the least precise value given.

Common mistakes

  • Forgetting to multiply a group. In Ca(OH)₂ there are two O and two H atoms, not one.
  • Lowercase symbols. "co2" is not a valid formula; type CO2.
  • Ignoring water of hydration. CuSO₄ (about 159.6 g/mol) and CuSO₄·5H₂O (about 249.7 g/mol) are very different when you weigh out a sample.

For scientific notation in particle counts, see the scientific notation calculator.

Using molar mass in stoichiometry

Most chemistry problems convert grams of one substance to grams of another through moles:

  1. Convert grams of the starting substance to moles with its molar mass.
  2. Use the balanced equation's coefficients to convert to moles of the product.
  3. Convert moles of the product back to grams with its molar mass.

Example: burning 16.0 g of methane (CH₄, 16.04 g/mol) gives about 0.998 mol. The equation CH₄ + 2O₂ → CO₂ + 2H₂O makes 1 mol of CO₂ per mol of methane, so about 0.998 × 44.009 ≈ 43.9 g of CO₂.

Frequently asked questions

How do I calculate molar mass?

Add up the atomic masses of every atom in the formula. For H2O: 2 × 1.008 + 15.999 = 18.015 g/mol.

What is the molar mass of H2SO4?

About 98.07 g/mol.

Is molar mass the same as molecular weight?

They have the same numerical value; molar mass is in g/mol and molecular weight in atomic mass units.

How do I convert grams to moles?

Divide the mass in grams by the molar mass. 10 g of NaCl is about 0.171 mol.

Can I enter hydrates and parentheses?

Yes. Use CuSO4·5H2O or CuSO4*5H2O for hydrates and parentheses or brackets for groups.

Last updated: November 12, 2026

Recommended

Similar tools

If Molar mass calculator helped, you may need these too.

See all in category →

People also use