The most-used conversion in chemistry
Weigh a substance and you get grams. Write a reaction and it speaks in moles. Bridging those two is the single most frequent calculation in a chemistry lab — it comes before every stoichiometry problem, every solution you prepare, and every yield you check. The bridge is the molar mass, and the arithmetic is one division.
This calculator carries the molar masses so you don’t have to add them by hand. It has all 118 elements at their 2021 IUPAC atomic weights and 176 common compounds — acids, bases, salts, solvents, sugars — with formula weights computed from their formulas. Choosing your substance from a list removes the mistake that trips people up most: a molar mass that’s off by a hydrogen or a factor of two.
The grams to moles formula
The calculator resolves the molar mass in priority order: a non-zero Custom Molar Mass first, then the Compound selection, then the Element selection. Pick a compound and an element together and the compound wins.
Worked example
Select Sodium chloride [NaCl] (molar mass 58.44 g/mol) and enter 500 g.
As a particle count:
Running it in reverse, 1 mol of NaCl is
Grams to moles for common lab chemicals
| Substance | Molar mass (g/mol) | 500 g is | 1 mol weighs |
|---|---|---|---|
| Sodium chloride (NaCl) | 58.44 | 8.556 mol | 58.44 g |
| Sodium hydroxide (NaOH) | 40.00 | 12.50 mol | 40.00 g |
| Glucose (C₆H₁₂O₆) | 180.16 | 2.775 mol | 180.16 g |
| Sulfuric acid (H₂SO₄) | 98.07 | 5.098 mol | 98.07 g |
| Silver [Ag] | 107.868 | 4.635 mol | 107.87 g |
| Calcium carbonate (CaCO₃) | 100.09 | 4.996 mol | 100.09 g |
Where it’s used
- Reaction stoichiometry — grams of reactant to moles, apply the equation ratio, moles of product back to grams.
- Solution preparation — a target molarity and volume become moles, then grams to weigh out.
- Percent yield — moles of product obtained versus moles predicted.
- Elemental analysis — grams of each element in a sample to moles, then to the empirical formula ratio.
Common mistakes
- Diatomic elements. O₂, N₂, H₂, Cl₂ have molar masses twice the atomic weight.
- Hydrates. Use the hydrate’s molar mass (with the waters) if that’s what you weighed.
- Wrong parentheses handling — Mg(OH)₂ has two oxygens and two hydrogens.
- Rounding molar mass early in a multi-step calculation.
For the molar-mass side alone, see the molar mass calculator. For solution concentration, the molarity calculator; for particle counts, atoms to moles.
Finding an empirical formula from grams
Convert each element’s mass to moles, then divide by the smallest. A compound contains 40.0 g carbon, 6.71 g hydrogen and 53.3 g oxygen:
| Element | Grams | Moles | Divide by smallest |
|---|---|---|---|
| C | 40.0 | 1.00 | |
| H | 6.71 | 2.00 | |
| O | 53.3 | 1.00 |
The ratio is 1 : 2 : 1, so the empirical formula is CH₂O. Glucose, C₆H₁₂O₆, has exactly this ratio.
Allowing for purity
Reagents aren’t always 100% pure. If a 5.00 g sample is 92% sodium chloride, only the pure part counts:
Entering the full 5.00 g would overstate the moles by about 9%.