How to Calculate Molarity: Formula, Steps and Lab Examples

June 2026 9 min read Lab Fundamentals

Key Takeaways

Contents

  1. The molarity formula
  2. How to calculate molarity from grams
  3. How much to weigh for a target molarity
  4. Dilutions from a stock solution
  5. Percent, ppm and normality conversions
  6. Hydrates, purity and bench gotchas
  7. Frequently Asked Questions

Almost every buffer, medium and reagent in a process lab starts with the same question: how much solid do I weigh, into how much water, to hit a target concentration? That is a molarity calculation. This guide covers how to calculate molarity from grams and molar mass, how to invert the formula to find the mass to weigh, how to dilute a stock, and the percent and hydrate conversions that trip people up — with worked examples drawn from real buffer preparation.

The molarity formula

Molarity (symbol M, unit mol/L) is the number of moles of a dissolved substance per litre of solution — not per litre of solvent, a distinction that matters when you top up to a final volume. The defining equation is short:

M = moles of solute ÷ litres of solution
1 M = 1 mol/L

You rarely measure moles directly; you weigh grams on a balance. Since moles equal mass divided by molar mass (the mass of one mole, in g/mol), substituting gives the form you actually use at the bench:

M = mass (g) ÷ ( molar mass (g/mol) × volume (L) )

Those two equations are the whole of basic molarity. Everything below is either applying them, rearranging them, or correcting the inputs (molar mass, purity, water of crystallisation) so the answer matches reality.

mass grams (g) moles mol molarity mol/L (M) ÷ molar mass ÷ volume (L) to weigh: mass = M × molar mass × volume
Figure 1. Molarity in both directions: grams → moles → molarity to read a concentration, or the dashed reverse path to find the mass to weigh for a target.

How to calculate molarity from grams

When you have a mass and a volume and want the resulting concentration, work left to right through four steps:

  1. Find the molar mass of the solute from its chemical formula (sum the atomic masses). Sodium chloride, NaCl, is 22.99 + 35.45 = 58.44 g/mol.
  2. Convert grams to moles: divide the weighed mass by the molar mass.
  3. Convert the volume to litres: divide millilitres by 1000.
  4. Divide moles by litres to get molarity.

Worked example: molarity from a weighed mass

You dissolved 10 g of NaCl and made the volume up to 500 mL. What is the molarity?

moles = 10 g ÷ 58.44 g/mol = 0.171 mol
volume = 500 mL ÷ 1000 = 0.5 L
M = 0.171 mol ÷ 0.5 L = 0.34 M

So the solution is 0.34 M (about a third of physiological saline strength). The whole calculation is one chained division — the only place errors creep in is forgetting to convert millilitres to litres, or using the wrong molar mass.

Skip the arithmetic

Enter mass, molar mass and volume (or any two to solve for the third) and get molarity instantly.

Open the Molarity Calculator

How much to weigh for a target molarity

At the bench you almost always run the formula the other way: you know the molarity you want and the volume you are making, and you need the mass to weigh. Rearrange M = mass / (molar mass × V) to:

mass (g) = molarity (M) × molar mass (g/mol) × volume (L)

This single line sizes nearly every reagent you prepare. The bar chart below shows the mass to weigh for 1 L of a 1 M solution of common buffer and media reagents — which, because molarity is 1 and volume is 1 L, is simply each reagent's molar mass in grams. Scale linearly for other concentrations and volumes.

Figure 2. Grams to weigh for 1 L of a 1 M solution (equal to the molar mass). For 0.5 M, halve it; for 250 mL, quarter it.

Worked example: mass for a target buffer

You need 2 L of 1.5 M NaCl for a wash buffer. Molar mass of NaCl is 58.44 g/mol.

mass = 1.5 M × 58.44 g/mol × 2 L = 175.3 g

Weigh 175.3 g, dissolve in roughly 1.6 L of water, then make the volume up to exactly 2 L. Need the buffer pH and counter-ion sorted too? The buffer calculator handles Henderson–Hasselbalch and component masses together.

Dilutions from a stock solution

Most labs keep concentrated stocks — 5 M NaCl, 1 M Tris, 0.5 M EDTA — and dilute them to working strength on demand. The governing relationship is the dilution equation, which holds because the number of moles you transfer does not change when you add solvent:

C1 V1 = C2 V2

Here C1/V1 are the stock concentration and the volume of stock you take, and C2/V2 are the final concentration and the final volume. To find how much stock to pipette, solve for V1 = (C2 × V2) / C1.

Worked example: diluting a stock

Make 1 L of 0.15 M NaCl from a 5 M stock.

V1 = (0.15 M × 1000 mL) ÷ 5 M = 30 mL of stock

Measure 30 mL of 5 M stock and add water to a final 1 L (so ~970 mL of water). The same equation drives serial dilutions and assay standard curves — for cells rather than salts, the cell seeding calculator uses the identical C1V1 logic on cell density.

Percent, ppm and normality conversions

Reagents and protocols do not always speak in molarity. Three conversions cover almost everything you will meet:

Table 1. Concentration units you will meet, and how each relates to molarity.
UnitDefined asConvert to molarity
Molarity (M)mol solute / L solution
Molality (m)mol solute / kg solvent≈ M for dilute aqueous; differs as concentration rises
% w/vg solute / 100 mL solutionM = (10 × %w/v) / molar mass
% w/wg solute / 100 g solutionM = (10 × %w/w × density) / molar mass
ppm (dilute aqueous)≈ mg solute / LM = ppm / (1000 × molar mass)
Normality (N)equivalents / LM = N / n (equivalents per mole)

Hydrates, purity and bench gotchas

The formula is easy; matching its inputs to the bottle in your hand is where real solutions go wrong. Four checks catch the common errors:

Get those four right and the arithmetic is the easy part. From there, the same molar thinking scales up into media and feed design — see the media estimator for batching component concentrations across a run, and the osmolality calculator when total dissolved species, not just one solute, start to matter.

Preparing a buffer, not just a salt solution?

Get component masses, pH, and Henderson–Hasselbalch ratios in one place.

Open the Buffer Calculator

Frequently Asked Questions

What is the formula for molarity?

Molarity equals moles of solute divided by litres of solution: M = mol / L. Because moles equal mass divided by molar mass, the form you use from a balance is M = mass(g) / (molar mass × volume in L). Rearranged to find the mass to weigh, it becomes mass = M × molar mass × volume(L).

How do you calculate molarity from grams?

Find the molar mass, divide the weighed grams by it to get moles, convert the volume to litres, then divide moles by litres. For 10 g of NaCl (58.44 g/mol) in 0.5 L: 10/58.44 = 0.171 mol, and 0.171/0.5 = 0.34 M.

How do you calculate a dilution from a stock solution?

Use C1V1 = C2V2 and solve for the stock volume: V1 = (C2 × V2) / C1. To make 1 L of 0.15 M from a 5 M stock, take (0.15 × 1000) / 5 = 30 mL of stock and top up to 1 L.

Do you use the anhydrous or hydrated molar mass for a hydrate?

Use the hydrated molar mass matching the bottle. Salts like CuSO4·5H2O (249.69 g/mol) carry water of crystallisation that adds to the weighed mass; the anhydrous value would make you weigh too little.

What is the difference between molarity and molality?

Molarity is moles per litre of solution (mol/L) and varies slightly with temperature because volume expands with heat. Molality is moles per kilogram of solvent (mol/kg) and is temperature-independent. Routine buffer work uses molarity; molality appears in freezing-point and osmotic calculations.

Resources & Further Reading