To find the pH of a solution when mass and volume are given, first calculate the concentration of the solution by dividing the mass of the solute by the volume of the solution. Then, take the negative logarithm of the concentration to find the pH of the solution using the formula pH = -log \[H+\].