Percentages and Math

Moles to Grams Calculator

Type a formula and an amount to convert between moles and grams.

Your numbers

Moles or grams, depending on the direction above.

Capital letters start each element, for example NaCl, Ca(OH)2 or CuSO4.5H2O.

More options

If you fill this in, it is used and the formula is ignored.

Result

Mass

45.0375 g

2.5 mol of H2O.

Molar mass
18.015 g/mol
Moles
2.5
Grams
45.0375
Particles (molecules or formula units)
1.5055 x 10^24

Molar mass by element

ElementAtomsAtomic massSubtotal (g/mol)
H21.0082.016
O115.99915.999
Total18.015
How this was calculated
  1. Molar mass of H2O = 2 x 1.008 + 1 x 15.999 = 18.015 g/mol.
  2. Grams = moles x molar mass = 2.5 x 18.015 = 45.0375 g.
  3. Particles = moles x 6.02214076 x 10^23 = 1.50554 x 10^24.
  • Atomic masses are rounded to the precision most textbooks print, so your answer may differ in the last digit from a table with more digits. Check which values your course or lab uses.

Calculated using SumPanda.com · https://sumpanda.com/moles-to-grams-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the moles to grams calculator

  1. Choose moles to grams or grams to moles.
  2. Type the chemical formula, such as H2O, NaCl, Ca(OH)2 or CuSO4.5H2O, with capital letters starting each element.
  3. Enter the amount in moles or grams.
  4. Read the molar mass, the amount in the other unit, the number of particles and the mass contributed by each element. Open More options to enter a molar mass yourself.

Formula

molar mass = sum of (atoms of each element x its atomic mass)

grams = moles x molar mass

moles = grams / molar mass

particles = moles x 6.02214076 x 10^23

Avogadro's constant is exact by definition. Atomic masses are rounded to the precision most textbooks print.

Water and salt

Water, H2O, has 2 hydrogen at 1.008 and 1 oxygen at 15.999, so the molar mass is 18.015 g/mol. Two and a half moles weigh 2.5 x 18.015 = 45.0375 grams and contain 2.5 x 6.02214076 x 10^23 = 1.5055 x 10^24 molecules.

Table salt, NaCl, is 22.99 + 35.45 = 58.44 g/mol, so 100 grams is 100 / 58.44 = 1.711157 moles, or 1.0305 x 10^24 formula units. Glucose, C6H12O6, is 180.156 g/mol, sulfuric acid H2SO4 is 98.072, and copper sulfate pentahydrate, CuSO4.5H2O, is 249.677 with these rounded masses.

Writing a formula

Write each element symbol with a capital first letter and an optional lowercase second letter, followed by the number of atoms if more than one. Use round or square brackets for groups, with a number after the closing bracket, such as Al2(SO4)3 or K4[Fe(CN)6]. For a hydrate, put a dot between the parts and a number in front of the water, as in CuSO4.5H2O.

The list covers about fifty common elements. If your formula uses an element not on the list, the page tells you, and you can enter the molar mass yourself instead.

Why answers can differ in the last digit

Atomic masses are measured values that are revised from time to time, and some elements have a range. Textbooks round them differently, so a molar mass can differ by a few thousandths between sources. Use the masses your course or lab provides when an exact match matters, by entering the molar mass in More options.

Related science and math tools

Write very large or small results with the Scientific Notation Converter, convert other units in the Unit Converter, measure agreement with the Percent Error Calculator, and scale mixtures with the Ratio Calculator.

Assumptions and limits

  • The formula is for a single substance, and charges and isotopes are not used.
  • Atomic masses are conventional values rounded to three or four digits.
  • Hydrates use a dot and a number to multiply the part that follows.
  • The particle count is the number of formula units, not the number of atoms.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do you convert moles to grams?

Multiply the number of moles by the molar mass in grams per mole. For 2.5 moles of water, 2.5 x 18.015 gives 45.0375 grams.

How do you find the molar mass of a compound?

Multiply the number of atoms of each element by its atomic mass and add them. For H2O that is 2 x 1.008 + 15.999 = 18.015 g/mol.

How many molecules are in a mole?

A mole contains 6.02214076 x 10^23 particles, which is Avogadro's constant. Two and a half moles of water hold about 1.5055 x 10^24 molecules.

Can I enter a hydrate such as copper sulfate pentahydrate?

Yes. Write CuSO4.5H2O with a dot before the 5H2O. The page multiplies the water by 5 and adds it to the rest of the formula.