To convert grams to moles of a compound, divide the mass in grams by the compound’s molar mass (in g/mol). For example, 2.922 g of sodium chloride (NaCl, molar mass 58.44 g/mol) equals 0.0500 mol. This simple division is the foundation of stoichiometry, letting you translate a weighed amount of substance into a count of particles.
Formula
The conversion uses the definition of molar mass:
moles (mol) = mass (g) ÷ molar mass (g/mol)
In the calculator above, the first output (molarity) combines this with volume to give concentration:
Molarity (mol/L) = mass (g) ÷ molar mass (g/mol) ÷ volume (L)
where volume in liters = volume in mL ÷ 1000. Each variable is:
- m – mass of the compound in grams (g)
- mm – molar mass of the compound in grams per mole (g/mol)
- v – final solution volume in milliliters (mL)
- c – molarity in moles per liter (mol/L)
Worked Example
Using the default values from the calculator: 2.922 g of NaCl (molar mass 58.44 g/mol) dissolved in 250 mL of water.
- Convert volume to liters: 250 mL ÷ 1000 = 0.250 L
- Calculate moles of NaCl: 2.922 g ÷ 58.44 g/mol = 0.05000 mol
- Calculate molarity: 0.05000 mol ÷ 0.250 L = 0.2000 mol/L
- Convert to millimolar: 0.2000 mol/L × 1000 = 200.0 mM
The calculator shows 0.2000 mol/L and 200.00 mM, matching the hand calculation.
Assumptions
- The compound is pure and dry (no water of hydration unless accounted for).
- The molar mass is the formula weight of the compound as written (e.g., NaCl = 58.44 g/mol).
- For molarity, the volume is the final solution volume, not the volume of solvent added.
- The solution is assumed to be at typical laboratory conditions; molarity does not depend on temperature for this calculation.
How to Find Molar Mass
Molar mass is the sum of the atomic weights of all atoms in the formula. Use the IUPAC standard atomic weights:
- H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, Cl = 35.45, S = 32.06
- For water (H₂O): 2×1.008 + 15.999 = 18.015 g/mol
- For glucose (C₆H₁₂O₆): 6×12.011 + 12×1.008 + 6×15.999 = 180.156 g/mol
Always check the formula – hydrates (e.g., CuSO₄·5H₂O) include the water molecules in the molar mass.
When to Use This Conversion
This calculation is essential in nearly every chemistry lab task:
- Preparing solutions: To make a 0.1 M solution, you need to know how many grams to weigh out.
- Stoichiometry: Balanced equations relate moles of reactants and products; grams must be converted to moles first.
- Limiting reagent problems: Compare mole amounts to find which reactant runs out first.
- Yield calculations: Convert theoretical moles of product back to grams to compare with actual mass.
Common Mistakes and How to Avoid Them
- Unit mix-ups: Using milligrams instead of grams, or mL instead of L. Always convert to base units before dividing.
- Wrong molar mass: Using the atomic mass of an element instead of the compound’s formula mass. For NaCl, use 58.44, not 22.99 or 35.45.
- Rounding too early: Keep at least 4 significant figures in intermediate steps to avoid rounding errors in the final answer.
- Confusing molarity with moles: Molarity is moles per liter, not total moles. If you need moles, multiply molarity by volume in liters.
Limitations of the Formula
The conversion assumes the compound is a pure substance with a defined formula. It does not apply to mixtures without a known average molar mass. For polymers or proteins, molar mass is an average, so the result is an approximation. Also, for gases, using molar volume (22.4 L/mol at STP) is a shortcut, but it only works for ideal gases at standard conditions; the mass-to-mole conversion via molar mass is always valid.
Frequently Asked Questions
What is the difference between molar mass and molecular weight?
They are numerically identical; molar mass is expressed in g/mol, while molecular weight is unitless (or in atomic mass units). For example, water has a molecular weight of 18.015 amu and a molar mass of 18.015 g/mol.
Can I convert grams to moles without knowing the formula?
No. You need the molar mass, which comes from the chemical formula. If you only know the element, use its atomic mass. For a mixture, you cannot do this conversion unless you know the average molar mass.
How do I convert moles back to grams?
Multiply moles by molar mass. For example, 0.0500 mol × 58.44 g/mol = 2.922 g. This is the reverse of the division.
Why is Avogadro’s number relevant?
One mole contains 6.022 × 10²³ particles (Avogadro’s number). So converting grams to moles tells you how many molecules or formula units you have. For 0.0500 mol, that’s 3.01 × 10²² formula units.
Does temperature affect the conversion?
No. Mass and molar mass are temperature-independent. However, if you are measuring volume for molarity, volume changes with temperature, so molarity (mol/L) changes slightly. For precise work, use a volumetric flask at the calibration temperature.
What if my compound is a hydrate?
Include the water molecules in the molar mass. For example, CuSO₄·5H₂O has a molar mass of 249.69 g/mol (including 5 water molecules). Weighing the hydrate without accounting for water will give you fewer moles of the anhydrous salt than expected.