Skip to content
Mathico

Molecular Weight Calculator

Calculate the molar mass (molecular weight) of any chemical formula, including brackets and hydrates. You also get each element's mass percent and a grams-to-moles converter.

Case-sensitive. Brackets and hydrates (·, . or *) are supported.

Examples

Grams ↔ moles

g
mol

100 g = 0.55507 mol.

Molar mass of C6H12O6

180.156 g/mol

ElementAtomsAtomic weightMassMass %
C612.01172.06640.00%
H121.00812.0966.71%
O615.99995.99453.28%

Sum of (atoms × atomic weight). [ ] = mass number of the most stable isotope.

How to use the molecular weight calculator

  1. Type a chemical formula such as H2O, Ca(OH)2 or CuSO4·5H2O, or tap an example.
  2. Read the molar mass in g/mol, with a table showing each element's atom count, mass contribution and percentage by mass.
  3. Convert between grams and moles using the box under the formula.

How molar mass is calculated

M = Σ (number of atoms of element × atomic weight of element)
moles = mass (g) ÷ M · mass (g) = moles × M
mass % of element = (atoms × atomic weight) ÷ M × 100

Atomic weights are the IUPAC standard values, rounded to about five significant figures. They're averages over each element's natural isotope mix, which is why chlorine is 35.45 rather than a whole number.

Worked examples

Glucose, C6H12O6

6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol

By mass, glucose is 40.00% carbon, 6.71% hydrogen and 53.28% oxygen. 100 g of glucose is 100 ÷ 180.156 = 0.555 mol.

A hydrate: copper(II) sulfate pentahydrate, CuSO4·5H2O

CuSO4 contributes 159.60 g/mol and five waters add 5 × 18.015 = 90.08, for a total of 249.68 g/mol. Forgetting the water of crystallization is one of the most common lab-calculation mistakes.

Brackets: calcium phosphate, Ca3(PO4)2

The subscript 2 multiplies everything inside the brackets: 3 Ca + 2 P + 8 O = 310.17 g/mol.

Molar masses of common compounds

CompoundFormulaMolar mass (g/mol)
WaterH2O18.015
Carbon dioxideCO244.009
Sodium chloride (salt)NaCl58.440
Ammonium nitrateNH4NO380.043
Sulfuric acidH2SO498.072
GlucoseC6H12O6180.156
CaffeineC8H10N4O2194.194

Molecular weight vs molar mass

Molecular weight (molecular mass) is the mass of a single molecule, in atomic mass units (u, also called daltons, Da). Molar mass is the mass of one mole of a substance, 6.022 × 10²³ particles, in grams per mole. Because of how the mole is defined, the two numbers are the same: one water molecule is 18.015 u, and one mole of water is 18.015 g. For ionic compounds such as NaCl, "formula mass" is the technically correct term, calculated the same way.

Tips and common mistakes

  • Capitalize correctly: Co (cobalt) ≠ CO (carbon monoxide); Hf ≠ HF.
  • Apply subscripts after brackets to every atom inside: (NH4)2SO4 has 2 N and 8 H.
  • Don't forget hydrate water when weighing out salts from a bottle labeled ·xH2O.
  • Scaling a recipe or solution? Ratios of masses or volumes work like any proportion. Use the proportion calculator or the ratio calculator.

More science calculators.

Sources

Frequently asked questions

How do you calculate molecular weight?

Multiply each element's atomic weight by the number of atoms of that element in the formula, then add the results. Water (H2O) is 2 × 1.008 + 15.999 = 18.015 g/mol.

Is molecular weight the same as molar mass?

Numerically, yes. Molecular weight (molecular mass) is the mass of one molecule in atomic mass units (u or Da); molar mass is the mass of one mole in grams per mole (g/mol). Water is 18.015 u per molecule and 18.015 g/mol.

How do I enter hydrates and brackets?

Use parentheses or square brackets for groups, with the multiplier after them: Ca(OH)2, Ca3(PO4)2, K4[Fe(CN)6]. For hydrates, separate the water with a dot or · and put the number of waters in front: CuSO4·5H2O or CuSO4.5H2O.

Why does capitalization matter?

Element symbols are case-sensitive: Co is cobalt, but CO is carbon plus oxygen (carbon monoxide). Each symbol starts with a capital letter, followed by a lowercase letter if it has two letters.

How do I convert grams to moles?

Divide the mass in grams by the molar mass. 36 g of water ÷ 18.015 g/mol ≈ 2.0 mol. To go from moles to grams, multiply instead. The converter below the result does both.

Which atomic weights does this calculator use?

IUPAC standard atomic weights in their abridged (rounded) form. For radioactive elements with no stable isotopes, such as technetium or radon, the mass number of the longest-lived isotope is used, which is the usual convention.