Skip to content
Chemistry

Grams to Moles Calculator

Convert between mass and moles in either direction. Pick a common substance to auto-fill its molar mass, or enter any value. Switch mass units between milligrams, grams and kilograms, and see the result in moles, millimoles or micromoles alongside the particle count.

Your details

Choose which quantity to solve for. The other two fields become your inputs.
Selecting a substance auto-fills its molar mass. Choose "Custom" to enter any value.
The mass you weighed out. Switch units between grams, milligrams and kilograms.
Choose the mole unit for the result. Useful for small biochemistry or pharmacology quantities.
Amount of substance
1.000278mol
Amount (selected unit)1.0003
Mass of sample18.02g
Mass (selected unit)-
Molar mass18.015g/mol
Number of particles602,381,218,402,442,300,000,000particles
Millimoles1,000.278mmol
Micromoles1,000,277.546umol
Millimoles (mmol)1,000.278
Micromoles (umol)1,000,277.546

18.02 g corresponds to 1.0003 mol of substance.

  • That is 1,000.2775 mmol, 1,000,277.5465 umol, or about 6.024e+23 individual particles.
  • Moles = mass / molar mass, so the answer is only as accurate as the molar mass you enter.
  • Molar mass is the sum of the standard atomic weights of all atoms in the molecular formula.
  • This is a typical bench-chemistry quantity.

Next stepNeed to go the other way? Switch the mode above to "Mass from moles" to convert an amount back into grams.

Formula

n=mMorm=n×Mn = \dfrac{m}{M} \quad \text{or} \quad m = n \times M

Worked example

You weigh 36.04 g of water (molar mass 18.02 g/mol). Moles = 36.04 / 18.02 = 2.000 mol = 2000 mmol = 2,000,000 umol = 1.204 x 10^24 particles. Reversing: 2.000 mol x 18.02 g/mol = 36.04 g.

How the calculator works in each mode

The calculator solves the mole equation in three directions. In "Grams to moles" mode it divides your mass (converted to grams internally) by the molar mass to give moles. In "Moles to grams" mode it multiplies the moles (converted from whatever unit you entered) by the molar mass to give mass. In "Molar mass from mass and moles" mode it divides your mass by your moles to identify the molar mass of an unknown substance. All three share the same equation, n = m/M, rearranged for the unknown.

Unit switches: why they matter

Laboratory quantities span many orders of magnitude. A synthetic chemist might weigh several grams of reagent, while an analytical chemist or biochemist might handle micrograms and measure results in micromoles or nanomoles. The mass unit selector (mg, g, kg) and mole unit selector (mol, mmol, umol, nmol) let you enter values in the units your balance and protocol use without manual conversion. The calculator converts internally to SI base units before computing, so the math stays consistent regardless of which units you choose.

Substance presets and the molar mass

Selecting a substance from the preset list auto-fills its molar mass so you only need to enter the mass. The molar mass values are the 2021 IUPAC standard atomic weight sums for each formula. For substances not in the list, choose "Custom" and enter the molar mass yourself. You can find molar masses by summing standard atomic weights from a periodic table: for NaCl that is 22.99 (Na) + 35.45 (Cl) = 58.44 g/mol. An error in the molar mass carries directly into the mole result, so always use a current reference.

Why moles matter in stoichiometry

Balanced chemical equations express ratios in moles, not grams, because reactions happen particle by particle. Once you have moles you can apply stoichiometric coefficients directly: if a reaction needs a 2:1 ratio of reagents, you need twice as many moles of one as the other. Converting measured masses into moles is therefore the first step in almost every quantitative chemistry calculation, from limiting-reagent problems and yield calculations to preparing solutions of a defined molarity.

Avogadro's number and the particle count

One mole of any substance contains exactly 6.02214076 x 10^23 entities, a value fixed by the 2019 SI redefinition. Multiplying your mole result by this constant gives the number of atoms, molecules or formula units in your sample. This bridges the human-scale world of grams on a balance and the atomic-scale world of individual particles reacting. Avogadro's number is the same regardless of the substance, which is what makes the mole such a powerful unit.

Molar masses of common laboratory substances

SubstanceFormulaMolar mass (g/mol)Common use
WaterH₂O18.015Universal solvent, reference standard
Sodium chlorideNaCl58.44Saline solutions, ionic strength adjustment
Carbon dioxideCO₂44.01Gas-law and respiration problems
GlucoseC₆H₁₂O₆180.16Biochemistry, cell culture media
Sulfuric acidH₂SO₄98.08Titrations, pH adjustment
Sodium hydroxideNaOH40.00Titrations, base solutions
Hydrochloric acidHCl36.46Acid-base titrations, pH standards
Calcium carbonateCaCO₃100.09Antacid, limestone, buffer prep
AmmoniaNH₃17.03Fertiliser, buffer solutions
EthanolC₂H₅OH46.07Solvent, disinfectant, fuel
Sodium bicarbonateNaHCO₃84.01Baking, buffer solutions
Acetic acidCH₃COOH60.05Acetate buffers, food chemistry
Potassium chlorideKCl74.55Electrolyte solutions, IV fluids
Phosphoric acidH₃PO₄98.00Buffer preparation, food additive

Values are based on 2021 IUPAC standard atomic weights. Use these to cross-check your molar mass input.

Frequently asked questions

How do I convert grams to moles?

Divide the mass in grams by the molar mass in grams per mole: moles = grams / molar mass. For example, 36.04 g of water divided by its molar mass of 18.02 g/mol gives 2.00 moles. This calculator does the division for you and also shows millimoles and micromoles.

How do I convert moles to grams?

Multiply the moles by the molar mass: mass (g) = moles x molar mass (g/mol). Switch this calculator to "Mass from moles" mode, enter your moles and select the substance (or enter a custom molar mass), and the result is the mass in grams.

How do I find the molar mass if I know the mass and moles?

Rearrange the mole equation to M = m / n: divide the mass in grams by the moles. Switch the calculator to "Molar mass from mass and moles" mode and enter both values. This is useful for identifying an unknown compound or checking an experimental measurement.

How many particles are in one mole?

One mole always contains exactly 6.02214076 x 10^23 particles, Avogadro's number, as defined by the 2019 SI redefinition of the mole. This is true for atoms, molecules, ions or any other particles.

What is the difference between moles, millimoles and micromoles?

1 mole = 1000 millimoles (mmol) = 1,000,000 micromoles (umol) = 1,000,000,000 nanomoles (nmol). Millimoles and micromoles are standard in biochemistry and pharmacology where quantities are very small. Use the "Display moles in" option to see your result in the most convenient unit.

Where do I find the molar mass if my substance is not in the list?

Choose "Custom" from the substance preset, then sum the standard atomic weights for all atoms in the chemical formula using a periodic table. Multiply each element's atomic weight by the count of that atom in the formula, then add them all. For H₂SO₄: 2 x 1.008 + 32.06 + 4 x 16.00 = 98.08 g/mol.

Can I enter milligrams or kilograms instead of grams?

Yes. The mass input has a unit switch for mg, g and kg. Select the unit that matches your measurement and the calculator converts to grams before computing, so the mole result is always correct regardless of which mass unit you choose.

Sources

Written by Dr. Sofia Marchetti, PhD Chemist · Milan, Italy

Physical chemist and laboratory educator bringing rigorous solution science to accessible, accurate online tools.

Search 3,500+ calculators

Loading search…