Molar Mass Calculator

Every Chemical Formula Has a Weight Hidden in Its Subscripts

Molar mass is the bridge between the atomic world and the lab bench: it converts a formula written on paper into a number of grams you can actually weigh out. Get it wrong by even a rounding error on a multi-gram synthesis and a titration or a reaction yield calculation downstream will be off. This calculator parses a formula — including nested parentheses like Ca(OH)2 — and sums the contribution of every atom using IUPAC standard atomic weights.

The Formula

Molar Mass = Σ (Atomic Mass of Element × Number of Atoms of that Element)

For a compound such as glucose (C6H12O6), that means summing 6 carbons, 12 hydrogens, and 6 oxygens, each multiplied by its own standard atomic weight, then adding the subtotals together.

Where This Calculation Matters

  • Weighing out a solution — converting a target molarity into grams to measure on a balance requires the molar mass of the solute first.
  • Stoichiometry — every mole-to-gram or gram-to-mole conversion in a reaction depends on this number for each species involved.
  • Verifying a compound's identity — comparing a measured molar mass against the calculated value for a proposed formula is a standard check in synthesis work.
  • Dosing and formulation — pharmaceutical and nutritional calculations that start from a molar quantity need to be converted to mass for practical measurement.

Molar Masses of Common Compounds

Calculated using standard atomic weights (g/mol)
CompoundFormulaMolar Mass (g/mol)
WaterH2O18.015
Sodium chlorideNaCl58.440
Carbon dioxideCO244.009
GlucoseC6H12O6180.156
Calcium carbonateCaCO3100.086
Sulfuric acidH2SO498.072
Sodium hydroxideNaOH39.997
SucroseC12H22O11342.297

Values are rounded to three decimal places using the IUPAC conventional atomic weights this calculator applies internally.

How to Use This Calculator

  1. Type the chemical formula into the Chemical Formula field, using standard capitalization (e.g. Ca(OH)2, not ca(oh)2).
  2. Include subscripts as plain numbers immediately after each element symbol, and use parentheses for grouped fragments that repeat.
  3. Select Calculate to get the total molar mass along with a line-by-line breakdown of each element's contribution.

Related Calculations

Once you have a molar mass, use the Moles Calculator to convert a sample's mass into moles, or the Molarity Calculator to work out solution concentration from that mass.