molecalculator

Moles & Molar Mass

Grams to Moles Example & How to Convert

Calculator No. 01-10543 · Updated · Formula and assumptions shown below

Molarity 0.2000 mol/L
Concentration in millimolar
200.00 mM
= Molarity × 1000
Mass of solute
2.922 g
Set in the form below
Molar mass
58.44 g/mol
Set in the form below
You enter
Mass of solute (g), Molar mass (g/mol), Final solution volume (mL)
You get
Molarity (mol/L), Concentration in millimolar (mM)
Rounding
4 dp · 2 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

To convert grams to moles, divide the mass of the substance (in grams) by its molar mass (in grams per mole). For example, 2.922 g of sodium chloride (NaCl, molar mass 58.44 g/mol) equals 0.05000 mol. This page walks through the calculation step by step, explains why it works, and shows how to use the same logic in reverse to find mass from moles.

Formula

The conversion is a single division:

moles = mass (g) ÷ molar mass (g/mol)

In symbols: n = m / M

  • n = amount of substance in moles (mol)
  • m = mass of the sample in grams (g)
  • M = molar mass in grams per mole (g/mol)

The molar mass is the mass of one mole of a substance. For a compound, add the atomic weights of all atoms in its chemical formula. For NaCl: Na = 22.990 g/mol, Cl = 35.45 g/mol, so M = 58.44 g/mol (using the IUPAC abridged standard atomic weights).

The calculator above also computes molarity, which is moles of solute divided by liters of solution. That is a separate but closely related step: first convert grams to moles, then divide by the volume in liters.

Worked Example

Using the default values from the calculator block: 2.922 g of NaCl (M = 58.44 g/mol) dissolved in 250 mL of solution.

Step 1: Convert grams to moles

moles = 2.922 g ÷ 58.44 g/mol = 0.05000 mol (exactly 0.05 mol)

Step 2: Convert mL to L

250 mL ÷ 1000 = 0.250 L

Step 3: Calculate molarity

molarity = 0.05000 mol ÷ 0.250 L = 0.2000 mol/L (0.2000 M)

The calculator returns 0.2000 mol/L and 200.00 mM (millimolar), which matches the step-by-step result.

Assumptions

  • The molar mass is taken from IUPAC abridged atomic weights (Na 22.990, Cl 35.45).
  • The solution volume is the final volume after dissolution, not the volume of solvent added.
  • The solution is assumed dilute and ideal, so volume changes on mixing are ignored.
  • The substance is pure and dry; hydrates or impurities change the effective molar mass.

Why Convert Grams to Moles at All?

Chemists weigh solids in grams, but reactions happen between individual particles (atoms, molecules, ions). One mole contains 6.022 × 1023 particles (Avogadro’s number), so moles provide a bridge between the macroscopic world of the balance and the microscopic world of atoms. When you write a balanced equation like 2 H2 + O2 → 2 H2O, the coefficients tell you the mole ratio, not the gram ratio. To know how many grams of oxygen react with 4 g of hydrogen, you must first convert grams to moles, apply the ratio, then convert back.

The same logic applies to solutions. Molarity (mol/L) is the standard concentration unit in chemistry. To prepare a solution of known molarity, you convert the desired moles to grams using the molar mass, then dissolve in solvent to the final volume.

How to Find Molar Mass

Molar mass comes from the periodic table. For a compound, sum the atomic weights of each element multiplied by its subscript in the formula. Examples:

  • Water (H2O): 2 × 1.008 + 15.999 = 18.015 g/mol
  • Glucose (C6H12O6): 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol
  • Sodium hydroxide (NaOH): 22.990 + 15.999 + 1.008 = 39.997 g/mol

If you have a hydrate, like CuSO4·5H2O, include the water molecules in the molar mass. If you have a salt with multiple charges, the molar mass is still just the sum of the formula unit (e.g., CaCl2: 40.078 + 2 × 35.45 = 110.98 g/mol).

Common Mistakes and How to Avoid Them

  • Using the wrong molar mass: Always double-check the formula. A common error is using the atomic mass of an element instead of the molar mass of the compound.
  • Mixing up grams and milligrams: If your mass is in mg, convert to grams first (divide by 1000). The calculator expects grams.
  • Forgetting the volume conversion: Molarity requires liters, not milliliters. Divide mL by 1000 before using in the formula.
  • Rounding too early: Keep at least 4 significant figures in intermediate steps. Round only the final answer.
  • Confusing molarity with molality: Molarity is moles per liter of solution; molality is moles per kilogram of solvent. They are not the same.

Reverse Conversion: Moles to Grams

To go the other way, multiply moles by molar mass:

mass (g) = moles × molar mass (g/mol)

For example, 0.25 mol of NaCl (M = 58.44 g/mol) has a mass of 0.25 × 58.44 = 14.61 g. This is useful when you need to weigh out a specific number of moles for a reaction or solution.

The calculator on this page is set up for grams-to-moles-to-molarity, but the same principle applies to any pure substance. Just change the molar mass input to match your compound.

Practical Tips for Lab Work

  • Always use an analytical balance that reads to at least 0.001 g for precise work.
  • For solutions, dissolve the solid in a small amount of solvent first, then add solvent to the final volume. This ensures the volume is accurate.
  • Record the actual mass you weighed, not the intended mass. If you weigh 2.930 g instead of 2.922 g, use 2.930 g in the calculation.
  • Check the purity of your reagent. A 98% pure sample contains less active substance than the nominal mass.
  • Follow your lab method, the safety data sheet (SDS) and your supervisor for all bench work.

Frequently Asked Questions

How many moles are in 5 grams of water?
Water has a molar mass of 18.015 g/mol. Divide 5 g by 18.015 g/mol to get 0.2776 mol. So 5 g of water is about 0.28 moles.

What is the molar mass of NaCl?
Using IUPAC abridged atomic weights, sodium is 22.990 g/mol and chlorine is 35.45 g/mol. Adding them gives 58.44 g/mol. This is the mass of one mole of NaCl formula units.

Can I convert grams to moles without knowing the molar mass?
No. The molar mass is essential because it tells you how many grams one mole of that substance weighs. Without it, you cannot relate mass to moles.

Why do I need to convert grams to moles for stoichiometry?
Balanced chemical equations give mole ratios, not mass ratios. Converting grams to moles lets you use those ratios to predict how much product will form or how much reactant you need.

Is molarity the same as moles?
No. Molarity is a concentration: moles of solute per liter of solution. Moles is an amount. For example, 0.05 mol of NaCl dissolved in 0.25 L gives a molarity of 0.2 M. The same 0.05 mol in 0.5 L gives 0.1 M.

What if my substance is a liquid, not a solid?
For liquids, you usually measure volume and density. Convert volume to mass using density (mass = volume × density), then convert mass to moles using molar mass. The calculator here assumes you have the mass directly.

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

The whole Moles & Molar Mass section →