InchesCalculator

Science / Chemistry

Grams to Moles Calculator

Select a compound or element to auto-fill its molar mass, or enter a custom value. Works both ways: grams to moles and moles to grams.

Enter valid values in every field to see your result.

Priority: Custom Molar Mass > Compound > Element. The first non-zero value is used as the molar mass for calculations.

I
Written by
Inchs Calculator Team
Editorial Team

Converting between grams and moles

The gram-to-mole conversion is the most fundamental calculation in chemistry. Every stoichiometric problem, every molarity calculation, and every yield determination starts here: divide mass by molar mass to get moles, or multiply moles by molar mass to get mass.

This calculator includes all 118 elements with their IUPAC standard atomic weights, plus 176 common compounds (acids, bases, salts, organic solvents, sugars, and metal salts) with verified molar masses. Select your substance from the dropdown and the correct molar mass is applied automatically, eliminating the most common source of error in these calculations.

How the molar mass selection works

The calculator checks three sources in order: (1) Custom Molar Mass, (2) Compound dropdown, (3) Element dropdown. It uses the first non-zero value it finds. This means if you select a compound AND an element, the compound takes priority. Set compound to “[Select Compound]” to switch to the element.

How to Calculate Moles from Grams (step by step)

Step One: Identify the molar mass

Select your substance from the Compound or Element dropdown, or enter a custom molar mass in g/mol.

molar mass = selected from dropdown or entered manually

For Silver [Ag]: molar mass = 107.868 g/mol. For Sodium chloride [NaCl]: molar mass = 58.44 g/mol.

Step Two: Divide mass by molar mass

moles = mass (g) ÷ molar mass (g/mol)

For 500 g of Silver: 500 ÷ 107.868 = 4.6353 mol. For 500 g of NaCl: 500 ÷ 58.44 = 8.5558 mol.

Step Three: Find particle count (optional)

molecules (or atoms) = moles × 6.02214076 × 10²³

For 4.6353 mol of Ag: 4.6353 × 6.022 × 10²³ = 2.791 × 10²â´ atoms.

Reverse: Moles to Grams

mass (g) = moles × molar mass (g/mol)

For 1 mol of NaCl: 1 × 58.44 = 58.44 g.

Common uses

Preparing solutions, calculating reagent amounts for reactions, determining how much product to expect from a synthesis, converting between lab measurements (grams) and chemical quantities (moles) for any stoichiometric problem.

About the formula: Priority: Custom Molar Mass > Compound > Element. The first non-zero value is used as the molar mass for calculations.

Frequently Asked Questions

How do I use this calculator?+

Select a compound or element from the dropdown to auto-fill the molar mass, then enter your mass in grams to get moles. Or enter moles to get grams. You can also type a custom molar mass if your substance is not listed.

What if I select both a compound and an element?+

The calculator prioritises compound over element. If a compound is selected (non-zero), it uses that molar mass. Set compound to [Select Compound] to use the element dropdown instead.

Where do these molar mass values come from?+

All molar masses are from IUPAC standard atomic weights and verified chemical formula weights. Elements use 2021 IUPAC values. Compounds are calculated from their molecular formulas.

Can I convert from moles to grams?+

Yes. Enter your moles value in the Moles field and the Mass (from moles) result will show the equivalent grams using the same molar mass.

What if my substance is not in the list?+

Use the Custom Molar Mass field. When it is non-zero, it overrides both dropdowns. Calculate your molar mass by summing atomic masses from the periodic table for each atom in your formula.

Related calculators