Molarity Calculator Guide: How to Calculate Molarity & Grams to Weigh

Written and verified by Muhammad Haroon, founder of Numblox · M = moles ÷ litres · Preparing solutions · Worked examples · Updated 24 November 2026

Molarity is how chemists describe the strength of a solution: the number of moles of dissolved substance (the solute) in each litre of finished solution. It is the concentration unit of nearly every lab protocol, titration and exam question. This guide covers both directions of the calculation — finding the molarity of a solution you have, and working out how many grams to weigh to make a solution you want — with examples verified against the calculator.

Try it yourself: use the free Molarity Calculator on Numblox — enter moles and litres to get molarity, or use the grams mode to find exactly how much to weigh out. Nothing you enter is stored or sent anywhere.

The molarity formula

Molarity (M) = moles of solute ÷ volume of solution in litres

The capital M stands for mol/L. A "1 M" solution contains one mole per litre; a 0.05 M solution is twenty times weaker. Two habits prevent most errors: the volume is the final solution volume (solute plus solvent together), and it must be in litres — 250 mL is 0.25 L, a conversion students forget constantly.

The reverse problem — preparing a solution — chains two formulas: moles needed = M × V, then grams = moles × molar mass. Combined:

Grams to weigh = M × V (L) × molar mass (g/mol)

How to use the calculator

Step 1: To find a solution's molarity: enter the moles of solute and the volume of solution in litres.

Step 2: To prepare a solution instead: switch to the grams mode and enter the target molarity, the volume in litres, and the solute's molar mass.

Step 3: Read the result — molarity in mol/L (M), or the exact grams to weigh out.

Worked example 1 — finding molarity: 0.5 mol in 0.25 L

Step 1: M = 0.5 ÷ 0.25 = 2 M (2 mol/L).
Step 2: sanity check — half a mole in a quarter of a litre is a concentrated solution, so a biggish number like 2 M makes sense.

The calculator returns exactly 2 mol/L (M).

Worked example 2 — a dilute solution: 0.1 mol in 2 L

M = 0.1 ÷ 2 = 0.05 M. Small mole counts spread over large volumes give small molarities — the arithmetic is the same, only the scale changes.

Worked example 3 — grams to weigh: 0.5 L of 0.20 M NaCl

You need half a litre of 0.20 M sodium chloride solution. NaCl's molar mass is 58.44 g/mol.

Step 1: moles needed = 0.20 × 0.5 = 0.10 mol.
Step 2: grams = 0.10 × 58.44 = 5.84 g.
Step 3: weigh 5.84 g, dissolve, and top up with water to exactly 0.5 L.

The calculator's grams mode does both steps at once: enter 0.20 M, 0.5 L and 58.44 g/mol and it answers 5.84 g.

Worked example 4 — grams to weigh: 1 L of 1 M NaOH

NaOH's molar mass is 40.00 g/mol, so grams = 1 × 1 × 40.00 = 40 g — a memorable benchmark: for a 1 M, 1-litre solution, the grams to weigh always equal the molar mass.

Dilution, in one paragraph

Adding solvent does not change the moles of solute, so M₁V₁ = M₂V₂: a stock at 2 M diluted from 0.25 L to 1 L becomes 2 × 0.25 ÷ 1 = 0.5 M. The calculator's first mode checks each side of that equation — compute the moles once (M × V) and reuse them.

Common questions

What is the formula for molarity? Molarity = moles of solute ÷ litres of solution. For example, 0.5 mol dissolved and made up to 0.25 L gives 0.5 ÷ 0.25 = 2 M.

How many grams of NaCl make 0.5 L of 0.20 M solution? Grams = M × V × molar mass = 0.20 × 0.5 × 58.44 = 5.84 g.

Is the volume the water I add, or the final solution? The final solution. Dissolve the solute in less water than the target, then top up to the mark — volumes are not simply additive when substances dissolve.

What is the difference between molarity and moles? Moles count the solute itself; molarity is moles per litre — a concentration. The same 0.5 mol is 2 M in 0.25 L but only 0.25 M in 2 L.

Check your own numbers

Enter your moles and litres — or your target molarity — in the Numblox Molarity Calculator and compare with the formulas above. Need moles from grams first? The Mole Calculator Guide covers that conversion and Avogadro's number.

Disclaimer: This article and the calculator provide general educational information and estimates only. Always double-check figures that matter for coursework grades, lab work, wiring, or safety.

Related: Molarity Calculator · Mole Calculator Guide · Density Calculator Guide · All free calculators

Real-world examples and common mistakes

To make a litre of 0.5 M sodium chloride solution: moles needed = 0.5 mol/L × 1 L = 0.5 mol; mass = 0.5 × 58.44 g/mol = 29.22 g of NaCl. Dissolve it in about 800 mL of water first, then top up to exactly 1 L — that order matters, and it is the most common mistake in the school lab: molarity is moles per litre of finished solution, not per litre of water you started with. Other frequent errors: entering the volume in millilitres without converting, using the mass of a hydrated salt (such as CuSO₄·5H₂O) as if it were the anhydrous compound, and forgetting that diluting a stock solution keeps the moles the same — only the volume changes (M₁V₁ = M₂V₂).