how to calculate the cost of plumbing