Skip to content

Moles and Grams Converter

Updated: 5 comments

Convert a substance’s mass in grams to moles. Enter the Mass of substance and its Molar mass to calculate the Amount of substance.

Grams ↔ Moles Conversion Tool

Input Fields
m
g
Enter the mass of the substance in grams
M
g/mol
Enter the molar mass of the substance (e.g. H₂O = 18.015 g/mol)
If enabled, the result will update automatically when you change any value.

Moles and Grams Formula

Formula
\[ n = \frac{m}{M} \]

Where:

  • \(n\) — amount of substance (mol)
  • \(m\) — mass of substance (g)
  • \(M\) — molar mass (g/mol)

Dividing a substance’s mass by its molar mass gives its amount in moles. The units cancel as \(\mathrm{g}\div(\mathrm{g/mol})=\mathrm{mol}\).

Moles and Grams – Calculation Example

Example: Find the amount of water in an 18 g sample. Use water’s molar mass of 18.015 g/mol, the calculator’s default values.

\[ n = \frac{18\ \mathrm{g}}{18.015\ \mathrm{g/mol}} \approx 0.99917\ \mathrm{mol} \]

Result: 18 g of water is approximately 0.99917 mol.

How to use the calculator

  1. Enter the sample’s mass in the Mass of substance field, in grams. Use the mass of the specific substance you want to convert, not the combined mass of a mixture unless that mixture is the substance being measured.
  2. Enter that substance’s Molar mass in grams per mole (g/mol). For example, use 18.015 g/mol for water.
  3. Read Amount of substance in moles (mol). The result is the entered mass divided by the entered molar mass.

To try the example above, leave the default values of 18 g and 18.015 g/mol in place. If your mass is in milligrams or kilograms, convert it to grams before entering it.

What grams and moles tell you

Grams measure mass; moles measure amount of substance. One mole corresponds to exactly \(6.02214076\times10^{23}\) specified entities, such as molecules, atoms, or ions. A mass alone does not tell you how many moles you have, because substances differ in the mass of their constituent particles. For example, a gram of a substance with a low molar mass contains more moles than a gram of a substance with a high molar mass.

Molar mass connects these two measurements. A substance with a molar mass of 18.015 g/mol has a mass of 18.015 g per mole. Dividing any sample mass in grams by 18.015 g/mol therefore gives the amount of that substance in moles. The calculator performs this grams-to-moles conversion only: it accepts a mass and a molar mass, then returns moles.

Moles are useful when interpreting chemical equations, whose coefficients describe ratios of amounts of substance rather than ratios of masses. They also help with solution calculations. Once you know the moles of dissolved solute, you can use the solution volume to find its molar concentration. Be sure that the mass you enter belongs to the solute, rather than to the entire solution.

Assumptions and practical tips

Choose the correct molar mass. The calculator does not identify a chemical from its name or formula. Find the molar mass for the exact substance or chemical formula you are using. For a compound, add the atomic masses of all atoms in its formula. A hydrate, for example, has a different molar mass from its anhydrous form. Enter a positive molar mass; a value of zero cannot be used as a divisor.

Keep units consistent. Enter mass in grams and molar mass in g/mol. If a balance reports milligrams, divide that reading by 1,000 to obtain grams. If it reports kilograms, multiply by 1,000. For other unit prefixes, a metric prefix converter can help you check the scale before entering the mass.

Interpret precision sensibly. The calculated number of moles depends on both inputs. If the sample mass is approximate or the molar mass is rounded, extra digits in the result do not make it more accurate. In the default example, 18 g divided by 18.015 g/mol is slightly less than one mole; whether to report it as 0.999 mol or about 1 mol depends on how precisely the 18 g mass was measured.

Converting in the other direction? To calculate grams from a known number of moles, rearrange the same relationship to \(m=nM\): multiply moles by molar mass in g/mol. This calculator does not have a moles input, so that reverse calculation must be done separately.

Frequently Asked Questions

How do I find the molar mass of a compound from its formula?

Multiply each element’s atomic mass by the number of its atoms in the formula, then add the results. For \(\mathrm{Ca(OH)_2}\), count one calcium, two oxygen, and two hydrogen atoms. Using approximate atomic masses gives \(40.08+2(16.00)+2(1.008)=74.096\ \mathrm{g/mol}\). Check parentheses and subscripts carefully; overlooking either changes the result.

Is one mole a normal or good amount of a substance?

There is no universally normal or good number of moles. An appropriate amount depends on the experiment or reaction. One mole is a counting unit, not a target: it represents the same number of specified particles for every substance, but its mass varies with molar mass. Compare your result with the quantities required by your procedure or chemical equation.

How do I calculate moles if my sample is not pure?

Use the mass of the substance of interest, not the mass of the entire impure sample. If purity is given as a mass percentage, multiply the sample mass by that percentage as a decimal first. For example, a 10 g sample that is 80% pure contains 8 g of the target substance. Then divide 8 g by its molar mass.

How can I convert moles to molecules, atoms, or formula units?

Multiply the amount in moles by \(6.02214076\times10^{23}\) entities per mole. Name the entity you are counting: one mole of \(\mathrm{H_2O}\) contains that many water molecules, but twice as many hydrogen atoms. For ionic compounds, count formula units rather than molecules, and use the chemical formula to determine the number of each ion.

How do I use moles to find a solution’s molarity?

Divide the moles of dissolved solute by the final solution volume in liters: \(c=n/V\). For example, 0.50 mol of solute in 2.0 L of solution has a molarity of 0.25 mol/L. Use the volume of the finished solution, not just the volume of solvent added, because dissolving a substance can change the total volume.

Can I enter zero or a negative mass?

A zero mass corresponds to zero moles when the molar mass is positive. A negative mass may produce a numerical result, but it does not represent a physical amount of substance; check the sign of your entry. Molar mass must also be positive. A zero molar mass makes division impossible, while a negative molar mass is not physically meaningful.

How do I use the result in a balanced chemical equation?

Use the equation’s coefficients as mole ratios. In \(2\mathrm{H_2}+\mathrm{O_2}\rightarrow2\mathrm{H_2O}\), 2 mol of hydrogen react with 1 mol of oxygen to produce 2 mol of water, assuming complete reaction. If amounts of multiple reactants are known, check which runs out first; that limiting reactant determines the maximum amount of product.

Leave a Reply

Your email address will not be published. Required fields are marked *

5 thoughts on “Moles and Grams Converter”