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.
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:
- 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.
- Convert grams to moles: divide the weighed mass by the molar mass.
- Convert the volume to litres: divide millilitres by 1000.
- 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.
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:
- Percent (w/v) to molarity. A % w/v is grams per 100 mL, so M = (10 × %w/v) / molar mass. Physiological saline at 0.9 % w/v NaCl is (10 × 0.9) / 58.44 = 0.154 M.
- Percent (w/w) of a concentrated liquid. Include the density: M = (10 × %w/w × density) / molar mass. Concentrated HCl at 37 % w/w, density 1.19 g/mL, is (10 × 37 × 1.19) / 36.46 = 12.1 M.
- Normality. Normality (N) is molarity multiplied by the number of reactive equivalents: N = M × n. For HCl n = 1 so 1 M = 1 N; for H2SO4 n = 2 so 1 M = 2 N.
| Unit | Defined as | Convert to molarity |
|---|---|---|
| Molarity (M) | mol solute / L solution | — |
| Molality (m) | mol solute / kg solvent | ≈ M for dilute aqueous; differs as concentration rises |
| % w/v | g solute / 100 mL solution | M = (10 × %w/v) / molar mass |
| % w/w | g solute / 100 g solution | M = (10 × %w/w × density) / molar mass |
| ppm (dilute aqueous) | ≈ mg solute / L | M = ppm / (1000 × molar mass) |
| Normality (N) | equivalents / L | M = 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:
- Water of crystallisation. Hydrated salts carry bound water that adds mass. Use the hydrated molar mass printed on the label: copper sulfate pentahydrate (CuSO4·5H2O) is 249.69 g/mol, not the anhydrous 159.61; EDTA disodium dihydrate is 372.24 g/mol. Using the anhydrous value under-weighs and leaves you short of target.
- Purity / assay. If a reagent is 95 % pure, divide the calculated mass by 0.95 to get the amount to weigh. This matters most for technical-grade salts and for acids quoted by assay.
- Make up to volume, do not add to volume. Dissolve the solid in ~80 % of the final volume, then top up to the mark. The dissolved solute occupies volume, so adding solvent to a pre-measured full volume gives a solution that is too dilute.
- Free acid vs salt form. Tris base, Tris-HCl, sodium phosphate mono- vs dibasic — each form has its own molar mass and its own pH behaviour. Confirm which form the protocol means before you weigh.
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.
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.