Molarity provides connection between moles of a solute and the volume of its solution. The definition provided serves as a tool for calculating molarity from the values of moles of solute and volume of solution. The molarity of a solution is calculated by taking the moles of solute and dividing by the liters of solution.

Molarity = $\frac{Moles\ of\ solute}{Liters\ of\ solution}$

Molarity is the tool we use to write an equivalence between moles of solute and volume of solution, from which appropriate conversion factors can be formed.

Some of the solved problems based on Molarity formula is gien below:

Question 1: There are 150g of salt in 500mL of a saline soluion. What is the molarity of this solution?
As before, NaCl has a gram molecular weight of 58.44g/mol. We are using 150g of NaCl, and the volume we want is 0.5L. Now plug these values into the molarity formula.

M = $\frac{\frac{g}{L}}{gmw}$ = $\frac{g}{L} \times \frac{1\ mol}{gmw}$

M = $\frac{\frac{150\ g}{0.5L}}{58.44g\ mol^{-1}}$

M = $\frac{151g}{0.5L} \times \frac{1\ mol}{58.44g}$

M = 5.13347 mol/L

Thus, the concentration of this solution is approximately 5.13 mol/L = 5.13M.

Question 2: Calculate the molarity of NaOH in the solution which is prepared by dissolving 4g in enough water to form 250mL of the solution.
Molar mass of NaOH = 40g

4.00g of NaOH = $\frac{4}{40}$

= 0.01 mole of NaOH

Molarity = $\frac{Moles\ of\ solute}{Given\ volume (L)}$ $\times$ 1(L) 

Molarity = $\frac{0.1}{0.25}$ $\times$ 1 = 0.4 mol L-1

Molarity = 0.04M

Therefore, the molarity of NaOH is 0.04 M.