Interest Calculator

This program will simulate a repayment mortgage. (Loan)

The initial loan it set up on line 30, the interest rate on line 40, as a fraction. Monthly payments on on line 50, and number of years line 60.

10 PRINT "Mortgage Simulator"
20 PRINT "------------------"
30 loan=100000
40 intrate=0.05
50 payment=800
60 term=15
70 FOR y=1 TO term
101 totcap=0
102 totint=0
103 cappay=0
104 intpay=0
110 FOR month=1 TO 12
130 intpay=(loan*intrate)/12
140 cappay=payment-intpay
145 PRINT "Interest ";
146 PRINT intpay;
147 PRINT " Capital ";
148 PRINT cappay
150 loan=loan-cappay
155 totcap=totcap+cappay
156 totint=totint+intpay
160 NEXT
161 PRINT "Year:";
162 PRINT y
165 PRINT "Year end interest: ";
170 PRINT totint
175 PRINT "Year end repayment: ";
180 PRINT totcap
190 PRINT "Remaining debt: ";
200 PRINT loan
250 NEXT

(c) 2017 PicoCreate

Terms and conditions apply, click here for further details