Molecular Weight Calculator

Free Molecular Weight Calculator - Calculate the molecular weight of compounds.

Results

Calculated
Result
—

What Molecular Weight Is and When to Use It

Molecular weight (also called molar mass) is the mass of one mole of a compound, expressed in grams per mole (g/mol). It is calculated by adding up the atomic masses of every atom in the compound's chemical formula, each multiplied by how many times that atom appears. Atomic masses are weighted averages of an element's naturally occurring isotopes, which is why they're rarely round numbers — carbon is 12.011, not exactly 12, because a small fraction of natural carbon is the heavier carbon-13 isotope.

You need molecular weight any time you convert between mass and moles: preparing a solution of known molarity, scaling up a reaction from a lab-scale recipe, converting a recipe's grams into moles for stoichiometry, or checking a compound's purity by comparing a measured mass to the theoretical yield. This calculator parses a standard chemical formula, including parenthesized groups like Ca(OH)2, and sums the atomic contributions of every element automatically.

How the Calculation Works

For a formula, the molecular weight is:

Molecular weight = Σ (atomic mass of element × number of atoms of that element)

where the sum runs over every distinct element in the formula. Subscripts after an element symbol multiply that element's atom count; a number after a closing parenthesis multiplies every element inside that group. No subscript means one atom (or one copy of the group).

Worked Example: Glucose (C6H12O6)

Using the calculator's default formula, glucose, C6H12O6:

  • Carbon: 6 atoms × 12.011 g/mol = 72.066 g/mol
  • Hydrogen: 12 atoms × 1.008 g/mol = 12.096 g/mol
  • Oxygen: 6 atoms × 15.999 g/mol = 95.994 g/mol

Adding the three subtotals: 72.066 + 12.096 + 95.994 = 180.156 g/mol, which matches both the calculator's output and glucose's accepted molar mass (commonly rounded to 180.16 g/mol). For a compound with a parenthesized group, calcium hydroxide Ca(OH)2 works the same way: calcium contributes 40.078 g/mol, and the (OH)2 group contributes 2 × (15.999 + 1.008) = 34.014 g/mol, for a total of 74.092 g/mol.

Common Mistakes / How to Interpret the Result

  • Case-sensitive element symbols. Chemical symbols are always one capital letter optionally followed by one lowercase letter — "Co" is cobalt, but "CO" is carbon monoxide (one carbon, one oxygen). Typing the wrong case changes the entire result.
  • Forgetting subscripts multiply, not add. H2O means 2 hydrogen atoms and 1 oxygen atom in a single molecule, not "hydrogen plus 2 oxygens" — always read a subscript as "this many atoms of the element immediately before it."
  • Missing parentheses for repeated groups. A compound like ammonium sulfate, (NH4)2SO4, needs the parentheses to show that the entire NH4 group is doubled, not just the hydrogen or nitrogen alone.
  • Confusing molecular weight with formula weight for ionic compounds. Ionic solids like NaCl don't exist as discrete molecules, but chemists still compute a "formula weight" the same way, treating the formula unit as if it were a molecule — the arithmetic is identical either way.

Frequently Asked Questions

How do I enter a formula with a group in parentheses, like Ca(OH)2?
Type it exactly as written in chemistry notation: Ca(OH)2. The calculator multiplies everything inside the parentheses — here, one oxygen and one hydrogen — by the number that follows the closing parenthesis, so it correctly counts 2 oxygens and 2 hydrogens along with 1 calcium.
Why does the calculator reject formulas with lowercase element symbols like "na" or "cl"?
Element symbols are case-sensitive by chemistry convention: the first letter is always capitalized, and an optional second letter is always lowercase (Na for sodium, Cl for chlorine). Typing "NA" or "cl" doesn't match any known symbol, so the parser can't identify the element and reports an error rather than guessing.
Does this calculator account for isotopes or only standard atomic weights?
It uses standard atomic weights — the natural terrestrial average for each element, as used in nearly all general chemistry contexts. It does not calculate isotope-specific masses (for example, deuterium versus ordinary hydrogen), which require specifying the isotope separately from the standard formula notation.
Can I use this for hydrates, like CuSO4·5H2O?
Not directly — the calculator's parser reads standard bracket-and-subscript notation but doesn't recognize the middle dot used for hydrates. To work around it, calculate the anhydrous formula (CuSO4) and the water portion (H2O, multiplied by 5) separately, then add the two molecular weights together.

Reference: Molecular Weights of Common Compounds

These verified values are useful for a quick sanity check against whatever the calculator returns for a related formula:

  • Water, H2O: 18.015 g/mol
  • Table salt, NaCl: 58.44 g/mol
  • Carbon dioxide, CO2: 44.01 g/mol
  • Sodium bicarbonate (baking soda), NaHCO3: 84.01 g/mol
  • Ethanol, C2H6O: 46.07 g/mol
  • Ammonia, NH3: 17.03 g/mol
  • Sulfuric acid, H2SO4: 98.07 g/mol
  • Glucose, C6H12O6: 180.16 g/mol

If the calculator's output for one of these formulas differs from the values above by more than rounding in the last digit, double-check that you typed the formula with correct capitalization and subscripts before trusting the result for a less familiar compound.