Advertisement
Loading...

Grams to Moles Calculator

Type a formula using element symbols and numbers. Subscript digits (₂) are supported.

Overrides the formula parser. Useful for complex compounds or mixtures.

Enter a mass or moles and a substance

Select a calculation mode, enter a chemical formula or element symbol, then provide the mass (g) or number of moles to see the conversion result.

Advertisement
Loading...

How to Use This Calculator

1

Choose a Calculation Mode

Click 'Grams → Moles' if you know the mass and want the mole count, or 'Moles → Grams' if you know the moles and need the mass. The input field switches automatically.

2

Enter the Chemical Formula

Type the chemical formula in the substance field (e.g., H2O for water, NaCl for salt, C6H12O6 for glucose). Or click one of the quick-select compound buttons. The molar mass is calculated automatically from the formula.

3

Enter the Mass or Moles

Type the known value — mass in grams (for Grams → Moles mode) or the number of moles (for Moles → Grams mode). Results update instantly as you type.

4

Read the Results

The main result shows moles or grams. Below that you will see molar mass, molecule count (in scientific notation), and an elemental composition bar chart showing each element's mass percentage in the compound.

Frequently Asked Questions

How do I convert grams to moles?

Divide the mass in grams by the molar mass of the substance (in g/mol). The formula is n = m / M, where n is moles, m is mass, and M is molar mass. For example, to convert 36 g of water (molar mass 18.015 g/mol) to moles: n = 36 / 18.015 ≈ 2.0 mol. This calculator does the division automatically as soon as you enter the formula and mass. The molar mass is computed by summing the atomic masses of all atoms in the formula — you do not need to look them up separately.

How do I convert moles to grams?

Multiply the number of moles by the molar mass: m = n × M. Switch the calculator to 'Moles → Grams' mode, enter your substance, then type the mole count. For example, 2.5 mol of NaCl (molar mass 58.44 g/mol) equals 2.5 × 58.44 = 146.1 g. This reverse calculation is just as common in the lab — for instance when you need to weigh out a specific number of moles for a reaction and need to know how many grams to put on the balance.

What is Avogadro's number and why does it appear in results?

Avogadro's number (Nₐ = 6.02214076 × 10²³) is the number of atoms, ions, or molecules in one mole of a substance. It provides a link between the macroscopic scale (grams) and the atomic scale (individual particles). Multiplying moles by Nₐ gives the number of molecules in your sample. For example, 1 mol of H₂O contains 6.022 × 10²³ water molecules. This figure is useful in physical chemistry, spectroscopy, and any context where you need to know the actual particle count rather than just the amount in moles.

What is molar mass and where do the values come from?

Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). For pure elements, the molar mass equals the standard atomic weight published by IUPAC, which is the weighted average of all naturally occurring isotopes. For compounds, it is the sum of the atomic weights of all atoms in the molecular formula. The atomic masses used in this calculator are based on the 2021 IUPAC standard atomic weights, rounded to three to four decimal places. For most lab and classroom purposes these values are accurate enough; for isotope-specific work, consult enriched-isotope data.

Can I use this for organic molecules like glucose or aspirin?

Yes. Enter the molecular formula in the substance field — for example C6H12O6 for glucose or C9H8O4 for aspirin. The parser reads each element symbol and its subscript count, multiplies by the atomic mass, and sums the contributions. The elemental composition chart will show the mass percentage of each element (carbon, hydrogen, oxygen) and how they add up to the total molar mass. This is useful for verifying empirical formulas and understanding mass fractions in organic chemistry or nutrition science.

What should I do if my compound is not recognised?

The formula parser supports 32 common elements. If you enter a formula containing an element outside this set, or a formula with parentheses (like Ca(OH)₂), the calculator will show an error. In that case, look up the molar mass from a reference source (e.g., PubChem or a CRC Handbook) and enter it in the 'Molar Mass Override' field. The calculator will then use your value for the conversion. This also works for mixtures, polymers, or any substance where the exact molecular formula is not available.