Calculation of interest and principal payments