Calculating the required mass