How It WorksPublished 14 min read

How to Calculate Molecular Weight and Moles | Molar Mass, Grams to Moles, Molarity and Making Solutions, with Worked Examples

“What is the molecular weight of H2O?” “How many moles are in 9.0 g of water?” “How many grams do I need for 500 mL of 0.1 mol/L salt solution?” Molecular weight and amount of substance (moles) trip up a lot of chemistry students, but once you understand three operations (add up atomic weights, divide by molar mass, divide by volume in litres), almost every problem follows the same steps. This guide covers what atomic weight means and the rounded values used in school, how to find molecular weight and formula mass (brackets, complex ions and ions), the formula mass of hydrates and their water content, converting between grams, moles, number of particles and gas volume (22.4 L), how to find molarity and make up a solution, converting between mass percent and molarity, diluting concentrated sulfuric and hydrochloric acid, finding empirical and molecular formulas, a molar mass table for common substances, and the most common mistakes, all with concrete numbers.

The short answer: three formulas cover molecular weight and moles

Molecular weight is the sum of the atomic weights of all the atoms in a chemical formula, each multiplied by how many of that atom there are. Water, H2O, has two hydrogen atoms (atomic weight 1.0) and one oxygen atom (atomic weight 16), so 1.0 × 2 + 16 = 18. The mass of 1 mol of a substance (its molar mass) is the molecular weight with g/mol attached, so 1 mol of water is 18 g. Once you have that, mole calculations are just multiplication and division.

  • Molecular weight (formula mass) = Σ (atomic weight × number of atoms). H2O is 18, CO2 is 44, C6H12O6 is 180
  • Amount in mol = mass in g ÷ molar mass in g/mol. 9.0 g of water is 9.0 ÷ 18 = 0.50 mol
  • Number of particles = mol × Avogadro constant 6.0 × 10²³/mol. 0.50 mol of water is 3.0 × 10²³ molecules
  • Gas volume = mol × 22.4 L/mol (0 °C, 1 atm). 0.25 mol of CO2 is 5.6 L
  • Molarity in mol/L = moles of solute ÷ volume of solution in L. Mass needed = molarity × volume in L × molar mass

For example, to make 500 mL of 0.1 mol/L sodium chloride solution you need 0.1 × 0.5 = 0.05 mol. The molar mass of NaCl is 58.44 g/mol (58.5 with school values), so you weigh out 0.05 × 58.44 = 2.92 g. The sections below go through each of the three formulas in turn, along with the places people usually slip up.

What atomic weight is | Rounded school values and precise values

Atomic weight is the average mass of one atom of an element when one carbon-12 atom is defined as exactly 12. Because it is a ratio, it has no unit. Most elements have isotopes of different masses, and the atomic weight is their average weighted by natural abundance. Chlorine’s atomic weight is an awkward 35.45 because natural chlorine is about 76% chlorine-35 and about 24% chlorine-37.

School textbooks and entrance exams give rounded atomic weights in the question, such as “H = 1.0, C = 12, O = 16”, and you calculate with those. Lab work and research use the standard atomic weights from IUPAC (the International Union of Pure and Applied Chemistry). Values for the main elements are below.

ElementSymbolRounded school valueIUPAC value (abridged)
HydrogenH1.01.008
CarbonC1212.011
NitrogenN1414.007
OxygenO1615.999
SodiumNa2322.99
MagnesiumMg2424.305
AluminiumAl2726.982
SulfurS3232.06
ChlorineCl35.535.45
PotassiumK3939.098
CalciumCa4040.078
IronFe5655.845
CopperCu63.563.546
ZincZn65.465.38
SilverAg108107.87

How to find molecular weight and formula mass | Counting brackets, complex ions and ions

Calculating molecular weight just means splitting the formula into elements, working out “atomic weight × number of atoms” for each, and adding them up. The part people get wrong is counting the atoms, so here it is as steps.

  1. 1

    Count the atoms of each element

    The subscript after an element symbol is the number of that atom; no number means 1. In C6H12O6 there are 6 C, 12 H and 6 O.

  2. 2

    Multiply what is inside brackets by the subscript after them

    Ca(OH)2 has two (OH) groups, so Ca 1, O 2, H 2. Al2(SO4)3 is Al 2, S 3, O 12. For nested brackets such as [Cu(NH3)4]SO4, the inner NH3 appears 4 times giving N 4 and H 12, then add the outer Cu 1, S 1 and O 4.

  3. 3

    Multiply by the atomic weights and add

    C6H12O6 is 12 × 6 + 1.0 × 12 + 16 × 6 = 72 + 12 + 96 = 180. Ca(OH)2 is 40 + (16 + 1.0) × 2 = 74.

FormulaAtomsWith rounded school valuesPrecise value
H2OH 2, O 11.0 × 2 + 16 = 1818.015
CO2C 1, O 212 + 16 × 2 = 4444.009
C6H12O6 (glucose)C 6, H 12, O 672 + 12 + 96 = 180180.156
Ca(OH)2Ca 1, O 2, H 240 + 17 × 2 = 7474.092
Al2(SO4)3Al 2, S 3, O 1227 × 2 + 96 × 3 = 342342.132
[Cu(NH3)4]SO4Cu 1, N 4, H 12, S 1, O 463.5 + 17 × 4 + 96 = 227.5227.726

Ionic substances such as NaCl and CaCO3, and metals such as Fe, have no discrete molecules, so their value is called the “formula mass” (or formula weight) rather than the molecular weight. Only the name differs; the calculation is identical. For ions such as SO4²⁻ and NH4⁺, the mass of the electrons is tiny compared with the atoms, so you ignore it and just add the atomic weights (SO4²⁻ is 32 + 16 × 4 = 96).

Once you know the molecular weight you can also get the mass percent (composition) of each element: divide that element’s “atomic weight × number of atoms” by the molecular weight. In H2O, hydrogen is 2.016 ÷ 18.015 = 11.19% and oxygen 88.81%. Glucose is C 40.00%, H 6.71%, O 53.28%, and these figures are the starting point for the empirical formula calculation explained later.

Formula mass of hydrates and their water content

A formula with water attached by a dot, such as CuSO4·5H2O (copper(II) sulfate pentahydrate), is a hydrate: its crystals contain water molecules (water of crystallisation). Its formula mass is the part before the dot plus the formula mass of H2O times the number of waters. Whether the formula on the reagent bottle is the anhydrous salt or the hydrate makes a big difference to how much you weigh for the same number of moles, so this is the most common mistake when making solutions.

SubstanceRounded school valuePrecise valueWater content
CuSO4 (anhydrous)159.5159.60—
CuSO4·5H2O159.5 + 18 × 5 = 249.5249.68about 36.1%
Na2CO3 (anhydrous)106105.99—
Na2CO3·10H2O106 + 18 × 10 = 286286.14about 63.0%
FeSO4·7H2O278278.01about 45.4%
(COOH)2·2H2O (oxalic acid dihydrate)126126.06about 28.6%

Water content is “18 × number of waters ÷ formula mass of the hydrate”. For CuSO4·5H2O it is 90 ÷ 249.5 = 36.1%, so heating the blue crystals into the white anhydrous salt loses about 36% of the mass. To make 250 mL of 0.1 mol/L copper(II) sulfate solution you need 0.1 × 0.25 × 249.68 = 6.24 g of the pentahydrate, or 0.1 × 0.25 × 159.60 = 3.99 g of the anhydrous salt.

Calculating amount of substance (mol) | Converting grams, particles and gas volume

One mole is the amount containing the Avogadro constant, 6.02214076 × 10²³ particles (atoms, molecules or ions; 6.0 × 10²³ in school problems). The mass of 1 mol is the molar mass (g/mol), and the volume of 1 mol of gas at 0 °C and 1 atm (1.013 × 10⁵ Pa) is 22.4 L. Using these three “per mole” values, you convert any quantity by going through moles.

What you knowTo get molBack from mol
Mass in g÷ molar mass in g/mol× molar mass
Number of particles÷ 6.0 × 10²³× 6.0 × 10²³
Gas volume in L (0 °C, 1 atm)÷ 22.4× 22.4
Gas volume in L (25 °C, 1 atm)÷ 24.5× 24.5
Solution volume in L× molarity in mol/L÷ molarity
  • 9.0 g of water is 9.0 ÷ 18 = 0.50 mol. That is 0.50 × 6.0 × 10²³ = 3.0 × 10²³ molecules, and since each H2O has 3 atoms, 9.0 × 10²³ atoms
  • 11 g of carbon dioxide is 11 ÷ 44 = 0.25 mol. At 0 °C and 1 atm that is 0.25 × 22.4 = 5.6 L; at 25 °C it is 0.25 × 24.5 ≈ 6.1 L
  • 5.6 L of oxygen O2 at 0 °C and 1 atm is 5.6 ÷ 22.4 = 0.25 mol, which weighs 0.25 × 32 = 8.0 g
  • With precise values, 9.0 g of water is 0.4996 mol (3.009 × 10²³ molecules), and 1 mol of gas occupies 22.41 L at 0 °C and 24.47 L at 25 °C

How to find molarity and make up a solution

Molarity (mol/L) is the number of moles of solute dissolved in 1 L of solution. The key point is that it is per litre of finished solution, not per litre of solvent (water), so when you make a solution you bring it to the exact volume in a volumetric flask.

Solution to makeCalculationMass to weigh
500 mL of 0.1 mol/L NaCl0.1 × 0.5 × 58.442.92 g
100 mL of 1 mol/L NaOH1 × 0.1 × 40.004.00 g
200 mL of 0.2 mol/L glucose0.2 × 0.2 × 180.167.21 g
250 mL of 0.1 mol/L CuSO4·5H2O0.1 × 0.25 × 249.686.24 g
500 mL of 0.1 mol/L NaCl (95% purity)2.92 ÷ 0.953.08 g
  1. 1

    Calculate and weigh the mass

    Use the formula above and weigh it on an electronic balance onto weighing paper or into a beaker. For 500 mL of 0.1 mol/L NaCl that is 2.92 g.

  2. 2

    Dissolve it in a little water

    In a beaker, dissolve it completely in less water than the final volume (about 300 mL for 500 mL).

  3. 3

    Transfer to a volumetric flask

    Pour it into a 500 mL volumetric flask, rinse the beaker and stirring rod 2 or 3 times with a little water and add the rinsings to the flask.

  4. 4

    Fill to the mark and mix well

    Near the mark, add water a little at a time with a dropper until the bottom of the meniscus sits on the line. Stopper the flask and invert it several times to mix.

Going the other way, the molarity from a dissolved mass is “mass ÷ molar mass ÷ volume in L”. Dissolve 2.92 g of NaCl and make it up to 500 mL, and you get 2.92 ÷ 58.44 ÷ 0.5 = 0.0999 ≈ 0.1 mol/L.

Converting between mass percent and molarity

Commercial concentrated sulfuric and hydrochloric acids are labelled by mass percent, such as “98%” or “37%”. To convert to molarity, find the mass of 1 L (1000 cm³) of solution from its density, work out how many grams of that are solute, and divide by the molar mass.

For 98% sulfuric acid with a density of 1.84 g/cm³, 1 L of solution weighs 1840 g, of which 1840 × 0.98 = 1803 g is sulfuric acid; dividing by 98.07 gives about 18.4 mol/L. The same formula gives the molarity of common concentrated acids and bases below (densities are typical values).

ReagentMass percentDensity g/cm³Molarity
Concentrated sulfuric acid H2SO498%1.84about 18.4 mol/L
Concentrated hydrochloric acid HCl37%1.19about 12.1 mol/L
Concentrated nitric acid HNO360%1.38about 13.1 mol/L
Concentrated ammonia solution NH328%0.90about 14.8 mol/L
Salt solution NaCl10%1.07about 1.83 mol/L

As an example in the other direction, 1 mol/L sulfuric acid (density 1.06 g/cm³) is 1 × 98.07 ÷ 1060 × 100 = about 9.25%. Note that you cannot convert without the density. For dilute solutions you can approximate the density as 1.0, but for concentrated solutions the error becomes large.

Molality (mol/kg), the moles per kilogram of solvent, is used for boiling point elevation and freezing point depression. A 10% salt solution is 10 g of NaCl in 90 g of water, so 10 ÷ 58.44 ÷ 0.090 = 1.90 mol/kg. Because it doesn’t involve volume, you can convert it from mass percent without knowing the density.

Making a solution by dilution | Diluting concentrated sulfuric and hydrochloric acid

Diluting a solution with water does not change the number of moles of solute, so “molarity before × volume before = molarity after × volume after” (C1V1 = C2V2). To make 100 mL of 1 mol/L sulfuric acid from concentrated sulfuric acid (18.4 mol/L), you need 1 × 100 ÷ 18.4 = about 5.4 mL.

To make 100 mL of 1 mol/LStock molarityStock to measure
Concentrated sulfuric acid 98%18.4 mol/Labout 5.4 mL
Concentrated hydrochloric acid 37%12.1 mol/Labout 8.3 mL
Concentrated nitric acid 60%13.1 mol/Labout 7.6 mL
Concentrated ammonia solution 28%14.8 mol/Labout 6.8 mL

If you think in terms of a dilution factor, the factor = stock concentration ÷ target concentration, so taking 18.4 mol/L down to 1 mol/L is an 18.4-fold dilution. For dilution factors when you work in percent, as with disinfectants and liquid fertiliser, see How to Calculate Dilution Ratios, and for mixing two liquids of different concentrations to hit a target, see Mixing Two Concentrations.

How to find empirical and molecular formulas | Mass percent and elemental analysis

An empirical formula expresses the ratio of atoms in a substance as the simplest whole-number ratio. Dividing the mass (or mass percent) of each element by its atomic weight gives the mole ratio, which you then turn into whole numbers.

  1. 1

    Divide each mass by the atomic weight

    For a substance that is C 40.0%, H 6.7%, O 53.3%, take 100 g as C 40.0 g, H 6.7 g, O 53.3 g: 40.0 ÷ 12 = 3.33, 6.7 ÷ 1.0 = 6.7, 53.3 ÷ 16 = 3.33 mol.

  2. 2

    Divide by the smallest value

    Dividing by 3.33 gives C : H : O = 1.00 : 2.01 : 1 ≈ 1 : 2 : 1. The empirical formula is CH2O (formula mass 30).

  3. 3

    Use the molecular weight to get the molecular formula

    The molecular formula is a whole-number multiple of the empirical formula. If the molecular weight is 180, then 180 ÷ 30 = 6, and the molecular formula is C6H12O6.

If the ratios come out at something like 1.5 or 1.33, multiply by 2 or 3 to get whole numbers. For an iron oxide that is Fe 69.9%, O 30.1%: 69.9 ÷ 56 = 1.248 and 30.1 ÷ 16 = 1.881, a ratio of 1 : 1.51. Doubling gives 2 : 3, so the empirical formula is Fe2O3. Rounding 1.51 up to 2 and writing FeO2 is a classic mistake.

In elemental (combustion) analysis of an organic compound, you burn the sample and use the masses of CO2 and H2O produced to find the masses of C and H, with the remainder being O. Carbon is the mass of CO2 × 12/44 and hydrogen is the mass of H2O × 2/18.

ProblemMasses or percentages of C, H, OMole ratioEmpirical → molecular formula
C 40.0%, H 6.7%, O 53.3%, molecular weight 18040.0, 6.7, 53.31 : 2 : 1CH2O → C6H12O6
C 85.7%, H 14.3%, molecular weight 5685.7, 14.31 : 2CH2 → C4H8
C 54.5%, H 9.1%, O 36.4%, molecular weight 8854.5, 9.1, 36.42 : 4 : 1C2H4O → C4H8O2
Sample 23.0 mg → CO2 44.0 mg, H2O 27.0 mgC 12.0 mg, H 3.0 mg, O 8.0 mg1 : 3 : 0.5 = 2 : 6 : 1C2H6O

In the last example, 44.0 × 12/44 = 12.0 mg, 27.0 × 2/18 = 3.0 mg and 23.0 − 12.0 − 3.0 = 8.0 mg. Dividing each by its atomic weight gives 1.0 : 3.0 : 0.50 mmol, and doubling gives C2H6O (the composition of ethanol and dimethyl ether).

Molar mass table for common substances

These are the molecular weights (formula masses) of substances that come up often in chemistry problems and lab work. The school values use the atomic weights commonly given in questions (H = 1.0, C = 12, N = 14, O = 16, Na = 23, S = 32, Cl = 35.5, K = 39, Ca = 40, Cu = 63.5, Ag = 108); the precise values use IUPAC atomic weights.

SubstanceFormulaRounded school valuePrecise value g/mol
HydrogenH22.02.016
NitrogenN22828.014
OxygenO23231.998
ChlorineCl27170.900
WaterH2O1818.015
AmmoniaNH31717.031
MethaneCH41616.043
Carbon dioxideCO24444.009
Hydrogen chlorideHCl36.536.458
Sulfuric acidH2SO49898.072
Nitric acidHNO36363.012
Acetic acidCH3COOH6060.052
EthanolC2H5OH4646.069
Sodium chlorideNaCl58.558.440
Sodium hydroxideNaOH4039.997
Potassium hydroxideKOH5656.105
Calcium carbonateCaCO3100100.086
Sodium hydrogen carbonateNaHCO38484.006
Silver nitrateAgNO3170169.874
Potassium permanganateKMnO4158158.032
GlucoseC6H12O6180180.156
SucroseC12H22O11342342.297

Anything not in the table can be calculated the same way as long as you know the formula. For atomic weights that questions don’t always give, such as Mn (55) in KMnO4, check the back of your workbook or a periodic table.

Common mistakes with molecular weight and mole calculations

  • Treating oxygen or nitrogen gas as single atoms: oxygen gas is O2, so 1 mol weighs 32 g, not 16 g (the same goes for H2, N2 and Cl2)
  • Forgetting the subscript outside brackets: counting Ca(OH)2 like CaOH2 gives only one O and a wrong answer of 57. The correct value is 74
  • Forgetting the water of crystallisation: calculating CuSO4·5H2O as 159.5 leaves your solution at only about 64% of the intended concentration
  • Not converting mL to L: writing 0.1 mol/L × 500 mL as 0.1 × 500 = 50 mol. Convert to 0.5 L first
  • Confusing “dissolve in 1 L of water” with “make the solution up to 1 L”: molarity depends on the volume of the solution
  • Using 22.4 L for liquids or for gases at 25 °C: 22.4 L is for gases at 0 °C and 1 atm only; at room temperature use 24.5 L
  • Rounding ratios in empirical formulas: 1 : 1.5 is 2 : 3, not 1 : 2. Multiply 1.33 by 3
  • Ignoring significant figures: if the data have 2 significant figures, give the answer to 2 as well (0.50 mol, 3.0 × 10²³)

Writing units all the way through a calculation prevents most of these mistakes. If you get into the habit of cancelling units, as in “9.0 g ÷ 18 g/mol = 0.50 mol”, and checking that the unit you want is the one left at the end, you won’t have to wonder whether to multiply or divide.

FAQ

How do you calculate molecular weight?
For each element in the formula, work out “atomic weight × number of atoms” and add them all up. H2O is 1.0 × 2 + 16 = 18, and C6H12O6 is 12 × 6 + 1.0 × 12 + 16 × 6 = 180. With brackets, multiply the atoms inside by the subscript after them: Ca(OH)2 is 40 + (16 + 1.0) × 2 = 74.
What is the difference between molecular weight and molar mass?
The number is the same; the unit is different. Molecular weight is a ratio based on atomic weights, so it has no unit, while molar mass is the mass of 1 mol and carries g/mol. Water has a molecular weight of 18 and a molar mass of 18 g/mol.
How do you convert grams to moles?
Divide the mass by the molar mass. 9.0 g of water is 9.0 ÷ 18 = 0.50 mol, and 11 g of carbon dioxide is 11 ÷ 44 = 0.25 mol. To go from moles to grams, multiply by the molar mass.
How many grams do I need to make 500 mL of a 0.1 mol/L solution?
Molarity × volume in L × molar mass. For sodium chloride, weigh 0.1 × 0.5 × 58.44 = 2.92 g, dissolve it in a little water and make it up to 500 mL in a volumetric flask. For a 95% pure reagent, divide by 0.95 and weigh 3.08 g.
What is the formula mass of copper(II) sulfate pentahydrate, CuSO4·5H2O?
With rounded school values it is 63.5 + 32 + 16 × 4 + 18 × 5 = 249.5; with precise values it is 249.68. Anhydrous CuSO4 is 159.5 (159.60), so the five waters account for about 36% of the hydrate’s mass.
What is the molarity of 98% sulfuric acid?
Taking the density as 1.84 g/cm³, 1000 × 1.84 × 0.98 ÷ 98.07 = about 18.4 mol/L. To make 100 mL of 1 mol/L sulfuric acid, measure about 5.4 mL, add it slowly to water and then make it up to 100 mL. 37% concentrated hydrochloric acid (density 1.19) is about 12.1 mol/L.
How do you find an empirical formula?
Divide the mass percent (or mass) of each element by its atomic weight, then divide by the smallest value to get a whole-number ratio. C 40.0%, H 6.7%, O 53.3% gives 1 : 2 : 1, so CH2O; if the molecular weight is 180, multiply by 6 to get the molecular formula C6H12O6. If a ratio is 1.5, double everything; if it is 1.33, triple.

Tools in this article

Related articles

How-to Guide13 min read

How to Play Hanafuda Koi-Koi | Rules, Every Yaku and Its Points (Mon), When to Call Koi-Koi, and Winning Tips for Beginners

Koi-Koi is a two-player hanafuda game in which you capture cards from the 48-card deck, and whoever forms a scoring combination (a yaku) first chooses to stop and score or to call “koi-koi” and keep going. The rules are simple, but until you know the card types and the yaku it is hard to tell what to take and when to stop. This guide covers how to tell the 48 cards apart, how to choose the dealer and deal, how a turn works, every yaku and its points (mon), worked examples with the double for 7 mon or more and the koi-koi double, how to decide whether to call koi-koi, tips that help beginners win, and the house rules that differ from table to table.

Read article →
How It Works13 min read

Document Retention Periods in Japan and When They Start | Are Books and Receipts Kept 7 or 10 Years, and Which Years Can You Shred Now?

People often say “keep the books for 7 years”, but whether those 7 years start from the fiscal year end or from the tax filing deadline moves the day you may shred them by two months. On top of that, Japan’s Companies Act asks for 10 years, years with a tax loss carryforward need 10 years, a sole proprietor’s invoices need 5 years and wage ledgers need 5 years (3 years for the time being), so both the number of years and the start date differ by document and by law. This guide lists the retention periods for corporate, sole proprietor, labour and social insurance documents under Japanese law, explains when each period starts and how the end date is counted, gives a table of which years can be discarded in 2026, covers what changes when you keep records electronically, and ends with a procedure for disposing of them, all with concrete dates.

Read article →
How It Works13 min read

How to Calculate a Subnet Mask | Network Address, Broadcast Address and Host Count from CIDR, with a Cheat Sheet

“What is the network address of 192.168.1.100/26?” “How many devices fit in a /27?” “What prefix is 255.255.240.0?” The textbook way to do subnet maths is to convert to binary and take an AND, but once you get used to it you can work everything out in your head using the “block size”. This guide explains how CIDR notation relates to the subnet mask, how to find the network address, broadcast address and usable IP range both in binary and mentally, worked examples that split in the third octet, host counts and the addresses reserved by AWS, Azure and Google Cloud, how to choose a prefix length from the number of devices you need, VLSM subnetting, checking whether two IPs are in the same subnet, converting IP ranges to CIDR and aggregating them, wildcard masks, and the most common mistakes, all with concrete numbers.

Read article →