To calculate molarity, divide the number of moles of solute by the volume of the solution in liters. If you don't know the number of moles of solute but you know the mass, start by finding the molar mass of the solute, which is equal to all of the molar masses of each element in the solution added together.