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.
Formula
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
| Substance | Formula | Molar mass (g/mol) | Common use |
|---|---|---|---|
| Water | H₂O | 18.015 | Universal solvent, reference standard |
| Sodium chloride | NaCl | 58.44 | Saline solutions, ionic strength adjustment |
| Carbon dioxide | CO₂ | 44.01 | Gas-law and respiration problems |
| Glucose | C₆H₁₂O₆ | 180.16 | Biochemistry, cell culture media |
| Sulfuric acid | H₂SO₄ | 98.08 | Titrations, pH adjustment |
| Sodium hydroxide | NaOH | 40.00 | Titrations, base solutions |
| Hydrochloric acid | HCl | 36.46 | Acid-base titrations, pH standards |
| Calcium carbonate | CaCO₃ | 100.09 | Antacid, limestone, buffer prep |
| Ammonia | NH₃ | 17.03 | Fertiliser, buffer solutions |
| Ethanol | C₂H₅OH | 46.07 | Solvent, disinfectant, fuel |
| Sodium bicarbonate | NaHCO₃ | 84.01 | Baking, buffer solutions |
| Acetic acid | CH₃COOH | 60.05 | Acetate buffers, food chemistry |
| Potassium chloride | KCl | 74.55 | Electrolyte solutions, IV fluids |
| Phosphoric acid | H₃PO₄ | 98.00 | Buffer 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.