Grams to Moles Calculator
Convert between grams and moles using molar mass. Calculate moles from mass, mass from moles, or find molar mass.
Grams to Moles Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: n = m / M (moles = grams / molar mass)
Worked example — 2.001 moles of NaCl (1.205 x 10^24 formula units)
Formula
n = m / M (moles = grams / molar mass)
Moles equal mass divided by molar mass. To reverse, mass equals moles times molar mass. The molar mass is the sum of atomic masses of all atoms in the chemical formula, found on the periodic table.
Worked Examples
Example 1: Grams of NaCl to Moles
Problem:Convert 117 g of sodium chloride (NaCl, M = 58.44 g/mol) to moles.
Solution:n = mass / molar mass n = 117 / 58.44 n = 2.0014 mol Particles = 2.0014 * 6.022e23 = 1.205e24
Result:2.001 moles of NaCl (1.205 x 10^24 formula units)
Example 2: Moles of Glucose to Grams
Problem:How many grams are in 0.25 moles of glucose (C6H12O6, M = 180.16 g/mol)?
Solution:mass = moles * molar mass mass = 0.25 * 180.16 mass = 45.04 g
Result:45.04 grams of glucose
Frequently Asked Questions
How do you convert grams to moles?
To convert grams to moles, divide the mass in grams by the molar mass (molecular weight) in grams per mole: moles = grams / molar mass. The molar mass is found by adding up the atomic masses of all atoms in the chemical formula from the periodic table. For example, water (H2O) has a molar mass of 2(1.008) + 16.00 = 18.015 g/mol, so 36 grams of water is 36/18.015 = 2.0 moles. This conversion is the foundation of all stoichiometric calculations in chemistry.
What is molar mass and how do you calculate it?
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). It is numerically equal to the molecular weight in atomic mass units (amu). To calculate it, sum the atomic masses of all atoms in the molecular formula. For glucose (C6H12O6): 6(12.011) + 12(1.008) + 6(16.00) = 72.066 + 12.096 + 96.00 = 180.16 g/mol. For ionic compounds like NaCl, add the atomic masses of the formula unit: 22.99 + 35.45 = 58.44 g/mol.
What is the relationship between moles, mass, and particles?
These three quantities are connected through molar mass and Avogadro's number. Mass and moles are related by: n = m/M. Moles and particles are related by: N = n * NA (6.022e23). Therefore particles and mass are related by: N = (m/M) * NA. One mole of any substance always contains 6.022e23 particles but has different masses depending on the molar mass. One mole of hydrogen gas (2 g) and one mole of lead (207 g) both contain the same number of atoms but differ greatly in mass.
Why do students most often get a grams-to-moles conversion wrong?
The most common mistake is using the wrong molar mass — plugging in a reactant's molar mass when the problem calls for a product's, or forgetting to include water of hydration in a hydrate's formula mass. The second most common error is a decimal or exponent slip when reading atomic masses off the periodic table (mixing up 12.01 for carbon with 12.00, for instance), which introduces small but compounding errors across multi-step stoichiometry problems. Always write out the units explicitly (g ÷ g/mol = mol) as a sanity check that they actually cancel correctly.
How is grams-to-moles conversion used when preparing a lab solution?
Before making any molar solution, a chemist first decides the target concentration and volume (for example, 250 mL of 0.5 M NaOH), calculates the moles needed (0.125 mol), then uses this exact grams-to-moles relationship in reverse to find the mass to weigh out: 0.125 mol x 40.00 g/mol = 5.00 g of NaOH. That mass is weighed on an analytical balance, dissolved in a small volume of solvent, then diluted to the full 250 mL mark in a volumetric flask — a workflow repeated in essentially every wet-chemistry lab before a titration, synthesis, or standardization procedure.
How do you handle hydrates such as copper(II) sulfate pentahydrate?
Water of crystallisation is part of the compound and must be counted in the molar mass. Anhydrous copper(II) sulfate is about 159.61 g/mol, while the pentahydrate adds five waters at 18.015 g/mol each, roughly 90.08, giving about 249.69 g/mol. Weighing out the pentahydrate against the anhydrous figure delivers only about 64 percent of the intended copper sulfate. Always check the bottle label, since the same reagent is sold in both forms.
How does molar mass give the density of a gas at standard conditions?
One mole of an ideal gas occupies 22.414 litres at 273.15 K and 101.325 kPa, so dividing molar mass by that molar volume gives density in grams per litre. Carbon dioxide at 44.01 g/mol works out near 1.96 g/L, which is why it pools in low spaces rather than dispersing. The relation holds only for gases and only where ideal behaviour is a fair approximation; it says nothing about liquids or solids, whose densities depend on packing.
Why must a limiting reagent be identified in moles rather than in grams?
A balanced equation states a ratio of particles, not of masses, so only mole amounts can be compared against it. Take 4 g of hydrogen against 4 g of oxygen for the synthesis of water: that is about 1.98 mol of hydrogen against 0.125 mol of oxygen, and the reaction needs one oxygen for every two hydrogens, so oxygen is limiting by a wide margin despite the equal masses. Converting to moles first is what makes the comparison meaningful.
What is the difference between molar mass, molecular weight and formula mass?
Molar mass is a physical quantity with units of grams per mole, the mass of one mole of a substance. Relative molecular mass, often loosely called molecular weight, is a dimensionless ratio against one twelfth of a carbon-12 atom and is numerically the same. Formula mass is the term used for ionic compounds such as sodium chloride, which have formula units rather than molecules. All three are weighted averages over natural isotope abundances, which is why chlorine appears as 35.45 rather than a whole number.
What is a mole and why is it used in chemistry?
A mole is 6.022 x 10^23 particles (Avogadro's number). It allows chemists to count atoms and molecules by weighing them. One mole of any element weighs its atomic mass in grams. For example, one mole of carbon weighs 12 grams and contains 6.022 x 10^23 carbon atoms.
References
Background & Theory
History
Reviewed for accuracy by Manoj Kumar, Mathematics Educator · Editorial policy
Related Calculators
🧮Mole Calculator — Grams to Moles
Calculate mole with inputs, formulas, and instant results.
🧮Avogadro's Number Calculator: Moles to Particles
Calculate avogadros number with inputs, formulas, and instant results.
🧮Green Chemistry Atom Economy Calculator
Calculate green chemistry atom economy with inputs, formulas, and instant results.
🧮Absorbance Calculator (Beer-Lambert Law)
Calculate absorbance with inputs, formulas, and instant results.
🧮Beer Lambert Extended Calculator
Calculate beer lambert extended with inputs, formulas, and instant results.
🧮Beer Lambert Law Calculator
Calculate beer lambert law with inputs, formulas, and instant results.
🧮Calibration Curve Calculator
Calculate calibration curve with inputs, formulas, and instant results.
🧮Calibration Curve Slope Calculator
Calculate calibration curve slope with inputs, formulas, and instant results.