Skip to content
Dilawar Hussain

Molar mass calculator

Read a chemical formula to find its molar mass, then convert between mass, moles, and molar mass with the units you actually measured.

Browser compute / no account / no upload

Molar mass from a formula

Enter an element or compound formula. Parentheses, brackets, and hydrate dots are supported, so CuSO4·5H2O and Ca(OH)2 are read as written.

Examples: H2O, H2SO4, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O

Convert between mass, moles, and molar mass

Leave out the value you want to find. The calculator uses n = m / M and its rearrangements.

Method

  • The formula mass is the sum of each element count multiplied by its standard atomic weight. For a hydrate such as CuSO4·5H2O, the five water units are included in the total.
  • The converter uses n = m / M. Mass is normalized to grams and molar mass to grams per mole before the division, so kilogram and milligram inputs are handled consistently.
  • The result is a stoichiometric molar mass. It does not correct for reagent purity, isotopic labeling, or the activity of a real solution.

Reference: IUPAC CIAAW: Standard Atomic Weights

Molar mass is the bridge between a mass you can weigh and a number of particles you can count. This calculator reads a formula, adds the standard atomic weights of every element in it, and reports both the total and each element's contribution. A second panel converts between mass, moles, and molar mass when you already have two of the three values.

What molar mass measures

One mole contains $6.02214076 \times 10^{23}$ elementary entities, the fixed value of the Avogadro constant. The molar mass $M$ is the mass of that many formula units, expressed in grams per mole. For a compound, it is the sum of the atomic weights of the atoms in the formula, each multiplied by its subscript:
Here $n_i$ is the number of atoms of element $i$ and $A_i$ is its standard atomic weight. The standard atomic weight is a weighted average over the natural isotopic abundance, which is why chlorine is listed as 35.45 g/mol rather than the mass of a single chlorine atom.

How to read a formula

  • An element symbol starts with a capital letter. <strong>Co</strong> is cobalt, while <strong>CO</strong> is one carbon and one oxygen.
  • A subscript counts the atoms immediately before it. In H2SO4, hydrogen has a count of 2 and oxygen has a count of 4.
  • Parentheses and brackets multiply everything inside them. Ca(OH)2 contains one calcium, two oxygen, and two hydrogen atoms.
  • A middle dot separates a hydrate from its water of crystallization. CuSO4·5H2O adds five H2O units, which is ten hydrogen atoms and five oxygen atoms.

Worked example: sulfuric acid

Example 1

Molar mass from a formula

Problem

Find the molar mass of sulfuric acid, H2SO4, using standard atomic weights.

Solution

  1. Count the atoms: 2 H, 1 S, and 4 O.

  2. Multiply each count by the atomic weight: .

  3. Add the contributions: .

Answer

98.07 g/mol

Source: Atomic weights from IUPAC CIAAW.
The element table in the calculator shows the same arithmetic. Hydrogen contributes about 2.06 percent of the mass, sulfur about 32.69 percent, and oxygen about 65.25 percent. Those shares are useful when a problem asks for the mass of one element in a sample.

Worked example: a hydrated salt

Example 2

Including water of crystallization

Problem

A procedure calls for 0.100 mol of copper(II) sulfate pentahydrate. What mass should be weighed?

Solution

  1. Find the molar mass of the anhydrous salt: g/mol.

  2. Add five water units: g/mol.

  3. Add the two parts: g/mol.

  4. Multiply by the requested amount: g.

Answer

24.97 g of CuSO4·5H2O

Source: Atomic weights from IUPAC CIAAW.

Converting between mass and moles

The three forms of the amount relationship are rearrangements of one equation. Divide a mass by a molar mass to get moles, multiply moles by molar mass to get mass, and divide mass by moles to recover the molar mass of an unknown sample.

Example 3

Mass to moles

Problem

How many moles are in 5.00 g of sodium chloride?

Solution

  1. The molar mass of NaCl is g/mol.

  2. Divide the mass by the molar mass: .

Answer

0.0856 mol NaCl

Source: Atomic weights from IUPAC CIAAW.
Keep the unit attached to the number while you work. Grams divided by grams per mole leaves moles, which is the check that catches an inverted conversion. The calculator performs the same dimensional check internally and reports grams, moles, and molar mass together so you can compare them with your notebook.

Reference values

Molar masses calculated from standard atomic weights. Values are rounded to two decimal places.
CompoundFormulaMolar mass (g/mol)
WaterH2O18.02
Sodium chlorideNaCl58.44
Hydrochloric acidHCl36.46
Sodium hydroxideNaOH40.00
Sulfuric acidH2SO498.07
GlucoseC6H12O6180.16
SucroseC12H22O11342.30
Calcium carbonateCaCO3100.09
Sodium carbonateNa2CO3105.99
Potassium permanganateKMnO4158.03
Silver nitrateAgNO3169.87
AspirinC9H8O4180.16

Common mistakes

  • Adding atomic numbers instead of atomic weights. Sodium is element 11 but its molar mass is 22.99 g/mol.
  • Dropping the water from a hydrate. The difference for CuSO4·5H2O is 90.08 g/mol, more than a third of the total.
  • Reading CO as cobalt. Capitalization changes the element, so write Co for cobalt and CO for carbon monoxide.
  • Rounding each element before adding. Keep full precision until the final answer, then round to the significant figures your data supports.
  • Treating an ionic formula as a molecule. NaCl is a formula unit in a lattice, but its molar mass is still calculated the same way.

Limits and assumptions

The values use standard atomic weights for naturally occurring element mixtures. An isotopically labeled compound, such as glucose enriched in carbon-13, has a different molar mass and needs the isotopic masses rather than the standard average. For elements with no stable isotope, the table uses the mass number of a representative isotope, so those values are approximate for stoichiometry.
The formula parser accepts element symbols, integer subscripts, parentheses, square brackets, and hydrate dots. It does not read charges, oxidation states, stereochemistry, variable composition such as Fe0.95O, or a leading coefficient written without a hydrate dot. It also does not correct for reagent purity or for the activity of ions in a concentrated solution.

Glossary

Molar mass
The mass of one mole of a substance, in grams per mole. It is numerically equal to the formula mass expressed in unified atomic mass units.
Mole
The SI unit for amount of substance. One mole contains the Avogadro number of elementary entities.
Formula unit
The smallest repeating unit described by an ionic or covalent formula. For NaCl, one formula unit contains one sodium ion and one chloride ion.
Hydrate
A solid that includes a fixed number of water molecules per formula unit, written after a middle dot such as CuSO4·5H2O.
Standard atomic weight
The recommended average atomic mass of an element in its natural isotopic abundance, published by IUPAC CIAAW.

Key takeaways

  • Molar mass is the sum of element counts times standard atomic weights, including any water of crystallization.
  • Use n = m / M to move between a weighed mass and an amount in moles, and keep the units attached.
  • Hydrates, capitalization, and early rounding are the mistakes that change answers most often.
  • The parser reads formulas, not reaction equations or variable-composition materials.