BYTETOOLS

Molar Mass Calculator

Work out the molar mass of any chemical formula in g/mol, with a per-element breakdown. Handles brackets, hydrates and a grams-to-moles converter.

18.015
Molar mass (g/mol)
3
Atoms per formula unit
2
Distinct elements

Mass breakdown

ElementAtomsAtomic massMass in formula% of total
O Oxygen115.99915.99988.81%
H Hydrogen21.0082.01611.19%

Grams ↔ moles

= 0.555093 mol

= 18.015 g

moles = mass ÷ molar mass · mass = moles × molar mass

What is the Molar Mass Calculator?

Molar mass is the mass of one mole of a substance in grams per mole. Add up the standard atomic weight of every atom in the formula: water, H₂O, is 2 × 1.008 + 15.999 = 18.015 g/mol.

  • Parses nested brackets, multi-letter symbols and hydrate dots
  • Per-element mass and percentage breakdown
  • Built-in grams ↔ moles converter
  • IUPAC standard atomic weights for all 118 elements
  • Clear error messages for unknown symbols and unbalanced brackets
  • 100% private — the formula never leaves your browser

How to use the Molar Mass Calculator

  1. 1

    Type a chemical formula, for example H2SO4 or CuSO4·5H2O.

  2. 2

    Read the molar mass in g/mol at the top of the results.

  3. 3

    Check the breakdown table to see each element's mass contribution.

  4. 4

    Use the grams ↔ moles panel to convert a weighed mass into moles.

  5. 5

    Click Copy breakdown to take the whole table with you.

About the Molar Mass Calculator

The ByteTools Molar Mass Calculator turns a chemical formula into a molar mass in grams per mole. Type something as simple as H2O or as involved as CuSO4·5H2O and the tool parses the symbols, multiplies each element by its subscript, and adds up the standard atomic weights to give the total. A table underneath shows exactly how much each element contributes.

It is written for chemistry students preparing solutions, lab technicians weighing out reagents and anyone converting between grams and moles. Nested brackets such as Ca(OH)2 and Al2(SO4)3 are handled by a proper parser, and hydrate dots are supported, so you do not have to expand the formula yourself before typing it in.

Everything runs in JavaScript inside your browser using a built-in table of IUPAC standard atomic weights. No formula is uploaded and nothing is stored, so the calculator is instant, private and works offline once the page has loaded.

Frequently asked questions

How do you calculate molar mass from a chemical formula?

Multiply each element's standard atomic weight by the number of its atoms in the formula, then add the products together. For water the sum is 2 × 1.008 for hydrogen plus 15.999 for oxygen, giving 18.015 g/mol.

What is the molar mass of water?

Water, H₂O, has a molar mass of 18.015 g/mol. That comes from two hydrogen atoms at 1.008 u each plus one oxygen atom at 15.999 u. One mole of water therefore weighs a little over 18 grams.

How do you enter a hydrate like copper sulfate pentahydrate?

Type it the way it is written, CuSO4·5H2O, using a middle dot, a full stop or an asterisk between the two parts. The calculator applies the 5 to the whole water unit and returns 249.68 g/mol.

Is molar mass the same as molecular weight?

They are numerically the same but carry different units. Molecular weight (or relative molecular mass) is a ratio and has no unit, while molar mass is expressed in grams per mole. In everyday lab work the two terms are used interchangeably.

Why are some atomic masses shown with an asterisk?

Elements such as technetium, promethium and everything past bismuth have no stable isotope, so IUPAC publishes no standard atomic weight. For those the calculator uses the mass number of the most stable known isotope and marks it in the table.

Related tools