molecalculator

Moles & Molar Mass

Grams to Moles Formula and Worked Example

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

Amount of substance 0.1711 mol
Mass
10 g
Set in the form below
Molar mass
58.44 g/mol
Set in the form below
You enter
Mass (g), Molar mass (g/mol)
You get
Amount of substance (mol)
Rounding
4 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 sample’s mass by the substance’s molar mass: n = m ÷ M. Enter the mass in grams and molar mass in grams per mole; the calculator returns the amount in moles.

Formula

The formula is n = m / M. Here, n is amount of substance in moles (mol), m is mass in grams (g), and M is molar mass in grams per mole (g/mol). Dividing grams by grams per mole cancels the mass unit and leaves moles:

g ÷ (g/mol) = mol

Molar mass is the mass of one mole of a substance. For a pure chemical compound, calculate it by adding the atomic masses of all the atoms in its chemical formula, using the relevant standard atomic weights. For example, water, H2O, has a molar mass of about 18.015 g/mol: two hydrogen atoms contribute 2 × 1.008 g/mol, and one oxygen atom contributes 15.999 g/mol.

Worked Example

Using the calculator’s default values, convert 10 g of a substance with a molar mass of 58.44 g/mol:

  1. Write the relationship: n = m / M.
  2. Substitute the values: n = 10 g / (58.44 g/mol).
  3. Divide: n = 0.1711157 mol.
  4. To the calculator’s four decimal places, the result is 0.1711 mol.

The unit check is useful: the grams cancel, leaving mol. The molar mass in this example is a representative value for sodium chloride, not a universal value; use the molar mass that matches the substance you are calculating.

Assumptions

  • The sample’s mass is entered in grams, and the molar mass is entered in grams per mole.
  • The sample is treated as the stated, pure substance. For mixtures or impure materials, the total measured mass may not equal the mass of the substance of interest.
  • The molar mass is appropriate to the chemical formula and form being counted, including any waters of crystallization where relevant.

How to Find the Molar Mass

Look up a reliable molar mass for the exact substance, or calculate one from its chemical formula and atomic weights. Multiply each element’s atomic weight by the number of atoms shown by its subscript, then add the contributions. Parentheses multiply the atoms inside them by the subscript outside. For instance, Ca(OH)2 contains one calcium atom, two oxygen atoms, and two hydrogen atoms.

For sodium chloride, NaCl, the calculation is approximately 22.990 + 35.45 = 58.44 g/mol. This is why 58.44 g/mol is used as the calculator’s example molar mass. Atomic weights can be reported with slightly different precision in different references; avoid giving the input more precision than your source supports.

Pay attention to the exact formula and physical form. A hydrate contains water molecules as part of its formula, so its molar mass differs from that of the anhydrous compound. Likewise, an ionic compound’s formula represents the ratio of ions in the formula unit; it does not mean that the solid consists of separate molecules.

When to Use the Conversion

Grams measure mass, while moles count chemical amount. Converting between them lets you use balanced chemical equations, compare quantities of different substances, and calculate particle counts. A mole corresponds to exactly 6.02214076 × 1023 specified entities, such as atoms, molecules, or formula units. The entity must be clear: one mole of water means one mole of H2O molecules, whereas one mole of sodium chloride means one mole of NaCl formula units.

The conversion is also the first step in many stoichiometry problems. After converting a measured mass to moles, use the coefficients in a balanced equation to relate the substances. The grams-to-moles formula itself does not predict how much product a reaction will yield; reaction ratios, limiting reactants, purity, and yield may also matter.

For bench work, use the calculation for study or planning only; follow your lab method, the safety data sheet (SDS), and your supervisor.

Common Mistakes and Limits

  • Using the wrong molar mass: Check the chemical formula, charge where relevant, and hydration state. A value for an anhydrous compound may not apply to a hydrate.
  • Mixing units: The calculator expects grams and g/mol. If mass is given in milligrams, convert it to grams by dividing by 1,000 before using the formula. For example, 250 mg = 0.250 g.
  • Reversing the division: Divide mass by molar mass, not molar mass by mass. The latter does not produce a value in moles.
  • Rounding too early: Keep extra digits during intermediate calculations and round the final result to match the precision of the measured mass and molar mass. A calculator’s displayed decimal places do not make the measurements more precise.
  • Treating a mixture as a pure substance: If the sample contains multiple chemicals, one total mass and one molar mass are not enough to determine each component’s amount. You need the composition or the mass of the component of interest.

The equation converts mass to amount; it does not account for measurement uncertainty, contamination, or chemical reactions that may have occurred. Its result is only as reliable as the mass and molar-mass inputs.

Frequently Asked Questions

What is the formula for converting grams to moles?
Divide mass in grams by molar mass in grams per mole: moles = grams ÷ (grams per mole).

How do I convert 1 gram to moles?
Divide 1 g by the molar mass of the substance. There is no single answer for 1 g because different substances have different molar masses.

How many moles are in 10 grams?
It depends on the substance. For a molar mass of 58.44 g/mol, 10 g is 10 ÷ 58.44 = approximately 0.1711 mol.

Can I convert grams to moles without molar mass?
No. You need the identity or formula of the substance to find its molar mass, or a reliable molar-mass value for it.

How do I convert milligrams to moles?
First convert milligrams to grams by dividing by 1,000, then divide the mass in grams by the molar mass in g/mol.

Related

Formula used
in m | Mass | g | 10 | 0
in mm | Molar mass | g/mol | 58.44 | 0.001
out n | Amount of substance | mol | m / mm | 4

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 →