Education
Grams to Moles Calculator
Last updated: June 19, 2026
A grams to moles calculator is a stoichiometry tool that converts the mass of a chemical substance in grams to its equivalent quantity in moles. The calculator utilizes the relationship moles equals mass divided by molar mass, where molar mass is either entered directly or computed automatically from a periodic table database based on the substance's chemical formula. It can also perform the reverse conversion from moles to grams. Chemistry students and lab technicians use this tool to prepare solutions and analyze reactions.
Pick a mode, enter the two known values, and the calculator returns the third using n = m / M. Use a preset for common molar masses (H2O, CO2, NaCl, O2, HCl, glucose) or enter your own.
Quick Answer
Convert grams to moles or moles to grams. Enter the chemical formula or molar mass and the substance amount for instant calculations.
Solve for
Sum of the atomic masses of every atom in the compound.
Common molar masses
Tap to set the molar mass field. Values are rounded to 4 significant figures from standard atomic weights.
Moles
0.999167 mol
The molar mass of a compound is the sum of the atomic masses (in g/mol) of every atom in its formula. Look these up on a periodic table, or use the presets above for common compounds.
Examples
18 g of H2O at 18.015 g/mol
≈ 1.00 mol
2 mol of NaCl at 58.44 g/mol
= 116.88 g
44 g CO2 at 44.01 g/mol
≈ 1.00 mol
5 g glucose at 180.16 g/mol
≈ 0.0277 mol
How it works
The mole-mass relationship has one formula. Any two of mass, moles, and molar mass determine the third.
Moles from grams · n = m / M
Grams from moles · m = n x M
Molar mass · M = m / n
Related chemistry calculators
- Empirical Formula
- Molarity calculator for the next step: moles per liter of solution.
- Percent yield calculator once you have actual and theoretical product masses.
- Limiting reactant calculator when both reactants are weighed and you need to know which runs out first.
- Weight converter for converting between grams, kilograms, milligrams, and other mass units before plugging in.
- Molecular weight calculator for the molar mass input from any chemical formula.
- Balancing equations calculator for stoichiometric coefficients before reaction calculations.
- All education calculators.
Related Calculators
More tools from Education
Frequently asked questions
n = m / M, where n is moles, m is the mass in grams, and M is the molar mass in g/mol. To go from moles to grams, multiply by M instead: m = n x M.
A mole is Avogadro's number (6.022 x 10^23) of particles, typically atoms or molecules. It is the chemistry unit for counting the amount of substance, similar to using 'dozen' for counting twelve.
Molar mass is the mass in grams of one mole of a substance, expressed in g/mol. For a compound, it is the sum of the atomic masses of every atom in the formula. The periodic table lists atomic masses for each element.
Atomic weights from IUPAC are reported with several digits of precision, but for typical homework and intro chemistry, 4 sig figs is plenty. If you need higher precision, enter the molar mass manually from a current IUPAC table.
Not yet. It supports the presets in the panel and any molar mass you enter manually. For an arbitrary formula, sum the atomic masses of every atom using a periodic table or a separate molar mass tool.
Yes. Switch the 'Solve for' mode to 'Grams from moles + molar mass'. The same n = m / M relationship runs in both directions.
Related calculators
Conversions
How Many Grams in an Ounce
Convert between ounces and grams instantly. Understand the differences between standard avoirdupois ounces and troy ounces, and use our reference tables.
Conversions
How Many Grams in a Cup
Find out how many grams are in a cup for common ingredients. Water is 236.6g, flour is 120g, and sugar is 200g. Convert cups to grams instantly.
Conversions
Grams to Pounds
Convert grams to pounds. Find the direct mass answer, the conversion formula, standard reference tables, and a live converter.