Skip to content

Molar Mass Calculator - Find Molecular Weight

Enter a chemical formula to calculate its molar mass in grams per mole. Includes an element breakdown, mass percentages, and support for nested parentheses.

Molar Mass Calculator

How to Use

  • Enter a chemical formula in the input field above
  • Use uppercase for the first letter of element symbols (e.g., 'H' for hydrogen, 'Na' for sodium)
  • Use parentheses for grouped elements, e.g., Ca(OH)2

Examples

Loading calculator...
📚

Documentation

A molar mass calculator finds the mass of one mole of a chemical compound from its chemical formula. The result is given in grams per mole (g/mol), a value also called molecular weight.

What Is Molar Mass?

Molar mass is the mass of one mole of a substance. A mole is a fixed number of particles: 6.02214076 × 10²³, known as Avogadro's number. That number is exact. It was fixed by definition in the 2019 update to the International System of Units (SI).

Chemists use moles because atoms and molecules are far too small to weigh one at a time. A mole turns a countable number of particles into a mass that a lab balance can measure.

Molar Mass Formula

The molar mass of a compound is the sum of the atomic masses of every atom in its formula:

M=i(Ai×ni)M = \sum_{i} (A_i \times n_i)

  • MM is the molar mass of the compound, in g/mol
  • AiA_i is the atomic mass of element ii, in g/mol
  • nin_i is how many atoms of element ii appear in the formula

Atomic masses come from the periodic table. Each one is a weighted average of an element's naturally occurring isotopes, based on standard values published by the International Union of Pure and Applied Chemistry (IUPAC).

How to Calculate Molar Mass: Step by Step

Example 1: Water (H₂O)

  1. List each element and how many atoms of it appear: 2 hydrogen (H), 1 oxygen (O).
  2. Multiply each atomic mass by its atom count: H = 1.008 × 2 = 2.016 g/mol; O = 15.999 × 1 = 15.999 g/mol.
  3. Add the results: 2.016 + 15.999 = 18.015 g/mol.

The molar mass of water is 18.015 g/mol.

Example 2: Calcium Hydroxide (Ca(OH)₂)

Parentheses mean everything inside is multiplied by the number written after the closing bracket. In Ca(OH)₂, the group (OH) appears twice.

  1. Atoms: 1 Ca, 2 O, 2 H.
  2. Multiply: Ca = 40.078 × 1 = 40.078; O = 15.999 × 2 = 31.998; H = 1.008 × 2 = 2.016.
  3. Add: 40.078 + 31.998 + 2.016 = 74.092 g/mol.

Ca(OH)₂ and CaOH₂ are not the same formula. Without parentheses, CaOH₂ would mean only one oxygen atom instead of two, a different and incorrect compound.

How to Use This Calculator

  1. Type a chemical formula into the input box, such as H2O, NaCl, or Ca(OH)2.
  2. Use standard capitalization. The first letter of an element symbol is uppercase, and any second letter is lowercase. "Na" is sodium; "na" is not read as an element.
  3. Use parentheses, square brackets, or braces to group atoms that repeat, then add a number after the closing bracket.
  4. Read the total molar mass, the element breakdown table, and the mass percentage of each element.

The calculator flags three kinds of problems: a symbol it does not recognize, a character it cannot read, and parentheses that never close. Capitalization matters more than it might seem. Typing "Co2" instead of "CO2" does not raise an error, because "Co" is itself a valid element symbol, cobalt. The calculator reads "Co2" as two cobalt atoms, not carbon dioxide.

Why Molar Mass Matters

Molar mass connects the mass measured on a balance to the number of moles in that mass. Moles, not grams, are the unit chemists use to balance chemical equations and calculate reaction yields.

A common lab task is preparing a solution of known concentration. To make 500 mL of a 0.1 mol/L solution of sodium chloride (NaCl, molar mass 58.44 g/mol):

mass = concentration × volume × molar mass mass = 0.1 mol/L × 0.5 L × 58.44 g/mol = 2.922 g

Weighing out 2.922 g of NaCl and dissolving it in 500 mL of water gives the target concentration. An error in the molar mass carries straight through to an error in the final concentration.

Frequently Asked Questions

How is molar mass different from molecular weight?

They describe the same quantity in different units. Molar mass is expressed in grams per mole (g/mol). Molecular weight is often expressed in atomic mass units (amu) or daltons (Da). The number is the same either way: water is 18.015 g/mol, or 18.015 Da.

Why does the calculator say "unknown element"?

This means it found a symbol that is not on the periodic table, such as "Xx", or a symbol with the wrong capitalization. Only the first letter of an element symbol is ever uppercase.

Can this calculator handle hydrates such as CuSO₄·5H₂O?

Not directly. The calculator does not read the raised dot used in hydrate formulas, so entering "CuSO4.5H2O" returns an error. Calculate the two parts separately instead. Anhydrous CuSO₄ is 159.602 g/mol. Five water molecules are 5 × 18.015 = 90.075 g/mol. The total for copper sulfate pentahydrate is 249.677 g/mol.

How precise are the results?

The calculator reports molar mass to four decimal places, for example 18.0150 g/mol for water. That is more precision than most lab work needs. A standard analytical balance is accurate to about ±0.001 g, which is usually the larger source of error.

Does the calculator use IUPAC atomic weights?

Yes. It uses standard atomic weights published by IUPAC, the body that sets reference values for atomic masses worldwide. For elements whose isotope ratios vary by geological source, such as lithium, IUPAC publishes a range, and calculators use a single conventional value from within that range.

What do parentheses and brackets do in a formula?

They group atoms that repeat as a unit. In Ca(OH)₂, the group (OH) is multiplied by 2, adding 2 oxygen and 2 hydrogen atoms alongside 1 calcium atom. Square brackets [ ] and braces { } work the same way and can be nested inside parentheses, which is useful for complex formulas such as coordination compounds.