Molarity Calculator
Find the molar concentration of a solution from the mass of solute, its molar mass, and the solution volume.
The formula
Moles = mass (g) ÷ molar mass (g/mol). Molarity = moles ÷ volume (L).
Worked example
5.85 g of table salt (NaCl, molar mass 58.5 g/mol) dissolved in 0.5 L of water gives 5.85 ÷ 58.5 = 0.1 mol of NaCl, and a molarity of 0.1 ÷ 0.5 = 0.2 mol/L.
Inputs, units and rounding
- Mass is in grams, molar mass in g/mol and volume in liters. There is no unit selector, so 250 mL must be typed as 0.25.
- All three boxes are required and each must be greater than zero; otherwise you get a message asking for positive values.
- Moles and molarity are both shown to four decimal places, and molarity is labelled mol/L.
- The molar mass is not looked up for you. Add up the atomic masses for your formula and type the total.
Three worked examples
40 g of sodium hydroxide (molar mass 40 g/mol) made up to 2 L is 40 ÷ 40 = 1.0000 mol, so the molarity is 1 ÷ 2 = 0.5000 mol/L.
9.8 g of sulfuric acid (98.08 g/mol) in 0.25 L gives 0.0999 mol and 0.3997 mol/L. The moles come out just under 0.1 because 9.8 is a little less than one tenth of 98.08.
The unit slip to avoid: 250 g of glucose (180.16 g/mol) in 500 mL. Typing 0.5 for the volume gives 1.3877 mol and 2.7753 mol/L. Typing 500 by mistake gives 0.0028 mol/L, which is a thousand times too small.
Limits
This is molarity (moles per liter of final solution), not molality, which divides by the mass of solvent. The tool also does not adjust for purity, water of crystallization or temperature, so use the molar mass of the exact form you weighed out.
Examples
5.844 g of sodium chloride, with a molar mass of 58.44 g/mol, is 0.1000 mol, and dissolved to make 1 liter of solution that is 0.1000 mol/L. 10 g of a compound with a molar mass of 40 g/mol in 0.5 liter gives 0.2500 mol and 0.5000 mol/L.
The volume must be the final volume of the solution in liters, not the volume of solvent you started with, and a volume of zero returns "Please enter positive values." Results are shown to four decimal places.
Frequently asked questions
Where do I find a compound's molar mass?
Add up the atomic masses of every atom in the chemical formula from a periodic table — for example, NaCl is Na (≈23) + Cl (≈35.5) = 58.5 g/mol.
Does volume mean the volume of solute or the whole solution?
The whole solution's final volume after the solute is dissolved and made up to volume — not just the volume of solvent added.
Can I type the volume in milliliters?
No. The box expects liters, so divide milliliters by 1,000 first. 750 mL is entered as 0.75.
Why is my very dilute answer shown as 0.0028 or even 0.0000?
Molarity is rounded to four decimals, so extremely dilute solutions lose their detail. Check that you entered liters and not milliliters, then read the moles result, which carries the same four-decimal precision.
Does it work backwards to find the mass I need?
Not directly. It goes from mass to molarity only. To plan a solution, rearrange the formula: mass = molarity × volume × molar mass, then enter that mass to confirm the molarity.