molecalculator

Moles & Molar Mass

Grams to Moles Example Problems

Calculator No. 01-10544 · 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.

This calculator converts a mass of a substance in grams to an amount in moles using its molar mass. You enter the mass, the molar mass, and the calculator returns the number of moles. The formula is simply moles = mass ÷ molar mass, the most fundamental conversion in stoichiometry.

Formula

The core conversion is:

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)

The calculator also uses this to find molarity: c = n / V, where V is the volume in liters (mL ÷ 1000).

Worked Example

Using the default values from the calculator: mass = 2.922 g of NaCl, molar mass = 58.44 g/mol, final volume = 250 mL.

  1. Moles of NaCl: n = 2.922 g ÷ 58.44 g/mol = 0.05000 mol (exact to 5 significant figures).
  2. Volume in liters: 250 mL ÷ 1000 = 0.250 L.
  3. Molarity: c = 0.05000 mol ÷ 0.250 L = 0.2000 mol/L.
  4. Millimolar: 0.2000 mol/L × 1000 = 200.00 mM.

The calculator shows the same result: 0.2000 mol/L and 200.00 mM.

Assumptions

  • The molar mass is the average atomic weight of the substance (e.g., NaCl = 58.44 g/mol).
  • The substance is pure and fully dissolved; no hydration or impurities are considered.
  • The final volume is used (not the solvent volume) when preparing a solution.
  • Temperature and pressure do not affect mass-to-mole conversions for solids.

Why Grams to Moles Matters

Chemical reactions happen between particles (molecules, formula units, atoms), not between grams. The mole is the bridge between the macroscopic world (grams you can weigh) and the microscopic world (counts of particles). One mole contains exactly 6.02214076 × 1023 entities (Avogadro’s constant). When you balance a chemical equation, the coefficients tell you the mole ratio, so you must convert grams to moles to use those ratios. For example, the reaction 2 H2 + O2 → 2 H2O means 2 moles of H2 react with 1 mole of O2. If you weigh 4.0 g of H2, that is 4.0 g ÷ 2.016 g/mol ≈ 1.98 mol, so you need about 0.99 mol of O2 (≈ 31.7 g).

How to Choose the Correct Molar Mass

The molar mass must match the chemical formula you are using. For elements, use the atomic weight from the periodic table (e.g., carbon = 12.011 g/mol). For compounds, add the atomic weights of all atoms in the formula. For example:

  • 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
  • Calcium carbonate (CaCO3): 40.078 + 12.011 + 3×15.999 = 100.086 g/mol

Be careful with hydrated salts: the molar mass must include the water of crystallization (e.g., CuSO4·5H2O has a different molar mass than anhydrous CuSO4). Also, for ionic compounds, the formula unit is used, not individual ions.

Common Example Problems

Here are three typical problems you might see in a chemistry class:

  1. Convert 25.0 g of NaOH to moles. Molar mass of NaOH = 22.990 + 15.999 + 1.008 = 39.997 g/mol. Moles = 25.0 g ÷ 39.997 g/mol = 0.625 mol.
  2. How many grams are in 0.750 mol of CO2? Molar mass of CO2 = 12.011 + 2×15.999 = 44.009 g/mol. Mass = 0.750 mol × 44.009 g/mol = 33.0 g.
  3. Prepare 500 mL of a 0.100 M solution of KCl. Molar mass of KCl = 39.098 + 35.45 = 74.548 g/mol. Moles needed = 0.100 mol/L × 0.500 L = 0.0500 mol. Mass = 0.0500 mol × 74.548 g/mol = 3.73 g.

Notice that the third problem combines grams-to-moles with molarity: you first find moles from volume and concentration, then convert to grams.

Common Mistakes and How to Avoid Them

  • Using the wrong molar mass – always double-check the formula and atomic weights. For example, using 58.44 for NaCl is correct, but using 58.44 for NaNO3 (which is 84.99) is wrong.
  • Forgetting to convert mL to L – molarity is moles per liter, so if you have volume in mL, divide by 1000 before using it.
  • Rounding too early – keep at least 4 significant figures in intermediate steps to avoid rounding errors in the final answer.
  • Confusing mass and moles – grams are a measure of mass, moles are a count of particles. They are not interchangeable.
  • Not including units in the calculation – write the units each step; it helps catch mistakes like dividing when you should multiply.

Limits of the Conversion

The grams-to-moles conversion is exact for pure substances with a known formula. However, real-world samples may contain impurities, water, or isotopic variations that change the effective molar mass. For example, “household salt” may contain anti-caking agents, so weighing 58.44 g of it does not give exactly 1.000 mol of NaCl. Also, for gases, the ideal gas law (PV = nRT) is often used instead, but the mass-to-mole conversion still applies. Finally, the molar mass of an element is an average of its isotopes; for precise work with a specific isotope, use the isotopic mass.

Frequently Asked Questions

How do I find the molar mass of a compound?

Add the atomic masses of all atoms in the chemical formula. Use the periodic table; for example, H2SO4 is 2×1.008 + 32.06 + 4×15.999 = 98.078 g/mol. For hydrated compounds, add the mass of water molecules too.

Can I convert grams to moles for any substance?

Yes, as long as you know the chemical formula and the atomic weights. For mixtures, you cannot do a single conversion; you need to know the composition. For polymers or proteins, use the average molar mass (e.g., for DNA, the average mass per base pair).

What is the difference between molar mass and molecular weight?

They are numerically the same but have different units. Molar mass is in g/mol; molecular weight is a dimensionless ratio (relative to 1/12 of carbon-12). In practice, people use them interchangeably.

Why is Avogadro’s number 6.022 × 1023?

It is defined as the number of atoms in exactly 12 grams of carbon-12. This number was chosen so that the molar mass of a substance in grams equals its atomic/molecular weight in atomic mass units. It is an exact constant: 6.02214076 × 1023 mol−1.

How do I convert moles back to grams?

Multiply the number of moles by the molar mass: mass (g) = moles × molar mass (g/mol). For example, 0.500 mol of NaCl × 58.44 g/mol = 29.22 g.

Does temperature or pressure affect the grams-to-moles conversion?

No, for solids and liquids, mass and moles are independent of temperature and pressure. For gases, the volume changes with conditions, but the mass-to-mole conversion still uses the same formula.

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 →