To convert grams to moles, you divide the mass in grams by the molar mass (in grams per mole). This page’s calculator does exactly that: you enter the mass of a substance and its molar mass, and it returns the number of moles.
Formula
The core relationship is:
moles = mass (g) ÷ molar mass (g/mol)
In symbols: n = m / M, where n is the amount in moles, m is the mass in grams, and M is the molar mass in grams per mole. The calculator above also computes molarity (concentration) by dividing moles by the solution volume in liters:
molarity (mol/L) = moles ÷ volume (L)
Here, volume is entered in milliliters, so it is converted to liters by dividing by 1000. The molar mass is the mass of one mole of a substance—numerically equal to its atomic or molecular weight but expressed in grams per mole. For a compound, add the atomic weights of all atoms in its formula.
Worked Example
Using the default values: you have 2.922 g of sodium chloride (NaCl) and want to know how many moles that is, and what molarity you get if you dissolve it in 250 mL of water.
- Molar mass of NaCl = 22.99 (Na) + 35.45 (Cl) = 58.44 g/mol.
- Moles = 2.922 g ÷ 58.44 g/mol = 0.05000 mol (5.000 × 10−2 mol).
- Volume in liters = 250 mL ÷ 1000 = 0.250 L.
- Molarity = 0.05000 mol ÷ 0.250 L = 0.2000 mol/L (0.2000 M).
The calculator gives 0.2000 mol/L and 200.0 mM, matching the steps above.
Assumptions
- The substance is pure; the mass is of the solute alone.
- Molar mass is taken from the periodic table (IUPAC standard atomic weights).
- For molarity, the solute dissolves completely without changing volume (ideal dilute solution).
- Volume is the final solution volume, not the volume of solvent added.
Why Divide? The Unit Logic
The rule “divide grams by molar mass” is not arbitrary—it comes from the definition of molar mass. Molar mass has units of grams per mole (g/mol). When you divide grams by g/mol, the grams cancel and you are left with moles:
(g) ÷ (g/mol) = g × (mol/g) = mol.
If you multiplied instead, you would get g × g/mol = g²/mol, which is not a meaningful unit. So the operation is forced by dimensional analysis. The same logic explains why you multiply moles by molar mass to get grams: mol × g/mol = g.
How to Choose the Right Molar Mass
For an element, use its atomic weight from the periodic table (e.g., carbon = 12.011 g/mol). For a compound, add the atomic weights of all atoms in the chemical formula. For example:
- Water (H₂O): 2×1.008 + 15.999 = 18.015 g/mol.
- Glucose (C₆H₁₂O₆): 6×12.011 + 12×1.008 + 6×15.999 = 180.156 g/mol.
- Sulfuric acid (H₂SO₄): 2×1.008 + 32.06 + 4×15.999 = 98.078 g/mol.
Be careful with hydrates (e.g., CuSO₄·5H₂O) – include the water molecules in the molar mass. Also note that some textbooks use rounded atomic weights (e.g., 1, 12, 16), which give slightly different results; for precise lab work, use the standard atomic weights.
Common Mistakes and How to Avoid Them
- Multiplying instead of dividing: Always check units. If you multiply, you get g²/mol, which is nonsense.
- Wrong molar mass: Using the mass of a single atom (in amu) instead of the molar mass (g/mol) is a common error. They are numerically equal but the unit matters.
- Forgetting to convert volume to liters: Molarity is moles per liter, not per milliliter. Divide mL by 1000 first.
- Rounding too early: Keep at least 4–5 significant figures in intermediate steps to avoid rounding errors in the final answer.
- Using the wrong formula for hydrates: For CuSO₄·5H₂O, the molar mass is 249.69 g/mol, not 159.61 g/mol (anhydrous).
When Would You Multiply Instead?
You multiply grams by molar mass when you need to convert moles to grams. For instance, if a reaction requires 0.25 mol of NaCl, the mass needed is 0.25 mol × 58.44 g/mol = 14.61 g. Also, when converting between grams and number of particles, you use Avogadro’s number (6.022 × 1023 particles per mole). To go from grams to particles, you divide by molar mass to get moles, then multiply by Avogadro’s number. To go from particles to grams, you divide by Avogadro’s number, then multiply by molar mass.
Real-World Context: Why This Matters
This conversion is the foundation of stoichiometry. In a lab, you rarely measure moles directly—you weigh solids or measure volumes of solutions. Converting grams to moles lets you use the coefficients in a balanced chemical equation to predict how much product will form or how much reactant you need. For example, if you have 10.0 g of sodium bicarbonate (NaHCO₃, molar mass 84.007 g/mol), you have 10.0 / 84.007 = 0.119 mol. If you react it with excess vinegar (acetic acid), the balanced equation shows a 1:1 mole ratio, so you would produce 0.119 mol of carbon dioxide gas. This kind of calculation is used daily in chemistry courses, research labs, and industrial process control.
Frequently Asked Questions
What is molar mass exactly?
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). For elements, it is the atomic weight from the periodic table; for compounds, it is the sum of the atomic weights of all atoms in the formula. It numerically equals the average mass of a single molecule or atom in atomic mass units (amu), but scaled up to grams.
Do I divide or multiply to get moles from grams?
Divide. Take the mass in grams and divide by the molar mass (g/mol). The result is the number of moles. For example, 18.015 g of water divided by 18.015 g/mol gives exactly 1 mole.
How do I convert moles to grams?
Multiply the number of moles by the molar mass. For instance, 2 moles of NaCl (58.44 g/mol) weigh 2 × 58.44 = 116.88 g. This is the reverse operation of the grams-to-moles conversion.
What if I have a hydrated compound?
Include the water molecules in the molar mass. For example, sodium carbonate decahydrate (Na₂CO₃·10H₂O) has a molar mass of 286.14 g/mol (anhydrous Na₂CO₃ is 105.99 g/mol, plus 10×18.015 = 180.15 g/mol). Use the hydrated molar mass when weighing the hydrate.
Why does the calculator also ask for volume?
Because the page also computes molarity, which is moles per liter. If you only need moles, you can ignore the volume field—the first output is the mole count. But if you are preparing a solution, volume lets you get concentration directly.
Can I use this for gases?
Yes, for converting mass to moles. For gases, you can also use the ideal gas law (PV = nRT) to find moles from pressure, volume, and temperature. But the grams-to-moles conversion is independent of state; it works for solids, liquids, and gases alike.
Related
Formula used
in m | Mass of solute | g | 2.922 | 0 in mm | Molar mass | g/mol | 58.44 | 0.001 in v | Final solution volume | mL | 250 | 0.001 out c | Molarity | mol/L | m / mm / (v / 1000) | 4 out cmm | Concentration in millimolar | mM | c * 1000 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- QPP Calculator Canada: How It Works & How to Use It
- PPP Calculator World Bank: How It Works & How to Use It2,000.00
- PPP Calculator: India vs USA Cost Comparison1,000.00 USD
- PPP Calculator USD to INR: How It Works2,335 INR
- PPP Calculator India vs UK: Real Cost Comparison103.63 GBP
- PPP Calculator India vs Dubai: Real Cost Comparison8,954.58 AED