--- title: "Sinking Fund" id: 76610 type: "computer_media" slug: "sinking-fund" url: "http://localhost/computer_media/sinking-fund/" markdown_url: "http://localhost/computer_media/sinking-fund.md" published_at: "2026-11-11T08:02:21+00:00" modified_at: "2026-11-11T08:02:21+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/sinking-fund-1.png" excerpt: "Work out how much to put away each month to meet up to twelve future payouts, taking account of single investments and other monthly savings." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Russell Crum" slug: "russell-crum" taxonomy: "indiv" url: "http://localhost/indiv/russell-crum/" genre: - name: "Finance" slug: "finance" taxonomy: "genre" url: "http://localhost/type/finance/" media_type: "Program" programmers: - name: "Russell Crum" slug: "russell-crum" taxonomy: "indiv" url: "http://localhost/indiv/russell-crum/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Sinking%20Fund%20%281983%29%28Crum%2C%20Russell%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/sinking-fund-1.png" - url: "http://localhost/wp-content/uploads/2026/11/sinking-fund-2.png" article_media: - id: 19404 title: "Sinking Fund" type: "article" url: "http://localhost/article/sinking-fund/" media_type_tags: "Finance" license: false --- # Sinking Fund A sinking fund calculator. Enter the month and year to start, then up to ten single investments, up to four monthly investments that you already make and up to twelve payouts, each with its month, year and amount; enter 0 for the month to end a section. Entries in each section must be in date order. After you give the expected interest rate, the program tries one monthly amount after another in FAST mode until the balance at the end is within $100 of zero, then prints the monthly investment needed and the final balance. A run takes a minute or two. There are no error traps, so enter the data with care. The article explains how to change the $100 margin (lines 1100-1130) and how many entries each section holds. Four REM lines (130, 400, 530 and 1090) carry inverse labels that cannot be read on the scan; they are bare REMs in the download, which does not change how the program works. Published in Syntax January 1983 ([Sinking Fund](https://timexsinclair.com/article/sinking-fund/)). ## Source Code ``` 10 REM SINKING FUND PROGRAM 20 REM R. CRUM JULY 1,1982 30 DIM A(10,3) 40 DIM B(4,3) 50 DIM C(12,3) 60 DIM E(2) 70 LET B=0 80 LET C=0 90 LET D=0 100 LET E=0 110 LET Y=0 120 GOTO 1210 130 REM [illegible] 140 FAST 150 LET F=C(1,2) 160 LET H=C(1,1) 170 IF B=0 THEN GOTO 280 180 FOR N=1 TO B 190 LET I=A(N,2) 200 LET J=A(N,1) 210 IF I>F THEN GOTO 280 220 IF I=F AND J>H THEN GOTO 280 230 LET K=(F-I)*12+(H-J) 240 LET L=A(N,3) 250 GOSUB 1030 260 LET Y=Y+Z 270 NEXT N 280 REM ADDITIONAL MONTHLY INVEST 290 IF C=0 THEN GOTO 400 300 FOR N=1 TO C 310 LET I=B(N,2) 320 LET J=B(N,1) 330 IF I>F THEN GOTO 400 340 IF I=F AND J>H THEN GOTO 400 350 LET K=(F-I)*12+(H-J) 360 LET L=B(N,3) 370 GOSUB 1060 380 LET Y=Y+Z 390 NEXT N 400 REM [illegible] 410 LET Q=E(1) 420 LET R=E(2) 430 LET K=(F-R)*12+(H-Q) 440 LET Z=M*(((1+A)**K-1)/A) 450 LET Y=Y+Z 460 LET X=Y-C(1,3) 470 IF X<0 THEN LET M=M-(X/((C(D,2)-R)*12+(C(D,1)-Q))) 480 IF X<0 THEN LET Y=0 490 IF X<0 THEN GOTO 130 500 LET S=D-1 510 LET P=2 520 IF S=0 THEN GOTO 1090 530 REM [illegible] 540 LET E=C(P,2) 550 LET G=C(P,1) 560 LET L=X 570 LET K=(E-F)*12+(G-H) 580 GOSUB 1030 590 LET Y=Z 600 IF B=0 THEN GOTO 730 610 FOR N=1 TO B 620 LET I=A(N,2) 630 LET J=A(N,1) 640 IF I>E THEN GOTO 730 650 IF IG THEN GOTO 730 680 LET L=A(N,3) 690 LET K=(E-I)*12+(G-J) 700 GOSUB 1030 710 LET Y=Y+Z 720 NEXT N 730 IF C=0 THEN GOTO 900 740 FOR N=1 TO C 750 LET I=B(N,2) 760 LET J=B(N,1) 770 IF I>E THEN GOTO 900 780 IF I=E AND J>G THEN GOTO 900 790 IF I100 AND M<1 THEN GOTO 1180 1110 IF X>100 OR X<-100 THEN LET M=M-(X/((C(D,2)-R)*12+(C(D,1)-Q))) 1120 IF X>100 OR X<-100 THEN LET Y=0 1130 IF X>100 OR X<-100 THEN GOTO 130 1140 SLOW 1150 PRINT "$";M;" MONTHLY REQUIRED" 1160 PRINT "BALANCE AT END IS $";X 1170 STOP 1180 PRINT "NO ADDITIONAL MONTHLY INVESTMENT REQD" 1190 PRINT "BALANCE AT END IS $";X 1200 STOP 1210 PRINT "THIS PROGRAM COMPUTES MONTHLY" 1220 PRINT "INVESTMENT NEEDED TO PROVIDE UP TO TWELVE PAYOUTS. UP TO TEN" 1230 PRINT "SINGLE INVESTMENTS MAY BE" 1240 PRINT "PROGRAMMED AND 4 ADDITIONAL" 1250 PRINT "MONTHLY INVESTMENTS. ADDITIONAL MONTHLY INVESTMENTS ARE ASSUMED TO CONTINUE TO THE LAST PAYMENT SCHEDULED. PRESS""0""AND""ENTER"" TOEXIT A PARTICULAR SECTION OF THE" 1260 PRINT "PROGRAM" 1270 PAUSE 1500 1280 CLS 1290 PRINT AT 0,0;"MO. TO START CALC?(2 DIGITS)" 1300 INPUT E(1) 1310 PRINT AT 0,29;E(1) 1320 PRINT AT 2,0;"YR. TO START CALC?(4 DIGITS)" 1330 INPUT E(2) 1340 PRINT AT 2,28;E(2) 1345 PAUSE 250 1350 FOR N=1 TO 10 1355 CLS 1360 PRINT "SINGLE INVEST NO.";N;" MO.(2 DIGITS)" 1370 INPUT A(N,1) 1380 PRINT A(N,1) 1390 IF A(N,1)=0 THEN GOTO 1480 1400 PRINT "SINGLE INVEST NO.";N;" YR.(4 DIGITS)" 1410 INPUT A(N,2) 1420 PRINT A(N,2) 1430 PRINT "SINGLE INV.NO.";N;" AMT(6 DIG.MAX)" 1440 INPUT A(N,3) 1450 PRINT A(N,3) 1455 PAUSE 250 1460 LET B=N 1470 NEXT N 1480 FOR N=1 TO 4 1485 CLS 1490 PRINT "MO.INV.NO.";N;" MO.BEGIN(2 DIGITS)" 1500 INPUT B(N,1) 1510 PRINT B(N,1) 1520 IF B(N,1)=0 THEN GOTO 1610 1530 PRINT "MO.INV.NO.";N;" YR BEGIN(4 DIGITS)" 1540 INPUT B(N,2) 1550 PRINT B(N,2) 1560 PRINT "MO.INV.NO";N;" AMT(6 DIGITS MAX)" 1570 INPUT B(N,3) 1580 PRINT B(N,3) 1585 PAUSE 250 1590 LET C=N 1600 NEXT N 1610 FOR N=1 TO 12 1615 CLS 1620 PRINT "PMT NO.";N;" MO.(2 DIGITS)" 1630 INPUT C(N,1) 1640 PRINT C(N,1) 1650 IF C(N,1)=0 THEN GOTO 1740 1660 PRINT "PMT NO.";N;" YR.(4 DIGITS)" 1670 INPUT C(N,2) 1680 PRINT C(N,2) 1690 PRINT "PMT NO.";N;" AMT(6 DIGITS MAX)" 1700 INPUT C(N,3) 1710 PRINT C(N,3) 1715 PAUSE 250 1720 LET D=N 1730 NEXT N 1740 PAUSE 1000 1750 CLS 1760 PRINT AT 0,0;"ASSUMED INTEREST RATE/YR?" 1770 PRINT AT 1,0;"E.G. 10=10 PER CENT" 1780 INPUT A 1790 LET A=A/1200 1800 LET M=100 1810 CLS 1820 GOTO 130 ```