Chemistry Tools

Molecular Weight Calculator

Enter a chemical formula and instantly calculate the molar mass. Supports parentheses and all common elements.

Molar Mass

18.015 g/mol

H22.016
O15.999

Use element symbols with optional counts (e.g. H2O means 2 hydrogen, 1 oxygen). Parentheses with multipliers are supported: Ca(OH)2 means 1 calcium, 2 oxygen, 2 hydrogen. Unknown elements will show an error.

What is the Molecular Weight Calculator?

Molecular weight, also called molar mass, is the sum of atomic weights of all atoms in a molecule, measured in grams per mole (g/mol). For example, water (H₂O) has a molar mass of 18.015 g/mol: hydrogen (1.008 × 2) plus oxygen (15.999). Understanding molecular weight is essential for stoichiometry, chemical reactions, and lab calculations.

How it works

Enter a chemical formula using element symbols and numbers. The calculator instantly displays the total molar mass, shows a detailed element breakdown with individual contributions, and flags any unknown elements. Supports parentheses with multipliers like Ca(OH)₂.

Molar Mass = Σ (Atomic Weight × Count) for each element. For Ca(OH)₂: (40.078 × 1) + (15.999 × 2) + (1.008 × 2) = 74.093 g/mol.

Molar mass is the weighted sum of each element's atomic weight multiplied by how many atoms of that element are present. For molecules with parentheses, expand first: Ca(OH)₂ means 1 Ca, 2 O, and 2 H. The calculator handles this parsing automatically.

Examples

InputResultNotes
H2O18.015 g/mol; H: 2.016, O: 15.999Water: 2 hydrogen (1.008 each) + 1 oxygen (15.999)
C6H12O6180.156 g/mol; C: 72.066, H: 12.096, O: 95.994Glucose: 6 carbon + 12 hydrogen + 6 oxygen
Ca(OH)274.093 g/mol; Ca: 40.078, O: 31.998, H: 2.016Calcium hydroxide: 1 Ca + (2 OH groups) = 1 Ca + 2 O + 2 H

How to use the Molecular Weight Calculator

  1. Enter the chemical formula (e.g. NaCl, H2SO4, Fe2O3)
  2. Use correct element symbols (capital first letter, lowercase second if needed)
  3. Add numbers after elements for atom counts (e.g. O2, not O 2)
  4. Use parentheses for groups: Ca(OH)2 means calcium plus 2 hydroxide groups
  5. View the result: total molar mass and element breakdown
  6. Recalculate with different formulas instantly

Benefits

  • Instant calculation — compute molar mass of any formula in milliseconds
  • Element breakdown — see exactly how much each element contributes to the total
  • Supports parentheses — handle complex molecules like Mg(NO3)2 correctly
  • Comprehensive element table — covers all common elements from hydrogen to gold
  • Error detection — immediately shows if an element is unknown or formula is malformed

Tips & common mistakes

Common mistakes

  • Forgetting parentheses — Al2(SO4)3 is not the same as Al2SO43; parentheses group atoms
  • Incorrect element symbols — oxygen is O (not O), carbon is C (not CA); case matters
  • Misplacing numbers — H2O (two hydrogen, one oxygen), not H 2 O or H2 O; no spaces
  • Using subscripts instead of numbers — the calculator expects plain numbers, not subscripts or superscripts

Tips

  • For complex molecules, break them down: aspirin (C9H8O4) = 9 carbons + 8 hydrogens + 4 oxygens
  • Always double-check element symbols before submitting; even one wrong letter changes the result
  • Parentheses with multipliers: (NH4)2SO4 means two ammonium ions plus one sulfate ion
  • For hydrated compounds like CuSO4·5H2O, calculate each part separately and add (CuSO4 + 5×H2O)

Frequently asked questions

What is the difference between molecular weight and molar mass?

Molecular weight and molar mass are numerically identical but conceptually different. Molecular weight is the mass of one molecule in atomic mass units (amu). Molar mass is the mass of one mole (6.022 × 10²³ molecules) in grams per mole (g/mol). In practice, they describe the same values.

Why do I get an error for a formula I think is correct?

Check that element symbols are capitalized correctly (H for hydrogen, not h), and that counts are plain numbers directly after the element (H2O, not H 2 O). Parentheses must match: Ca(OH)2 is correct, but Ca(OH2 is not.

How do I enter hydrated compounds like CuSO4·5H2O?

Enter the main compound and water separately: find CuSO4 (159.609 g/mol) and 5×H2O (5 × 18.015 = 90.075 g/mol), then add them (249.684 g/mol). Or search for the full formula in a reference table.

What if a molecule has parentheses with multiple levels?

Most organic molecules do not nest parentheses deeply. If a formula has complex nesting like Ca((OH)2)3, expand from the inside out carefully, or break it into sub-components and add the totals.

Can I use this calculator for isotopes?

No. This calculator uses standard atomic weights (average across natural isotopes). For specific isotopes, consult isotope tables or a specialized physics calculator.

Why does my formula give a different result elsewhere?

Atomic weights vary slightly between sources (rounding and precision differ). This calculator uses IUPAC standard atomic weights. Small differences (less than 0.05 g/mol) are normal.

Related tools

FreeToolz Editorial Team · Last reviewed July 2026

Reviewed for accuracy. Results are estimates for general information and are not professional (medical, financial or legal) advice.