A grams-to-moles conversion calculator finds the amount of a substance in moles from its mass in grams and molar mass in grams per mole. Enter those two values to get the number of moles; this page uses water as a worked example and also shows how to calculate molar mass when needed.
Formula
Divide the mass by the molar mass:
n = m / M
- n is the amount of substance, in moles (mol).
- m is the sample mass, in grams (g).
- M is the substance’s molar mass, in grams per mole (g/mol).
The units cancel as intended: g ÷ (g/mol) = mol. This calculator assumes the mass and molar mass refer to the same substance and that the supplied molar mass is appropriate for the material being counted. It does not identify a substance or determine its molar mass automatically.
Worked Example
Using the calculator’s default values, the sample mass is 18.015 g and the molar mass is 18.015 g/mol.
- Write the formula: n = m / M.
- Substitute the values: n = 18.015 g / 18.015 g/mol.
- Divide and cancel grams: n = 1 mol.
The calculator displays 1.0000 mol to four decimal places. The extra displayed digits do not imply that every real sample mass or molar mass is known to that precision.
Assumptions
- The sample is represented by one defined chemical substance or formula unit.
- The entered mass and molar mass use grams and grams per mole, respectively.
- The input mass is the mass of the substance being counted, not a container, solvent, or mixture unless its composition is accounted for separately.
- No reaction, purity correction, or composition analysis is included.
How to Use the Conversion
Enter the measured mass in grams and the molar mass in g/mol. The answer is the corresponding amount in mol. If your mass is in milligrams or kilograms, convert it to grams first: 1 g = 1,000 mg and 1 kg = 1,000 g. Alternatively, convert both quantities consistently before dividing; do not mix units without conversion.
Use a molar mass for the exact chemical formula and form of the material. For a pure compound, calculate it by adding the atomic masses of all atoms in its formula. For example, water is H2O. With the standard atomic weights H = 1.008 and O = 15.999, its molar mass is 2 × 1.008 + 15.999 = 18.015 g/mol. Therefore, 36.030 g of water corresponds to 36.030 / 18.015 = 2.000 mol.
For a compound with parentheses or subscripts, count each atom according to the complete formula. In Ca(OH)2, for instance, there are two oxygen atoms and two hydrogen atoms per formula unit. Use the periodic table values appropriate to the calculation; standard atomic weights can be reported with varying precision, so avoid implying more precision than the mass data justify.
What the Result Means
A mole is a unit for amount of substance. One mole contains exactly 6.02214076 × 1023 specified entities, such as molecules, atoms, ions, or formula units. The entity must be clear: one mole of water means one mole of H2O molecules, while one mole of sodium chloride means one mole of NaCl formula units.
The conversion changes mass into amount; it does not directly give the number of individual particles. To estimate entities, multiply the mole result by Avogadro’s constant, 6.02214076 × 1023 entities/mol. For example, 1 mol of water contains that many water molecules. For ionic compounds, be precise about whether you mean formula units or the total number of ions represented after dissociation.
Moles are useful because chemical equations relate reacting substances through mole ratios. Once a mass has been converted to moles, stoichiometric calculations can use the balanced equation to determine theoretical amounts of reactants or products. The conversion alone does not establish how much will actually react or be recovered.
Common Errors and Limits
- Using the wrong molar mass: Similar names can refer to different formulas, hydrates, salts, or physical forms. Check the formula and any waters of crystallization.
- Reversing the operation: Grams to moles is mass divided by molar mass. Moles to grams is moles multiplied by molar mass.
- Mixing units: A mass in milligrams cannot be divided directly by a molar mass in g/mol unless the mass is first converted to grams.
- Ignoring purity or mixtures: The calculator treats the entered mass as the amount of the specified substance. If a sample contains impurities, the mass of the target substance may be lower.
- Over-rounding: Keep guard digits during intermediate calculations and round the final result to a precision supported by the inputs.
For a solution, the calculator gives moles only if the mass of solute and its molar mass are known. It does not calculate molarity without a final solution volume: molarity is moles per litre of solution. For a mixture with unknown composition, mass alone cannot tell how many moles of each component are present.
Frequently Asked Questions
How do I convert grams to moles?
Divide the mass in grams by the substance’s molar mass in g/mol. The result is in moles.
What is the formula for grams to moles?
Use n = m / M, where n is moles, m is mass in grams, and M is molar mass in grams per mole.
How do I find molar mass?
Add the atomic masses of every atom shown in the chemical formula, accounting for subscripts and parentheses. The result is expressed in g/mol.
Can I convert milligrams to moles?
Yes. First convert milligrams to grams by dividing by 1,000, then divide by molar mass in g/mol.
Is one mole the same for every substance?
One mole always represents the same number of specified entities, but its mass depends on the substance’s molar mass.
Why does my answer differ from another calculator?
Check the chemical formula, molar-mass precision, units, and rounding. Different atomic-weight rounding or a different salt or hydrate form can change the result.
Related
Formula used
in m | Mass | g | 18.015 | 0 in mm | Molar mass | g/mol | 18.015 | 0 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
- Molecules to Grams Calculator: Convert with Molar Mass18.0150 g
- How Many Protons Are in Potassium (K)?19 protons
- Moles of Electrons: Formula and Calculator
- Molecules to Liters Calculator: Convert Using Molarity0.1000 L
- How to Calculate mL to Moles: Formula and Calculator0.1250 mol
- Free Energy Change Calculation: ΔG Formula and Example-24.907 kJ/mol