Molecular Weight Calculator

Calculate molecular weight from chemical formula. Parses element symbols and subscripts.

By Konstantin Iakovlev · Updated April 2026 · Source: Khan Academy

Molecular Weight

18.015 g/mol

Element Breakdown

H × 22.016 g/mol
O × 115.999 g/mol

Use the Molecular Weight Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.

Disclaimer: This calculator is for informational purposes only and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.

How It Works

Molecular weight is the foundation for almost every quantitative task in chemistry, from weighing out a reagent in a research lab to dialing in a reaction on a manufacturing line, where a small error in mass can ripple into wasted material and off-spec product. The stakes are highest in pharmaceutical work, where the figure feeds directly into dosage calculations that affect patient safety and efficacy in a sector projected to exceed $1.7 trillion by 2026.

The tool reads a chemical formula by separating it into element symbols and their subscripts, then looks each element up against a database of atomic weights based on the latest IUPAC values. Multiplying every element's atomic weight by how many times it appears, and adding those products together, yields the molecular weight of the whole compound.

Capitalization carries meaning here: 'Co' is cobalt, while 'CO' is carbon monoxide, so the case of each letter changes the answer entirely. Parentheses matter too. 'Mg(OH)2' contains two hydroxyl groups, and an element written without a number, like oxygen in 'H2O', still carries an implied subscript of 1 that has to be counted.

Example: Calculating the Molecular Weight of Glucose

  1. 1 Input the chemical formula for glucose: C6H12O6.
  2. 2 The calculator identifies Carbon (C) with a subscript of 6, Hydrogen (H) with a subscript of 12, and Oxygen (O) with a subscript of 6. Using current atomic weights (C ≈ 12.011 g/mol, H ≈ 1.008 g/mol, O ≈ 15.999 g/mol), it calculates: (6 * 12.011) + (12 * 1.008) + (6 * 15.999).
  3. 3 The calculated molecular weight is approximately 180.156 g/mol.
  4. 4 This molecular weight is vital for biochemists determining concentrations in metabolic studies or for food scientists analyzing carbohydrate content, especially as global demand for food analysis and quality control is expected to reach $29 billion by 2026.

Source: Khan Academy · Last updated: April 2026

Frequently Asked Questions

How do you calculate molecular weight from a formula?
Add the atomic weights of all atoms in the formula. For H₂O: (2 x 1.008) + (1 x 16.00) = 18.016 g/mol. For glucose C₆H₁₂O₆: (6 x 12.01) + (12 x 1.008) + (6 x 16.00) = 180.16 g/mol.
What is the difference between molecular weight and molar mass?
They are numerically identical but have different units. Molecular weight is measured in atomic mass units (amu) for a single molecule. Molar mass is in grams per mole (g/mol) for Avogadro's number of molecules.
Where do you find atomic weights for calculation?
Atomic weights are listed on the periodic table under each element symbol. Common values include H = 1.008, C = 12.011, N = 14.007, O = 15.999, and S = 32.065.