This calculator converts a mass in grams to an amount in moles using the substance’s molar mass. You enter the mass and the molar mass (grams per mole), and it returns the number of moles, plus the equivalent in millimoles. The core relationship is the definition of the mole: amount (mol) = mass (g) ÷ molar mass (g/mol).
Formula
The conversion is expressed by the equation:
n = m / M
- n – amount of substance in moles (mol)
- m – mass of the substance in grams (g)
- M – molar mass of the substance in grams per mole (g/mol)
Molar mass is the mass of one mole of a substance. For a compound, it is the sum of the atomic weights (in g/mol) of all atoms in its chemical formula, using the IUPAC standard atomic weights. For example, sodium chloride (NaCl): Na = 22.990 g/mol, Cl = 35.45 g/mol, so M = 58.44 g/mol.
Worked Example
Using the default values from the calculator: you have 2.922 g of NaCl (M = 58.44 g/mol) and you want to know the amount in moles, and also the molarity if dissolved in 250 mL of water.
- Find the amount in moles: n = m / M = 2.922 g / 58.44 g/mol = 0.05000 mol (to 4 significant figures).
- Convert volume to liters: 250 mL = 250 / 1000 = 0.250 L.
- Compute molarity: c = n / V = 0.05000 mol / 0.250 L = 0.2000 mol/L.
- Convert to millimolar: 0.2000 mol/L × 1000 = 200.0 mM.
The calculator gives the same result: 0.2000 mol/L and 200.00 mM.
Assumptions
- The substance is pure and the molar mass is accurate for the given form (e.g., anhydrous vs. hydrated).
- For molarity, the final solution volume is used, not the volume of solvent added (dissolving a solid can change the total volume).
- The solution is assumed to be at the temperature where the molar mass is defined (usually 25 °C for standard solutions).
- Complete dissolution is assumed; no correction for density or activity coefficients is made.
How to Read the Diagram
People often search for a “grams to moles diagram” because they want a visual flow: grams → divide by molar mass → moles. The reverse arrow (multiply by molar mass) goes from moles back to grams. The diagram is simply the conversion factor written as a fraction:
- To go from grams to moles: multiply by (1 mol / molar mass in g).
- To go from moles to grams: multiply by (molar mass in g / 1 mol).
The key is to write the unit you want to cancel in the denominator. For example, 10.0 g of water (M = 18.015 g/mol): 10.0 g × (1 mol / 18.015 g) = 0.555 mol. The grams cancel, leaving moles.
Common Mistakes and How to Avoid Them
- Using the wrong molar mass: For hydrated salts, include water of crystallization (e.g., CuSO₄·5H₂O has M = 249.69 g/mol, not 159.61 g/mol for anhydrous CuSO₄). Always check the chemical formula.
- Mixing up grams and kilograms: If your mass is in kg, convert to grams first (1 kg = 1000 g). The molar mass is always in g/mol.
- Forgetting to convert mL to L: When calculating molarity, volume must be in liters. The calculator does this automatically.
- Rounding too early: Keep at least 5 significant figures in intermediate steps to avoid rounding errors in the final answer.
When to Use This Conversion
You need the grams-to-moles conversion whenever you are:
- Preparing a solution of known molarity (weigh out a mass, dissolve to a final volume).
- Calculating the amount of reactant or product in a chemical reaction (stoichiometry).
- Determining the number of molecules or atoms (multiply moles by Avogadro’s number, 6.022 × 1023 per mole).
- Working with gas laws (convert mass to moles to use PV = nRT).
For example, to make 250 mL of a 0.200 M NaCl solution, you need 0.200 mol/L × 0.250 L = 0.0500 mol, which is 0.0500 mol × 58.44 g/mol = 2.922 g. That’s exactly the default mass in the calculator.
Limits of the Formula
The relationship n = m/M is exact by definition of the mole, but its practical accuracy depends on the molar mass you use. For elements with multiple isotopes, the standard atomic weight is an average, so the molar mass is an average as well. For compounds, the molar mass is the sum of those averages. This is fine for virtually all lab work, but if you need extreme precision (e.g., for isotopic labeling), you must use the exact isotopic masses.
Also, the molarity calculation assumes the final volume is known precisely. When you dissolve a solid in a solvent, the volume can change slightly; always use a volumetric flask to make the final volume, not the volume of solvent added.
Frequently Asked Questions
How do I find the molar mass of a compound?
Add up the atomic weights of each element in the formula, multiplied by the number of atoms of that element. For example, glucose (C₆H₁₂O₆): 6×12.011 + 12×1.008 + 6×15.999 = 180.156 g/mol. You can find atomic weights on the periodic table or in the IUPAC standard atomic weights list.
What is the difference between moles and molarity?
Moles measure the amount of substance (a count of particles, like a dozen). Molarity measures concentration, which is moles per liter of solution. You can have 0.5 moles of NaCl, but its molarity depends on the volume of the solution: 0.5 mol in 1 L is 0.5 M, in 2 L it is 0.25 M.
Can I convert grams to moles for any substance?
Yes, as long as you know the molar mass. For elements, use the atomic weight; for compounds, sum the atomic weights. The conversion works for pure substances, but not for mixtures (like air or a saltwater solution) unless you know the average molar mass of the mixture.
Why do we use 6.022 × 1023 for a mole?
That number (Avogadro’s constant) is defined so that one mole of a substance has a mass in grams numerically equal to its atomic/molecular mass in atomic mass units (u). For example, one atom of carbon-12 has a mass of 12 u, so one mole of carbon-12 has a mass of 12 g. It’s a convenient scale for lab work.
What if I have the mass in milligrams?
Convert milligrams to grams first (1 g = 1000 mg), then divide by molar mass. For example, 500 mg of NaCl is 0.500 g, which is 0.500 / 58.44 = 0.00856 mol, or 8.56 mmol. Many lab calculations use millimoles for convenience.
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 Dubai: Real Cost Comparison8,954.58 AED
- PPP Calculator India vs UK: Real Cost Comparison103.63 GBP