Chemical formula calculator

Molecular Weight Calculator

Calculate molecular weight and molar mass from chemical formulas, grouped compounds, and hydrate notation.

Enter chemical formula

Calculate molecular weight

Free tool

Supports element symbols, subscripts, parentheses, nested groups, and hydrates.

Try an example:

Your result will appear here

Enter a valid chemical formula, then calculate its molecular weight.

Formula

How molecular weight is calculated

Molar mass =Σ(number of atoms × atomic mass)

Each element symbol is identified from the formula. Its atomic mass is multiplied by its atom count, and all contributions are added together.

Worked example

Molecular weight of water

Water has the formula H2O. It contains two hydrogen atoms and one oxygen atom.

  1. Hydrogen: 2 × 1.008 = 2.016
  2. Oxygen: 1 × 15.999 = 15.999
  3. Total: 2.016 + 15.999 = 18.015 g/mol

Supported notation

Chemical formulas this calculator supports

  • Standard formulas such as H2O and NaCl
  • Multi-digit subscripts such as C12H22O11
  • Parentheses such as Ca(OH)2
  • Nested groups such as K4(ON(SO3)2)2
  • Hydrates such as CuSO4·5H2O

Common mistakes

Molecular-weight calculation mistakes

  • Using incorrect capitalization for element symbols.
  • Forgetting to multiply grouped atoms by a parenthesis subscript.
  • Ignoring hydrate water molecules.
  • Using atomic number instead of atomic mass.
  • Rounding individual element masses too early.

Related chemistry tools

Use the Mass to Moles Calculator to convert between grams and moles using the calculated molar mass.

Use the Molarity Calculator to calculate solution concentration.

Formula limits

Assumptions and limitations

The calculation assumes that the entered chemical formula is valid and unambiguous. Element symbols, subscripts, parentheses, and hydrate notation must be entered in a supported format.

The reported molecular or formula weight is based on standard atomic weights. Isotopically enriched samples, unspecified mixtures, variable-composition solids, and unsupported notation may require a specialized method.

Questions and answers

Molecular weight calculator FAQ

How do you calculate molecular weight?

Multiply the atomic mass of each element by the number of atoms shown in the chemical formula, then add all element contributions.

Are molecular weight and molar mass the same?

They use the same numerical value for a substance. Molecular weight is often treated as a relative value, while molar mass is expressed in grams per mole.

Does this calculator support parentheses?

Yes. It supports grouped formulas such as Ca(OH)2 and nested groups such as K4(ON(SO3)2)2.

Can this calculator handle hydrates?

Yes. Hydrates can be entered using a middle dot, for example CuSO4·5H2O.

Accuracy and transparency

Created and maintained by our editorial team

This chemistry calculator is maintained by the Science Lab Tools Editorial Team. Its calculation logic is tested with representative inputs, while the supporting guidance is checked for formula clarity, units, assumptions, and common mistakes.

Learn more about our formula-review and correction process, or read about Science Lab Tools.

  • Calculation logic tested
  • Variables and units explained
  • Assumptions stated clearly
  • Corrections handled transparently