--- title: "INTEREST CALCULATION" type: "article" slug: "interest-calculation" url: "http://localhost/article/interest-calculation/" markdown_url: "http://localhost/article/interest-calculation.md" published_at: "2025-02-23T22:53:55+00:00" modified_at: "2026-06-21T23:36:09+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "This program will help you figure out the amount of the interest on your loans… The Menu 1- Calculate interest only This section will first ask you to enter the data such as the loan amount, term, etc. It will then calculate the interest. If you wish to find out how long it will take…" category: - name: "Byte Power" slug: "byte-power" taxonomy: "category" url: "http://localhost/category/periodicals/byte-power/" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Kristian Boisvert" slug: "boisvert-kristian" taxonomy: "indiv" url: "http://localhost/indiv/boisvert-kristian/" publication_r: id: 38570 title: "Byte Power 1st Class Magazine" type: "periodical" url: "http://localhost/periodical/byte-power-1st-class/" authors_r: - name: "Kristian Boisvert" slug: "boisvert-kristian" taxonomy: "indiv" url: "http://localhost/indiv/boisvert-kristian/" issues_articles: - id: 38578 title: "Byte Power Fall 1987" type: "issue" url: "http://localhost/issue/byte-power-8/" pubdate: "Fall 1987" archive_link: false article_media: - id: 59180 title: "Interest Calculation" type: "computer_media" url: "http://localhost/computer_media/interest-calculation/" --- # INTEREST CALCULATION This program will help you figure out the amount of the interest on your loans… The Menu 1- Calculate interest only This section will first ask you to enter the data such as the loan amount, term, etc. It will then calculate the interest. If you wish to find out how long it will take to pay off your loan, just enter 1000 years for the term. It will then give you how many months it took to pay it off. If you wish to know the interest you will pay after say, 10 months on a 1 year term loan then enter 10/12 (divided) for the term, it will then give you the accumulated interest and the balance to pay on the loan. 2- Calculate interest + balance This section will also ask you to enter the data and will then show you month by month the interest and the new balance. Again if you want to see how long it will take just enter 1000 years (or any big number of years). 3- Select printer This program allows you to printout the data on either the TS2040 thermal printer or an 80 column printer. To select the right printer just press any key and [ENTER] when you are finished. For large printers load your DRIVER AT 64000. 4- Printer ON/OFF This is used to turn printer on or off, just press any key to select and press [ENTER] when finished. 5- Quit This is used to return to BASIC. Loading name: INTER Program type: Business utility Written by: Kristian Boisvert ## Source Code: Interest Calculation ``` 1 REM INITIALISE 2 DIM Z$(80): LET OFF=1: LET printer=1 5 REM PRINT MENU 10 INK 0: PAPER 7: BORDER 7: CLS 20 PRINT AT 2,6;"INTEREST CALCULATION" 30 PRINT AT 6,0;"1- Calculate Interest Only"''"2- Calculate Interest + Balance"''"3- Select Printer ("+("FULL SIZE" AND PRINTER=0)+("TS2040" AND PRINTER=1);")"''"4- Printer "+CHR$ 20+CHR$ (NOT OFF)+"ON/"+CHR$ 20+CHR$ OFF+"OFF"''"5- Quit" 32 PRINT AT 20,2;"Written by Kristian Boisvert"'TAB 8;"©1987 BYTE POWER" 35 REM WAIT FOR ENTRY 40 LET a$=INKEY$ 50 IF a$="1" THEN GO TO 1000: REM SHOW INTEREST ONLY 60 IF a$="2" THEN GO TO 2000: REM SHOW INTEREST + BALANCE 80 IF a$="3" THEN GO TO 3000: REM SELECT PRINTER 85 IF a$="4" THEN GO TO 4000: REM PRINTER ON/OFF 86 IF a$="5" THEN STOP : REM STOP PROGRAM 90 GO TO 40 997 998 REM CALCULATE INTEREST ONLY 999 1000 LET TERM1=0: GO TO 2010: REM SAME FORMULA! 1997 1998 REM CALCULATE BAL+INTEREST 2000 LET term1=1 2010 LET INTEREST=0: GO SUB 9000: CLS 2011 LET payment1=payment 2015 IF term1=0 THEN PRINT '"Calculating..." 2016 LET Z$="": IF TERM1=1 AND OFF+PRINTER=0 THEN LPRINT ''"MONTH PRINCIPAL PAYMENT INTEREST BALANCE"'' 2020 FOR m=1 TO term*12 2025 LET monthly interest=amount*(rate/100)/12 2026 LET monthly interest=INT (monthly interest*100+.5)/100 2030 IF term1=1 THEN LET dummy=monthly interest: GO SUB 8000: LET m$=d$ 2040 LET principal=payment-monthly interest 2050 IF term1=1 THEN LET dummy=principal: GO SUB 8000: LET p$=d$ 2060 LET interest=interest+monthly interest 2070 IF amount0 THEN GO TO 2105 2102 LET Z$(4-LEN STR$ M TO )=STR$ M 2103 LET Z$(21-LEN P$ TO )=P$: LET Z$(39-LEN Q$ TO )=Q$: LET Z$(57-LEN M$ TO )=M$: LET Z$(75-LEN A$ TO )=A$ 2104 LPRINT Z$: GO TO 2108 2105 IF term1<>0 AND PRINTER=1 AND OFF=0 THEN LPRINT '"Month:";m''"Principal: $";p$''"Payment: $";q$''"Interest: $";m$''"New balance: $";a$'"--------------------------------" 2109 IF TERM1=1 AND OFF=1 THEN PRINT AT 21,0;"Press any key to continue": PAUSE 0 2110 IF AMOUNT=0 THEN GO TO 2210 2115 NEXT m 2210 LET dummy=interest: GO SUB 8000: LET i$=d$: LET dummy=amount: GO SUB 8000: LET a$=d$: LET dummy=payment1: GO SUB 8000: CLS : FOR g=2 TO 2+(1 AND off=0): PRINT #g''"Amount of loan: $";l$''"Rate: ";rate;"%"''"Monthly payments: $";d$''"Term: ";term;" year"+("s" AND term>1) 2219 PRINT #g;'(("Loan paid in "+STR$ m++" month"+("s" AND m>1)) AND AMOUNT=0);("Amount left on loan: $"+a$ AND amount<>0)''"Total interest paid: $";i$ 2220 NEXT g: IF OFF=0 THEN LPRINT ''"--------------------------------------------------------------------------------"( TO 0+(32 AND printer=1)+(80 AND printer=0))'' 2230 PRINT AT 21,0;"Press any key to go back to Menu": PAUSE 0: GO TO 10 3000 REM SELECT PRINTER 3001 CLS : PRINT ''TAB 9;"Select Printer" 3002 IF PRINTER=0 THEN PRINT AT 10,0;TAB 7;"FULL SIZE PRINTER";TAB 31; 3003 IF PRINTER=1 THEN PRINT AT 10,5;"TS2040 THERMAL PRINTER" 3010 PAUSE 0: LET A$=INKEY$: IF A$=CHR$ 13 THEN GO TO 10 3020 LET PRINTER=NOT PRINTER: GO TO 3002 4000 REM PRINTER ON/OFF 4001 CLS : PRINT ''TAB 9;"PRINTER ON/OFF" 4005 IF OFF=1 THEN PRINT AT 10,10;"PRINTER OFF" 4006 IF OFF=0 THEN PRINT AT 10,10;"PRINTER ON " 4010 PAUSE 0: LET A$=INKEY$: IF A$=CHR$ 13 THEN GO TO 10 4020 LET OFF=NOT OFF: GO TO 4005 8000 REM PUT IN 0.00 FORMAT 8005 LET dummy=INT (dummy*100+.5)/100 8010 LET d$=STR$ dummy: IF dummy<1 AND dummy<>0 THEN LET d$="0"+d$ 8020 IF INT dummy=dummy THEN LET d$=d$+".00": RETURN 8025 LET y$=STR$ INT (dummy*10): LET x$=STR$ (dummy*10) 8030 IF x$=y$ THEN LET d$=d$+"0" 8040 RETURN 9000 CLS 9010 PRINT ''"Amount of loan: $"; 9020 INPUT "Amount:";amount: IF amount<=0 THEN GO TO 9020 9030 LET dummy=amount: GO SUB 8000 9040 LET l$=d$ 9060 PRINT l$ 9070 PRINT '"Interest rate (%): "; 9080 INPUT "Rate:";rate 9090 IF rate<0 OR rate>100 THEN GO TO 9080 9100 PRINT rate;"%" 9110 PRINT '"Term (Years): "; 9120 INPUT "Term:";term: IF term<=0 THEN GO TO 9120 9130 PRINT term;" Year"+("s" AND term>1) 9136 PRINT '"Monthly payments: $"; 9137 INPUT "Payment:";payment 9138 IF payment<=0 THEN GO TO 9137 9139 LET dummy=payment: GO SUB 8000: LET q$=d$: PRINT q$ 9140 INPUT "Is this correct? "; LINE a$ 9150 IF a$="N" OR a$="n" THEN GO TO 9000 9160 IF a$="y" OR a$="Y" THEN RETURN 9170 GO TO 9140 9999 SAVE "INTER" LINE 1 ```