Molarity (M) is the number of of solute dissolved in one litre of solution whereas molality (m) is the number of of the solute per thousand grams of solvent.
If MB is the molar mass of solute, d is the density of solution then molarity (M) value of a solution can be converted into its molality (m) by using the following for formula.