Convert mg to moles by dividing mass by molar mass. Pick a common substance such as magnesium or enter your own g/mol, and see mmol and µmol too.

Pick a common substance or enter the molar mass of your exact compound.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Moles from massConverts a mass in mg, g, µg or kg into molesRequires the substance mass and either a listed substance or the molar mass
Mass from molesFinds the mass in mg that holds a given amount of substanceRequires the amount in mol, mmol, µmol or nmol and either a listed substance or the molar mass
Molar massFinds the molar mass in g/mol from a measured mass and amountRequires the substance mass and the amount of substance

The Substance list fills in the molar mass for magnesium (24.305 g/mol), water (18.015), sodium chloride (58.44), glucose (180.156), calcium carbonate (100.086), caffeine (194.19), vitamin C (176.12) and aspirin (180.158). Any other compound needs its molar mass entered in g/mol or kg/mol. Every result also lists millimoles, micromoles, nanomoles, the mass in mg and µg, and the number of entities.

mg to Moles Formulas

n = m ÷ 1000 ÷ M
nAmount of substance (mol)
mMass of the substance (mg)
MMolar mass of the substance (g/mol)

A mass in milligrams has no fixed value in moles. The answer depends on the molar mass, which is the mass of one mole of that substance.

Moles from mass

The formula above applies directly. For 150 mg of a substance with a molar mass of 25 g/mol, n = 150 ÷ 1000 ÷ 25 = 0.006 mol, or 6 mmol. For 500 mg of caffeine, n = 500 ÷ 1000 ÷ 194.19 = 0.0025748 mol.

Mg is also the symbol for magnesium, which has a standard atomic weight of 24.305 [2]. One mole of magnesium is 24.305 g, so 24.305 mg of magnesium is 0.001 mol and 1 g is 0.0411 mol.

Mass from moles

m = n × M × 1000

For 2 mmol of sodium chloride, m = 0.002 × 58.44 × 1000 = 116.88 mg.

Molar mass

M = m ÷ 1000 ÷ n

A sample of 180.156 mg that contains 1 mmol has M = 180.156 ÷ 1000 ÷ 0.001 = 180.156 g/mol, the molar mass of glucose.

Number of entities

N = n × 6.02214076 × 1023 [1]

One mole contains exactly 6.02214076 × 1023 entities, which may be atoms, molecules, ions or other specified particles [1]. The 0.006 mol in the first example is 3.613 × 1021 entities.

Limits of This Estimate

  • The molar mass has to match the exact substance weighed. A hydrate, a salt form or a mixture has a different molar mass than the pure compound, and an impure sample holds fewer moles than its weight suggests.
  • The listed molar masses are sums of standard atomic weights rounded to five figures, such as 1.0080 for hydrogen, 12.011 for carbon and 15.999 for oxygen [2]. Atomic weights vary slightly with the source of a material, so the last digit of a molar mass is not exact.

Sources

  1. NIST, SI Units: Amount of Substance: definition of the mole and the Avogadro constant
  2. IUPAC Commission on Isotopic Abundances and Atomic Weights, Abridged Standard Atomic Weights 2024: atomic weights behind the listed molar masses