Molar Mass Calculator

Convert moles to grams and grams to moles straight from a chemical formula. The molar mass is computed for you from sourced NIST/CIAAW atomic weights, with the particle count.

At a glance

Computes
Molar mass from a formula, moles to grams and back, and the particle count.
You supply
A chemical formula, plus an amount in moles or a mass in grams.
Use when
You need grams from moles, or moles from grams, without looking up atomic weights.
Not for
Finding a formula from percent composition or combustion masses. Empirical Formula Calculator
Mode

Supports element symbols, integer subscripts, and nested parentheses or brackets.

Molar mass

Enter a formula

Atomic masses are source-stamped.

NIST Atomic Weights and Isotopic Compositions

Element composition
ElementAtomsAtomic massContributionMass percent
Export

grams = moles * molar mass; moles = grams / molar mass; particles = moles * 6.02214076e23 How?

How this is calculated

The parser expands the formula into element counts and multiplies each count by its bundled standard atomic weight to get the molar mass M. Conversions apply n = m / M and its inverse, and the particle count uses the exact SI Avogadro constant 6.02214076e23 per mole (2019 redefinition). Because M is greater than zero for any parseable formula, grams to moles can never divide by zero. For ionic compounds the gram-per-mole value is a formula mass; the tool does not call a unit such as NaCl a molecule.

Formula: grams = moles * molar mass; moles = grams / molar mass; particles = moles * 6.02214076e23

Percent composition

Percent composition is each element's mass contribution divided by the molar mass of the complete formula. Water has a molar mass of 18.015 g/mol from the bundled atomic weights: hydrogen contributes 2.016 g/mol, or 11.19 percent, and oxygen contributes 88.81 percent. The percentages sum to 100 before display rounding.

Sodium chloride follows the same calculation: 58.440 g/mol in total, 39.34 percent sodium and 60.66 percent chlorine. The composition table above already computes this value for every parsed formula, so it remains tied to the same sourced mass calculation rather than a second formula path.

Particle count and the Avogadro constant

Conversion mode also reports formula units using the exact SI Avogadro constant, 6.02214076e23 per mole. Formula-to-percent runs on this page. The reverse problem, percent-to-formula, belongs to the empirical formula calculator, which reduces mole ratios and scales them to a molecular formula.

Sources

  1. NIST Atomic Weights and Isotopic Compositions. NIST. Retrieved .
  2. OpenStax Chemistry 2e, Formula Mass and the Mole Concept. OpenStax. Retrieved .
  3. NIST/CODATA Avogadro constant. NIST. Retrieved .

Method last reviewed