Molar Mass Calculator

The molar mass of a compound equals the sum of the atomic masses of every atom in the formula, expressed in grams per mole (g/mol). Enter any chemical formula to see the total molar mass and a breakdown showing each element's count, atomic mass, and contribution to the total.

Quick Answer

Water (H2O) has a molar mass of 18.015 g/mol, calculated as (2 x 1.008) + (1 x 15.999). Glucose (C6H12O6) has a molar mass of 180.156 g/mol.

Use standard chemical notation: uppercase for first letter, lowercase for second (e.g., Na, Cl, Fe). Parentheses are supported.

Common Examples

Input Result
H2O 18.015 g/mol
NaCl 58.443 g/mol
C6H12O6 180.156 g/mol
Ca(OH)2 74.093 g/mol
H2SO4 98.079 g/mol

How It Works

The molar mass of a chemical compound is calculated by summing the atomic masses of all atoms present in the formula:

M = Σ (atomic mass of element x number of atoms of that element)

Atomic masses come from the periodic table and are measured in atomic mass units (amu), which correspond directly to grams per mole (g/mol).

For simple formulas, multiply each element’s atomic mass by its subscript and add the results. For formulas with parentheses, multiply the entire group inside the parentheses by the subscript that follows.

Common Atomic Masses (g/mol):

  • Hydrogen (H): 1.008
  • Carbon (C): 12.011
  • Nitrogen (N): 14.007
  • Oxygen (O): 15.999
  • Sodium (Na): 22.990
  • Chlorine (Cl): 35.453
  • Calcium (Ca): 40.078
  • Iron (Fe): 55.845

Worked Example

For calcium hydroxide, Ca(OH)2: Calcium contributes 1 x 40.078 = 40.078. The (OH) group appears twice, so oxygen contributes 2 x 15.999 = 31.998 and hydrogen contributes 2 x 1.008 = 2.016. Total molar mass = 40.078 + 31.998 + 2.016 = 74.092 g/mol. For sulfuric acid (H2SO4): H contributes 2 x 1.008 = 2.016, S contributes 1 x 32.065 = 32.065, and O contributes 4 x 15.999 = 63.996. Total = 2.016 + 32.065 + 63.996 = 98.077 g/mol.

Related Calculators

Frequently Asked Questions

What is molar mass?
Molar mass is the mass of one mole (6.022 x 10^23 particles) of a substance, expressed in grams per mole (g/mol). It numerically equals the molecular weight or formula weight of the compound. For elements, the molar mass equals the atomic mass listed on the periodic table.
What chemical formulas does this calculator support?
This calculator supports standard chemical formulas with single-letter elements (H, C, N, O), two-letter elements (Na, Cl, Ca, Fe), subscript numbers, and parenthesized groups like Ca(OH)2 or Mg(NO3)2. Enter the formula using standard notation with uppercase first letters and lowercase second letters.
What is the difference between molar mass and molecular weight?
Molar mass and molecular weight are numerically identical but differ in units. Molar mass is expressed in grams per mole (g/mol), while molecular weight (or molecular mass) is expressed in atomic mass units (amu or Da). For practical purposes, the numbers are the same.
How do I handle hydrates like CuSO4 dot 5H2O?
This calculator does not parse the dot notation used for hydrates. Instead, calculate the molar mass of CuSO4 and 5 x H2O separately, then add them together. CuSO4 = 159.609 g/mol, and 5 x H2O = 5 x 18.015 = 90.075 g/mol, for a total of 249.684 g/mol.
Why do atomic masses have decimal values?
Atomic masses are weighted averages of all naturally occurring isotopes of an element. For example, chlorine has two stable isotopes (Cl-35 and Cl-37), and the weighted average based on their natural abundance gives an atomic mass of 35.453. These standard values are established by IUPAC.