molecalculator

Moles & Molar Mass

Convert Grams to Moles Online: Formula & Calculator

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

Yes, you can convert grams to moles online using the simple formula: moles = mass (g) ÷ molar mass (g/mol). Enter the mass of your substance and its molar mass (from the periodic table or a compound’s molecular weight), and you get the number of moles instantly. This page provides a calculator, the formula, worked examples, and common pitfalls to help you do the conversion correctly every time.

Formula

The core conversion is expressed as:

n = m / M

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

For the calculator above, we also compute molarity (concentration) using the volume of solution you enter:

c = n / V (where V is in liters, so mL must be converted by dividing by 1000).

The molar mass is the mass of one mole of a substance. For an element, it is the 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 formula. For example, NaCl: Na (22.990) + Cl (35.45) = 58.44 g/mol.

Worked Example

Let’s use the default values from the calculator: you have 2.922 g of sodium chloride (NaCl, molar mass = 58.44 g/mol) and you dissolve it in 250 mL of water.

  1. Calculate moles: n = 2.922 g ÷ 58.44 g/mol = 0.05000 mol (exactly 0.05 mol).
  2. Convert volume to liters: 250 mL ÷ 1000 = 0.250 L.
  3. Calculate molarity: c = 0.05000 mol ÷ 0.250 L = 0.2000 mol/L (or 0.2000 M).
  4. Convert to millimolar: 0.2000 mol/L × 1000 = 200.0 mM.

The calculator shows 0.2 mol/L (rounded to 4 decimals) and 200 mM, matching our manual calculation.

Assumptions

  • The substance is pure; no impurities or hydrates (unless accounted for in the molar mass).
  • The molar mass is correct for the exact chemical form (e.g., anhydrous vs. hydrated).
  • For molarity, the volume is the final solution volume, not the volume of solvent added. (This is a common mistake; see below.)
  • Temperature and pressure do not affect the conversion from grams to moles (they only matter for gases, where volume is involved).

How to Find Molar Mass

You need the molar mass to convert grams to moles. Here’s how to get it:

  • Elements: Look up the atomic weight on the periodic table (e.g., oxygen = 15.999 g/mol).
  • Compounds: Add the atomic weights of all atoms. For water (H₂O): 2 × 1.008 + 15.999 = 18.015 g/mol.
  • Hydrates: Include the water of crystallization. For CuSO₄·5H₂O, add 5 × 18.015 to the anhydrous mass.
  • Polymers and large molecules: Use the average molecular weight (e.g., for DNA, a common average is 617.96 g/mol per base pair for the free-acid form; the sodium salt is ~650 g/mol).

Common Mistakes and Pitfalls

  • Unit mix-ups: Grams must be in grams, molar mass in g/mol. If you have milligrams, convert to grams first (divide by 1000).
  • Volume vs. solvent: When making a solution, the final volume (after adding solute) matters, not the volume of solvent you started with. Always use a volumetric flask.
  • Rounding too early: Round only at the end. For example, using 58.4 instead of 58.44 for NaCl changes the result slightly; for precise work, use at least 4 significant figures.
  • Confusing molar mass with molecular weight: They are numerically the same, but molar mass has units g/mol, while molecular weight is dimensionless (amu).
  • Forgetting hydrates: If you weigh a hydrated salt, the molar mass must include the water molecules, or your moles will be wrong.

Why Convert Grams to Moles?

Moles are the chemist’s counting unit. A mole contains 6.022 × 1023 particles (Avogadro’s number). Converting grams to moles lets you:

  • Use stoichiometry: Balance reactions and predict product amounts.
  • Prepare solutions: Calculate how much solute to weigh for a desired molarity.
  • Compare reactants: Determine limiting reagents.
  • Convert to molecules/atoms: Multiply moles by Avogadro’s number to get particle counts.

For example, if you need 0.5 M NaCl in 1 L, you need 0.5 moles. Multiply by molar mass (58.44 g/mol) to get 29.22 g. That’s the mass to weigh.

Online Converters vs. Manual Calculation

Online calculators are convenient, but you must understand the math to verify results. A good converter will:

  • Allow you to input mass and molar mass (or select a compound).
  • Show the formula and steps.
  • Handle units (g, mg, kg) and scientific notation.

However, no calculator can know the purity of your sample or whether your compound is hydrated. Always double-check the molar mass you enter.

Frequently Asked Questions

How many moles are in 10 grams of water?

Water has a molar mass of 18.015 g/mol. So moles = 10 g ÷ 18.015 g/mol = 0.555 moles. This means 10 g of water contains about 0.555 × 6.022 × 1023 = 3.34 × 1023 molecules.

Can I convert grams to moles without a calculator?

Yes, you can do it by hand using the formula n = m/M. You need the molar mass, which you can find on a periodic table. For a compound, sum the atomic masses of its elements. Then divide the mass by the molar mass. For example, 5 g of sodium chloride (58.44 g/mol) is 5 ÷ 58.44 = 0.0856 moles.

What is the difference between molar mass and molecular weight?

They are numerically identical but have different units. Molar mass is expressed in grams per mole (g/mol) and is used in calculations. Molecular weight (or molecular mass) is the sum of atomic masses in atomic mass units (amu or Da). For example, water has a molecular weight of 18.015 amu and a molar mass of 18.015 g/mol.

How do I convert moles back to grams?

Multiply the number of moles by the molar mass. For example, 0.25 moles of NaCl (58.44 g/mol) is 0.25 × 58.44 = 14.61 grams. This is the reverse of the grams-to-moles conversion.

Why do I need to convert grams to moles for chemistry?

Because chemical reactions happen between particles (atoms, molecules, ions), not between grams. Moles give you a count of particles. Using grams alone, you can’t compare amounts of different substances because their particles have different masses. Moles allow you to use the coefficients in a balanced equation to predict yields.

Does the conversion change for gases?

No, the grams-to-moles conversion is the same for gases. However, if you need volume, you must use the ideal gas law (PV = nRT) at a given temperature and pressure. At STP (0 °C, 1 atm), one mole of an ideal gas occupies 22.414 liters, but this is not a universal constant for all conditions.

Always follow your lab method, the safety data sheet (SDS) and your supervisor when handling chemicals. Use the calculator as a study aid, not a substitute for understanding the underlying chemistry.

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 →