Free laboratory calculators for the bench

Calculating Moles: Mass to Moles Calculator

Convert a mass to moles and particles, or moles back to grams, using the molar mass from a formula or a number.

Open on LabInstSource

Embed

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Please keep the credit link below the tool.

Calculating moles from a mass is one division: moles = mass ÷ molar mass. This mass to moles calculator converts a mass in grams (or mg, µg, kg, oz, or lb) into moles that way. It also works in the other direction, from moles to mass, and can convert between moles and a number of particles. You can type the molar mass yourself or let the tool calculate it from a chemical formula such as NaCl, H2O, or C6H12O6. The calculator runs in your browser, is free, and needs no sign-up. Nothing you enter is uploaded. Use it for stoichiometry homework, for weighing out reagents, or to check how many molecules a sample contains.
Calculating moles example

How to use the mass to moles calculator

  1. In Convert, choose mass → moles (and particles). The other modes are moles → mass, moles → number of particles, and number of particles → moles (and mass).
  2. Enter the mass in the box and select its unit: g, mg, µg, kg, oz, or lb.
  3. Enter the molar mass in g/mol. You can type it directly, or type a chemical formula such as NaCl, H2O, or C6H12O6 and let the tool calculate the molar mass.
  4. Read the result in moles. The tool shows amounts in mol, mmol, µmol, or nmol, and it also gives the number of particles.
  5. Check the “How it was calculated” section under the result. It lists the formula and each step with your numbers, so you can confirm the working.
  6. If you see a warning about an unusual molar mass or a result of fewer than one particle, check your formula or units before you use the answer.

Use Copy result to copy the result lines with a link, or Copy link to copy the page address. The address stores every input (after ?s=), so the same calculation reopens later. Print / save as PDF prints the inputs, results, calculation steps, and the date, which is useful for lab records.

How do you convert mass to moles (mass to moles formula)?

To convert mass to moles, divide the mass in grams by the molar mass in grams per mole. The formula is n = m ÷ M, where n is the amount in moles, m is the mass in grams, and M is the molar mass in g/mol. The molar mass is the mass of one mole of a substance, and it comes from the atomic masses of the elements in the formula.

For example, 25 g of NaCl has a molar mass of about 58.44 g/mol. Dividing 25 by 58.44 gives 0.4278 mol. Going the other way, m = n × M, so 0.25 mol of glucose (C6H12O6) has a mass of 0.25 × 180.16 = 45.04 g.

Always check units before dividing. If your mass is in mg or oz, convert it to grams first, or let the tool handle the conversion. The tool’s calculation steps show each unit change.

How many particles are in a mole (Avogadro’s number)?

One mole contains 6.02214076 × 10²³ particles. This number is the Avogadro constant, NA, and it is written in mol⁻¹. Since the 2019 SI redefinition, its value is exact. The particles can be atoms, molecules, or formula units, depending on the substance.

To find the number of particles, multiply the amount in moles by NA: N = n × NA. To go the other way, divide the particle count by NA: n = N ÷ NA. Continuing the NaCl example, 0.4278 mol × 6.02214076 × 10²³ gives 2.576 × 10²³ formula units.

Worked example: from molecules back to grams

Particle counts work in reverse too. A sample with 3.011 × 10²³ molecules of carbon dioxide contains 3.011 × 10²³ ÷ 6.022 × 10²³ = 0.5 mol. CO2 has a molar mass of 44.01 g/mol, so the sample weighs 0.5 × 44.01 = 22 g. Choose “Number of particles → moles (and mass)”, type 3.011e23 and the formula CO2, and the calculator returns both numbers. If you leave out the molar mass in this mode you still get the moles, just not the grams.

Sources

Formulas and data used by this calculator (checked October 2026):

Worked examples

InputResult
25 g NaCl0.4278 mol (2.576 × 10²³)
1 oz H2O1.574 mol (9.477 × 10²³)
0.25 mol C6H12O645.04 g
2 mmol1.204 × 10²¹
3.011e23 CO20.5 mol = 22 g

Calculated by the tool above with these values.

Frequently asked questions

How do you calculate moles from grams?

Divide the mass in grams by the molar mass in g/mol. For example, 25 g of NaCl (molar mass about 58.44 g/mol) gives 0.4278 mol.

How do you convert moles to grams?

Multiply the number of moles by the molar mass. For example, 0.25 mol of C6H12O6 gives 0.25 × 180.16 = 45.04 g.

How many moles of water are in 1 ounce?

One US avoirdupois ounce is 28.35 g, and water (H2O) has a molar mass of 18.015 g/mol, so 1 oz of water is 28.35 ÷ 18.015 = 1.574 mol, or about 9.48 × 10²³ molecules. Choose oz as the mass unit and the calculator converts it for you.

How do you calculate molarity using solute moles?

Divide the moles of solute by the volume of the solution in litres. For example, 0.5 mol of solute dissolved to make 2 L of solution gives 0.5 ÷ 2 = 0.25 mol/L (0.25 M). If your volume is in millilitres, convert it to litres first.

Can I use units other than grams?

Yes. The mass can be entered in g, mg, µg, kg, oz, or lb, and the results can be shown in mol, mmol, µmol, or nmol. The calculator converts the units for you.

Is my data sent anywhere?

No. The calculator runs entirely in your browser, nothing is uploaded, and no sign-up is needed.