CalcSeed

How Do You Calculate the Molecular Weight of a Compound?

Molecular weight is the sum of every atom’s atomic weight in a molecule: multiply each element’s count by its atomic weight and add. Water gives 2 × 1.008 + 1 × 15.999 = 18.015, and the same three-step method handles any formula from CO₂ to glucose.

A
Quick answer

Molecular weight is the sum of every atom’s atomic weight in a molecule: multiply each element’s count by its atomic weight and add. Water gives 2 × 1.008 + 1 × 15.999 = 18.015, and the same three-step method handles any formula from CO₂ to glucose.

Skip the math — use the calculator Molecular Weight Calculator →

What molecular weight means

Molecular weight (often abbreviated MW) is the mass of one molecule of a compound expressed relative to a standard reference atom. Chemists measure it on a scale where carbon-12 is defined as exactly 12, which makes hydrogen about 1.008 and oxygen about 15.999. Because the scale is relative, molecular weight is technically dimensionless – though in everyday lab practice it is quoted in atomic mass units (u) or paired with the gram as g/mol, which is where the term molar mass takes over. The number itself tells you how heavy one molecule is compared with one-twelfth of a carbon-12 atom, and it is the bridge between counting molecules, which no one can do directly, and weighing samples, which any balance can do.

The calculation itself is simple addition once the formula is known. Take the chemical formula, count how many atoms of each element it contains, multiply each count by that element’s atomic weight, and add all the products. The work is in reading the formula correctly: subscripts multiply, parentheses distribute, and hydrates add whole water molecules. Get the counting right and the arithmetic almost does itself.

The method: sum of atom counts × atomic weights

MW = Σ (number of atoms of element i) × (atomic weight of element i)

Three steps, always the same. First, inventory the elements in the formula and their counts. Second, look up each atomic weight from a current table – the values used here are hydrogen 1.008, carbon 12.011, nitrogen 14.007, and oxygen 15.999. Third, multiply and sum. Rounding convention matters a little: most tables print four decimal places, and retaining all four through the calculation then rounding once at the end keeps results consistent with published values.

Worked example 1: water, H₂O

The formula H₂O contains two hydrogen atoms and one oxygen atom. Multiply: hydrogen contributes 2 × 1.008 = 2.016, and oxygen contributes 1 × 15.999 = 15.999. Add: 2.016 + 15.999 = 18.015. That is the molecular weight of water. It is worth memorizing as a sanity anchor, because it appears everywhere in chemistry problems and laboratory work, from solution preparation to humidity calculations.

Worked example 2: carbon dioxide, CO₂

CO₂ contains one carbon atom and two oxygen atoms. Carbon contributes 1 × 12.011 = 12.011. Oxygen contributes 2 × 15.999 = 31.998. The sum is 12.011 + 31.998 = 44.009. Notice how the single carbon, despite being the “name” element of the compound, contributes under a third of the mass – the two heavy oxygens dominate. That is a common pattern worth internalizing, because it trains an eye for checking answers: in oxides, the oxygen share of the mass is usually large.

Worked example 3: glucose, C₆H₁₂O₆

A larger molecule shows the method scaling cleanly. Glucose, C₆H₁₂O₆, contains 6 carbons, 12 hydrogens, and 6 oxygens. The table below computes each element’s contribution and sums them. The result, 180.156, is the published molecular weight of glucose, and the arithmetic takes four multiplications and two additions.

ElementAtomsAtomic weightContribution
Carbon (C)612.01172.066
Hydrogen (H)121.00812.096
Oxygen (O)615.99995.994
Total (C₆H₁₂O₆)180.156

The same procedure covers parenthesized groups. Calcium hydroxide, Ca(OH)₂, contains one calcium plus two of the entire OH group: 1 × 40.078 + 2 × (15.999 + 1.008) = 40.078 + 34.014 = 74.092. The rule is that a subscript outside parentheses multiplies everything inside. Missing that distribution is the most frequent mistake on polyatomic formulas.

Where the atomic weights come from

Atomic weights are not invented values; they are measured and standardized internationally. The IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) evaluates published measurements and periodically issues the standard atomic weights that appear on every periodic table. Most elements exist as a mixture of isotopes – hydrogen is mostly protium with a trace of deuterium – so the tabulated value is a weighted average across natural abundance, which is why hydrogen is 1.008 rather than exactly 1. Chlorine’s value of 35.45 reflects its roughly 3:1 mixture of chlorine-35 and chlorine-37. For a small set of elements whose isotopic composition varies by source, IUPAC publishes an interval instead of a single number. NIST maintains the atomic reference data that backs these evaluations, and its Chemistry WebBook is a standard lookup for exact masses of specific isotopes.

Molecular weight vs molar mass

The two terms are numerically identical but differ in unit and framing. Molecular weight is the relative mass of one molecule, properly dimensionless and commonly quoted in u (atomic mass units). Molar mass is the mass of one mole of the substance – 6.02214076 × 10²³ entities, Avogadro’s number – and carries units of g/mol. Because the mole is defined so that 12 g of carbon-12 contains exactly one mole of atoms, the molar mass in g/mol equals the molecular weight in u by construction. Water’s molecular weight is 18.015 u and its molar mass is 18.015 g/mol; no conversion factor is needed, just the right unit for the job. In practical chemistry the phrase “molecular weight” is often used loosely for both, which is acceptable as long as the unit makes the intent clear.

Using molecular weight in practice

The everyday payoff is converting between mass and moles: moles = mass ÷ molar mass. Want to know how many moles are in 36.03 g of water? Divide 36.03 by 18.015 to get exactly 2 mol. Working in the other direction, 0.5 mol of glucose weighs 0.5 × 180.156 = 90.078 g. The same number feeds solution chemistry: a 1 M solution of glucose contains 180.156 g dissolved to make one liter, which is exactly what the molarity-calculator automates. Percent composition follows too – the oxygen fraction of water is 15.999 ÷ 18.015 ≈ 88.8 percent, a one-line division once the molecular weight is in hand.

Common mistakes to avoid

  • Misreading subscripts. H₂O has 2 hydrogens, not 1; skipping the subscript turns 18.015 into a wrong 16.999 that is close enough to look plausible.
  • Forgetting to distribute subscripts over parentheses. In Ca(OH)₂, the 2 applies to both O and H. Count 2 oxygens and 2 hydrogens, not 1.
  • Mixing isotope masses with average atomic weights. Average values (1.008 for H) are correct for natural samples; the isotope mass 1.00783 u for protium belongs in mass-spectrometry contexts.
  • Rounding intermediate products. Keep four decimals through the sum, then round; premature rounding shifts the last digits of larger molecules.
  • Confusing molecular weight with formula weight for ionic compounds. NaCl has no discrete molecules; the same summation method applies but is formally called formula weight. The number is computed identically.

When a formula is long or contains repeated groups, let the molecular-weight-calculator parse and sum it, then check one element’s contribution by hand to confirm the parse. For quick conversions between grams and moles once the weight is known, the molar-mass-converter closes the loop. A few minutes of careful counting per compound is far cheaper than a misprepared solution.

Calculators for this project

Frequently asked questions

Is molecular weight the same as molar mass?

Numerically yes, formally no. Molecular weight is the relative mass of one molecule (dimensionless, or in u); molar mass is the mass of one mole in g/mol. The two numbers are equal by definition of the mole, so 18.015 u and 18.015 g/mol describe water in the two framings.

Why is hydrogen 1.008 instead of 1?

Natural hydrogen is mostly protium (1 u) with about 0.0156 percent deuterium (about 2 u). The tabulated atomic weight is the abundance-weighted average, which lands at 1.008. IUPAC’s CIAAW evaluates these averages from worldwide measurements.

How do I handle a formula with a dot, like CuSO₄·5H₂O?

The dot means five whole water molecules are included per formula unit. Compute copper sulfate’s weight, compute water’s 18.015, multiply the water part by 5, and add: 159.609 + 90.075 = 249.684 for copper sulfate pentahydrate.

What if the molecule is huge, like a protein?

The method scales: sum every residue and modification, or add up all atoms directly. For macromolecules chemists usually quote molar mass in kDa (1 kDa = 1000 g/mol). Automated tools or a molecular-weight-calculator are the practical route at that size.

Method and sources

Calculation basis
Last updated: 2026-11-23
Data sources
  • IUPAC CIAAW, Isotopic Compositions of the Elements and standard atomic weights (2021)
  • NIST Chemistry WebBook, SRD 69 (atomic weights and formula masses)
  • OpenStax Chemistry 2e, Chapter 2 and Chapter 3: Atoms, Molecules, and Stoichiometry

Related guides