Skip to content
Calc.

Moles to Grams Calculator (and Grams to Moles)

Convert moles to grams or grams to moles with the molar mass: mass = moles × molar mass, moles = mass ÷ molar mass. Pick a common compound or type any molar mass, and read off the number of molecules from Avogadro's number as well.

Last updated: October 2026

Mass

146.1 g

Formula below · 4 sources (NIST, physics.nist.gov, pubchem.ncbi.nlm.nih.gov, ciaaw.org) · Updated Oct 2026

Compare with similar

About this calculator

The mole is the SI unit of amount of substance: one mole contains exactly 6.022 140 76 × 10²³ elementary entities (the Avogadro constant, fixed by the 2019 SI redefinition). The molar mass M of a substance is the mass of one mole of it in grams per mole, numerically equal to its relative molecular or formula mass, and it links the two quantities a chemist works with: the mass you can weigh and the amount that takes part in reactions. Mass (g) = moles × M, and moles = mass (g) ÷ M. Find M by adding the standard atomic weights of every atom in the formula, counting subscripts: NaCl is 22.990 + 35.45 = 58.44 g/mol, water is 2 × 1.008 + 15.999 = 18.015 g/mol, glucose C₆H₁₂O₆ is 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol. The calculator has the molar masses of common laboratory compounds built in (from the IUPAC/CIAAW 2021 standard atomic weights) and takes any other value you type. The same molar mass is used in both directions, so converting 2.5 mol of NaCl to 146.1 g and 146.1 g back to 2.5 mol are the same calculation. The tiles also give the number of molecules or formula units (moles × 6.022 × 10²³) and the amount in millimoles. For ionic compounds such as NaCl the entities are formula units rather than molecules, and for hydrated salts the water of crystallisation counts toward the molar mass (CuSO₄·5H₂O is 249.68 g/mol, not 159.60). For solutions, moles ÷ litres gives molarity; the molarity and dilution calculators take it from there. Typical atomic-weight uncertainty gives molar masses to 4–5 significant figures, which is better than most balances.

Molar masses of common compounds from IUPAC standard atomic weights (g/mol)

Scroll sideways to see all columns →

CompoundFormulaWorkingMolar mass
WaterH₂O2 × 1.008 + 15.99918.015
Sodium chlorideNaCl22.990 + 35.4558.44
GlucoseC₆H₁₂O₆6 × 12.011 + 12 × 1.008 + 6 × 15.999180.156
Carbon dioxideCO₂12.011 + 2 × 15.99944.009
Sodium hydroxideNaOH22.990 + 15.999 + 1.00839.997
Hydrochloric acidHCl1.008 + 35.4536.458
Sulfuric acidH₂SO₄2 × 1.008 + 32.06 + 4 × 15.99998.072
Calcium carbonateCaCO₃40.078 + 12.011 + 3 × 15.999100.086
EthanolC₂H₅OH2 × 12.011 + 6 × 1.008 + 15.99946.068
AmmoniaNH₃14.007 + 3 × 1.00817.031
Potassium chlorideKCl39.098 + 35.4574.551
SucroseC₁₂H₂₂O₁₁12 × 12.011 + 22 × 1.008 + 11 × 15.999342.297
Source: IUPAC Commission on Isotopic Abundances and Atomic Weights — Standard atomic weights

How to use

Example 1 — moles to grams (the defaults): 2.5 mol of sodium chloride. M(NaCl) = 22.990 + 35.45 = 58.44 g/mol. Mass = 2.5 × 58.44 = 146.1 g. That is what to weigh out on the balance; the tiles show 1.506 × 10²⁴ formula units and 2,500 mmol. Example 2 — grams to moles: how many moles are in 100 g of NaCl? Choose Grams → moles and enter 100: moles = 100 ÷ 58.44 = 1.711 mol. Dissolved to 1 L this is a 1.711 M solution. Example 3 — a compound not in the list: 10.0 g of copper(II) sulfate pentahydrate, CuSO₄·5H₂O. Set Compound to Custom and enter M = 63.546 + 32.06 + 4 × 15.999 + 5 × 18.015 = 249.68 g/mol; moles = 10.0 ÷ 249.68 = 0.04005 mol = 40.05 mmol. Check: the answer should be smaller than the number of grams whenever M is above 1 g/mol, and the two directions must undo each other.

Frequently asked questions

How do I convert moles to grams?

Multiply the number of moles by the molar mass in g/mol: grams = moles × M. For 2.5 mol of NaCl (58.44 g/mol), 2.5 × 58.44 = 146.1 g. To go the other way, divide: moles = grams ÷ M, so 146.1 g ÷ 58.44 g/mol = 2.5 mol.

How do I find the molar mass of a compound?

Add the standard atomic weights of all the atoms in the formula, multiplying each by its subscript. For glucose, C₆H₁₂O₆: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol. Atomic weights come from the periodic table (IUPAC/CIAAW); PubChem lists the molecular weight of any named compound. The table on this page gives the working for twelve common compounds.

What is the difference between molar mass, molecular weight and formula mass?

Molecular weight (relative molecular mass) is a dimensionless ratio to one-twelfth of the mass of carbon-12; molar mass is the same number with the unit g/mol. Formula mass is the term for ionic compounds like NaCl, which have formula units rather than discrete molecules. For this calculation they are interchangeable: use the number in g/mol.

How many molecules are in a mole?

Exactly 6.022 140 76 × 10²³, the Avogadro constant, which the 2019 redefinition of the SI fixed by definition. The tile reports moles × 6.022 in units of 10²³, so 2.5 mol shows as 15.06 × 10²³ = 1.506 × 10²⁴ formula units. A mole of anything, from hydrogen atoms to sugar molecules, contains the same number of entities.

Why does the mass of a hydrated salt differ from the anhydrous one?

Water of crystallisation is part of the solid you weigh. Copper(II) sulfate pentahydrate, CuSO₄·5H₂O, has a molar mass of 249.68 g/mol against 159.60 for anhydrous CuSO₄, so 0.1 mol of the pentahydrate weighs 24.97 g and gives 0.1 mol of copper ions, not 15.96 g. Always use the formula of the substance actually on the balance, including any water.

Does the calculator work for gases and solutions?

The mass–mole conversion is the same for any state of matter. For a gas at a known pressure and temperature, moles also follow from the ideal gas law (n = PV ÷ RT); for a solution, moles ÷ litres gives the molar concentration. The calculator's grams-to-moles result is the usual first step in both, and the related molarity and ideal gas law pages take the number from there.

Related calculators

Sources & references

How we check our calculators

Think a result is wrong? Report a problem with this calculator.