Calculating the borrowing period