Convert grams, kilograms, or milligrams to atomic mass units or moles, and calculate mass or molar mass from moles and g/mol values.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Atomic mass units from massConverts a mass in grams or another metric unit to atomic mass unitsRequires a mass and an atomic mass result unit, amu or Da
Mass from atomic mass unitsConverts a mass in atomic mass units to grams or another metric unitRequires a mass in amu or Da and a mass result unit
Moles from massFinds the amount of substance in a sampleRequires a mass and a molar mass in g/mol
Mass from molesFinds the mass of a given amount of substanceRequires an amount in mol, a molar mass in g/mol and a mass result unit
Molar mass from mass and molesFinds the molar mass of a substanceRequires a mass and an amount in mol

Masses can be entered or shown in g, kg, mg, μg or Mg (tonnes), using 1 kg = 1,000 g, 1 mg = 0.001 g, 1 μg = 0.000001 g and 1 Mg = 1,000,000 g. The molar mass field offers 13 common substances, from the hydrogen atom to glucose, or takes any typed value. Results that are not already in grams also show the mass in grams.

Grams to Mass Formulas

amu = g ÷ mu [1]
amuMass in atomic mass units (amu, the same size as the dalton, Da)
gMass in grams
muAtomic mass constant, 1.66053906892 × 10⁻²⁴ g [1]

A gram is itself a unit of mass, so a value in grams is already a mass and needs no formula. What changes is the unit it is written in: kilograms or milligrams for everyday amounts, atomic mass units for single atoms and molecules, or moles for counting particles in a sample. Moving between grams and moles needs the molar mass of the substance, because a mole of one substance does not weigh the same as a mole of another.

Atomic mass units from mass

The atomic mass constant is 1.66053906892 × 10⁻²⁷ kg [1], which is 1.66053906892 × 10⁻²⁴ g. Dividing by it turns 5 g into 3.011070 × 10²⁴ amu. One gram is about 6.022 × 10²³ amu, the same digits as the Avogadro constant [3]. A mass in amu is not a count of atoms.

Mass from atomic mass units

g = amu × mu

A carbon-12 atom has a mass of 12 amu, which is 12 × 1.66053906892 × 10⁻²⁴ = 1.992647 × 10⁻²³ g.

Moles from mass

n = m ÷ M [2]

Molar mass M is the mass of a substance divided by its amount of substance [2], so the amount n is the mass m in grams divided by M in g/mol. For 100 g of sodium chloride at 58.44 g/mol, n = 100 ÷ 58.44 = 1.7112 mol.

Mass from moles

m = n × M

Two moles of water at 18.01528 g/mol have a mass of 2 × 18.01528 = 36.03 g.

Molar mass from mass and moles

M = m ÷ n [2]

A 36.03056 g sample that contains 2 mol has a molar mass of 36.03056 ÷ 2 = 18.01528 g/mol. Both the mass and the amount must be greater than zero.

Limits of This Estimate

  • The atomic mass constant is a measured value with a relative uncertainty of 3.1 × 10⁻¹⁰ [1], as of the 2022 CODATA adjustment. The Avogadro constant is exact [3].
  • The molar masses in the list are rounded standard values. Elements are listed as single atoms, so hydrogen is 1.008 g/mol and not the 2.016 g/mol of H2 gas.
  • Results are rounded to six decimal places or shown in scientific notation.

Sources

  1. NIST, CODATA Value: atomic mass constant: atomic mass constant and its uncertainty
  2. NIST Special Publication 811, Guide for the Use of the International System of Units, Chapter 8: molar mass as mass divided by amount of substance
  3. NIST, CODATA Value: Avogadro constant: Avogadro constant, an exact value