Skip to main content

Grams to Moles Calculator

Enter a formula and an amount, and convert in either direction — grams to moles or moles to grams. The molar mass is calculated for you from current atomic masses, and the working is written out so you can reproduce it by hand.

Try:

The conversion formulas

Grams → moles

n = m ÷ M (moles = grams ÷ molar mass)

Moles → grams

m = n × M (grams = moles × molar mass)

The molar mass M (in g/mol) is the exchange rate between the two units, and it comes straight from the periodic table: add up the atomic masses in the formula. That's the entire method — one lookup, one division or multiplication.

Worked example: grams → moles

How many moles are in 10.0 g of NaCl?

  1. Molar mass of NaCl = 22.99 + 35.45 = 58.44 g/mol
  2. n = 10.0 g ÷ 58.44 g/mol

Answer: ≈ 0.171 mol

Worked example: moles → grams

What is the mass of 0.250 mol of glucose (C₆H₁₂O₆)?

  1. Molar mass of glucose ≈ 180.16 g/mol
  2. m = 0.250 mol × 180.16 g/mol

Answer: ≈ 45.0 g

Why moles matter

Balances weigh grams, but chemical equations count particles — and the mole (6.022 × 10²³ particles) is the counting unit that connects them. Nearly every chemistry calculation passes through this conversion: stoichiometry needs moles before applying ratios, and molarity is defined as moles per litre.

⚠ Common mistake: Watch out for diatomic elements: oxygen gas is O₂ (32.00 g/mol), not O (16.00 g/mol). Converting “grams of oxygen” with the wrong molar mass is a factor-of-two error that costs marks constantly.
⚠ Common mistake: Don't invert the operation: grams → moles divides by molar mass; moles → grams multiplies. If your answer's size looks absurd (0.0005 g of table salt from half a mole?), you probably flipped it.

Frequently asked questions

How do I convert grams to moles?

Divide the mass by the substance's molar mass: n = m ÷ M. For 18 g of water (18.02 g/mol), that's very nearly 1 mole.

How many grams are in one mole?

It depends entirely on the substance — one mole of hydrogen atoms is about 1 g, one mole of glucose about 180 g. The molar mass tells you; there is no universal number.

Is this the same as the molar mass calculator?

They share the same engine. The molar mass calculator focuses on breaking a formula down element by element; this tool goes one step further and converts a given amount for you.

Related chemistry tools

Learn the concepts