# What is the molar mass?

Computes the molar mass (molecular weight) of a chemical formula in g/mol from the IUPAC standard atomic weights, with each element’s share by mass, and converts grams to moles and moles to grams.

- Page: https://www.acalculator.org/chemistry/molar-mass-calculator
- JSON spec: https://www.acalculator.org/chemistry/molar-mass-calculator.json
- Version: 64d3ffc23a66

## Default answer

Example with the default inputs (Chemical formula C6H12O6): The molar mass of C₆H₁₂O₆ is 180.156 g/mol.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Chemical formula | The chemical formula, such as H2O, Ca(OH)2 or CuSO4·5H2O. Element symbols start with a capital letter. |
| m | Mass of sample | A mass of the substance to convert to moles. |
| mol | Amount (mol) | An amount of the substance in moles to convert to grams. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| molarMass | Molar mass | The sum of each element’s standard atomic weight × its number of atoms, in grams per mole. |
| formulaText | Formula | The formula as read, with subscripts. |
| composition | Composition by mass | For each element: atoms × atomic weight = its part of the molar mass, and its share by mass. |
| atoms | Atoms in the formula | The total number of atoms in one formula unit. |
| molesOut | Moles in the sample | Mass of sample in grams ÷ molar mass. |
| grams | Mass of the amount | Amount in moles × molar mass, in grams. |

## Method

molar mass = Σ (atoms of each element × its standard atomic weight), in g/mol; moles = grams ÷ molar mass.

## Assumptions

- Atomic weights are the CIAAW abridged standard atomic weights (2024), the values printed on most periodic tables: for example H 1.0080, C 12.011, O 15.999, Na 22.990, Cl 35.45.
- Elements with no standard atomic weight (technetium, promethium, and polonium onward except thorium, protactinium and uranium) give no answer.
- A charge does not change the molar mass here: the mass of the electrons gained or lost is left out. A phase label such as (aq) is ignored.
- A whole number typed before the formula multiplies it (2H2O is two water molecules, 36.030 g/mol).

## Worked examples

1. f = H2O gives molarMass = 18.015, composition = H: 2 × 1.008 = 2.016 g/mol (11.191%); O: 1 × 15.999 = 15.999 g/mol (88.809%), atoms = 3. Source: CIAAW, Abridged Standard Atomic Weights (H 1.0080, O 15.999), https://ciaaw.org/abridged-atomic-weights.htm.
2. f = C6H12O6, m = 0.09 gives molarMass = 180.156, formulaText = C₆H₁₂O₆, molesOut = 0.499567, atoms = 24. Source: CIAAW, Abridged Standard Atomic Weights (C 12.011, H 1.0080, O 15.999), https://ciaaw.org/abridged-atomic-weights.htm.
3. f = NaCl, mol = 2 gives molarMass = 58.44, grams = 116.88. Source: CIAAW, Abridged Standard Atomic Weights (Na 22.990, Cl 35.45), https://ciaaw.org/abridged-atomic-weights.htm.
4. f = CuSO4·5H2O gives molarMass = 249.677, formulaText = CuSO₄·5H₂O, atoms = 21. Source: 63.546 + 32.06 + 9 × 15.999 + 10 × 1.0080 = 249.677 (weights from CIAAW, https://ciaaw.org/abridged-atomic-weights.htm).
5. f = Ca(OH)2 gives molarMass = 74.092, formulaText = Ca(OH)₂, atoms = 5. Source: 40.078 + 2 × 15.999 + 2 × 1.0080 = 74.092 (CIAAW, https://ciaaw.org/abridged-atomic-weights.htm).
6. f = K4[Fe(CN)6] gives molarMass = 368.345, atoms = 17. Source: 4 × 39.098 + 55.845 + 6 × 12.011 + 6 × 14.007 = 368.345 (CIAAW, https://ciaaw.org/abridged-atomic-weights.htm).

## FAQ

### How do I calculate molar mass?

Multiply the atomic weight of each element by the number of its atoms in the formula and add the results. For water, H2O: 2 × 1.0080 + 1 × 15.999 = 18.015 g/mol.

### What is the difference between molar mass and molecular weight?

They are the same number with different units. Molar mass is the mass of one mole in grams per mole (g/mol); molecular weight (relative molecular mass) has no unit. Glucose has a molar mass of 180.156 g/mol and a molecular weight of 180.156.

### How do I convert grams to moles?

Divide the mass in grams by the molar mass. 90 g of glucose is 90 ÷ 180.156 = 0.4996 mol. To go the other way, multiply moles by the molar mass: 2 mol of NaCl is 2 × 58.44 = 116.88 g.

### How do I write brackets, hydrates and charges?

Type brackets as in Ca(OH)2 or K4[Fe(CN)6]. For a hydrate, put a dot or a star before the water: CuSO4·5H2O or CuSO4*5H2O. A charge goes at the end after a caret, as in SO4^2-; it does not change the molar mass here.

### Which atomic weights does the calculator use?

The abridged standard atomic weights published by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), 2024 table, the values most periodic tables print. The full table is below.

### Why is there no answer for technetium or plutonium?

Elements with no stable isotopes, such as technetium, promethium and most elements from polonium onward, have no standard atomic weight, because their atomic mass depends on the sample. Thorium, protactinium and uranium do have one.

### Why does my textbook give a slightly different molar mass?

Some books round atomic weights differently, for example H as 1.01 or Cl as 35.5, or use older tables. The small differences add up in large molecules. This calculator uses the current CIAAW abridged values exactly.

## Sources

- IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), Abridged Standard Atomic Weights (2024 table). https://ciaaw.org/abridged-atomic-weights.htm
- Prohaska, T., and others (2022). Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure and Applied Chemistry 94(5), 573–600. https://doi.org/10.1515/pac-2019-0603
- OpenStax, Chemistry 2e, §3.1 Formula Mass and the Mole Concept (molar mass as the sum of atomic masses; grams to moles). https://openstax.org/books/chemistry-2e/pages/3-1-formula-mass-and-the-mole-concept
