Free molecular weight calculator
Calculate the molecular weight of any compound from its chemical formula — enter a formula like H₂O or C₆H₁₂O₆ to see the molar mass in g/mol, updated live, as you type.
On this page10 sections
Molecular weight = sum of atomic masses × counts. Supports common elements.
Results are estimates. Consult a professional.
How the molecular weight calculator works
Molecular weight (also called molar mass or formula weight) is the sum of the atomic weights of all atoms in a molecule's chemical formula, weighted by how many times each atom appears. Atomic weights come from the IUPAC periodic table — they are the relative atomic masses averaged over the natural isotopic distribution of each element. The result is expressed in grams per mole (g/mol), equal numerically to the unified atomic mass unit (u) per molecule.
Worked example: water (H₂O) and carbon dioxide (CO₂)
Calculate the molecular weight of water (H₂O) and carbon dioxide (CO₂) — two of the most common molecules in chemistry and biology.
Atomic weights of common elements
These eight elements account for the vast majority of molecules encountered in organic chemistry, biochemistry, and introductory inorganic chemistry.
| Element | Symbol | Atomic number | Atomic weight (g/mol) |
|---|---|---|---|
| Hydrogen | H | 1 | 1.008 |
| Carbon | C | 6 | 12.011 |
| Nitrogen | N | 7 | 14.007 |
| Oxygen | O | 8 | 15.999 |
| Sodium | Na | 11 | 22.990 |
| Chlorine | Cl | 17 | 35.453 |
| Calcium | Ca | 20 | 40.078 |
| Iron | Fe | 26 | 55.845 |
| Phosphorus | P | 15 | 30.974 |
| Sulfur | S | 16 | 32.06 |
Source: IUPAC 2021 standard atomic weights (CIAAW). Values rounded to 3 decimal places.
Tips for molecular weight calculations
Molecular weight is the gateway calculation for stoichiometry, solution preparation, and spectroscopy. Accurate results depend on reading the formula correctly.
- Count subscripts carefully — In Ca(OH)₂, the subscript 2 applies to the whole group (OH): 1 Ca + 2 O + 2 H → 40.078 + 2(15.999) + 2(1.008) = 74.093 g/mol.
- Use IUPAC atomic weights, not rounded integers — Rounded weights (e.g., H=1, O=16) introduce cumulative error in large molecules. Use at least 3 decimal places for accurate molar mass.
- Distinguish molecular weight from molecular formula weight — Molecular weight refers to individual molecules (in u); molar mass is the same number in g/mol. For most lab purposes they are used interchangeably.
- Water of crystallisation — Hydrated salts include water molecules in the crystal lattice, written as a dot: CuSO₄·5H₂O. Include 5 × 18.015 = 90.075 g/mol for the five water molecules.
- Online databases for complex molecules — For proteins, polymers, or unfamiliar organic structures, look up the molecular formula in PubChem or ChemSpider before computing MW by hand.
Accuracy and limitations
The calculation is arithmetically exact for a given set of atomic weights. The underlying atomic weights themselves carry small uncertainties due to natural isotopic variation between geographic sources — for example, the atomic weight of lead (Pb) varies noticeably depending on geological origin. For natural samples, IUPAC publishes conventional atomic weights that cover the typical terrestrial range. For isotopically pure or enriched samples, use the precise mass of the specific isotope rather than the standard atomic weight.
Key terms
About this calculator
Part of our math calculators suite — explore all calculators.