Molarity Calculator

Find the concentration of a solution from moles or grams, or work out how much solute to weigh out for a target concentration. Molar masses are computed automatically.

Molarity from moles

Molarity from mass

Solute for a target solution

How molarity works

Molarity M is the concentration of a solution in moles of solute per litre of solution: M = n / V. One mole of any substance contains Avogadro's number (6.022 × 10²³) of particles, and one mole of a compound weighs its molar mass in grams — so 58.44 g of NaCl dissolved and made up to 1 L gives exactly 1 M NaCl.

To go from grams to moles, divide by the molar mass of the formula (n = m / M) — the formula you type is parsed and its molar mass calculated automatically here. All three cards solve the same relation n = M × V, rearranged for the quantity you need.

For the mass-based results, molar masses use the standard atomic weights from the Periodic-Table-JSON dataset. Volumes are treated as the final solution volume (or the solvent volume for a rough first approximation).