One of the most rewarding and interesting aspects of programming is in designing accurate and meaningful programs for business application…and our TS2068 (and TS1000) are highly adaptable to this purpose. (Mr. Sugar please pay attention!)
Being a retired Federal Auditor, I have always had a profound interest in accounting and tax programs. I currently keep several sets of books for small business in my area and rely entirely on my 2068 to do most of the work. During tax season for the past two years, I have used my 2068 (and my 1000 before that), to perform the complex calculations required in the preparation of my clients returns.
I have seen several tax programs that have been produced during the past several years. I have even had occaison to work with one highly praised program written for the Apple. For the most part, the programs (including the one for the Apple) left much to be desired. They appeared to be “word processor” programs with an add/subtract function…you still needed a calculator, a scratch pad, and a stack of charts and schedules and a lot of patience to operate them.
A truly dedicated income tax program should require you to have nothing on your desk but your computer, your W2’s, some receipts and a cup of coffee. It may be helpful to have a manual nearby (Lasser is about the best), just in case you have to check some theory, which is impossible for your computer to do (so far).
The main program itself is a snap to write. After all, the entire pseudo-code is already written for you on the tax form itself. The only thing you need to do is assign variables to the lines on the form, and you’re in business. Setting parameters for some items would be helpful and this would allow the computer to alarm you for values that could trigger an audit. These figures can be found in most good manuals (but not from the IRS), and are programmable.
That brings us to the various calculations required to determine the taxable or deductible values of certain items on the return (i.e., Social Security, retirement income, IRA’s, marriage deduction, ect.). These can be found in the instructions for the official forms, and are easily programmable as sub-routines.
All of the attached schedules can be easily programmed including schedule “C” and simple schedule “D”. Schedule “G” presents quite a challenge for the programmer, but can be done. This one is really fun to write and you have a really warm feeling of accomplishment when you complete it.
This brings us to the actual tax calculation itself. Equations used to calculate taxes as with most accounting equations require only basic arithmetic skill (addition, subtraction, multiplication and sometimes division). In fact if any higher mathematics were essential, I would have gone into worm-farming instead of accounting!
Now two methods are used to determine tax liabilities. Note that I said “are” used, and not “may” be used. There are the X, 2Y’s(?), and Z Tax Rate Schedules and then there are the ever popular Tax Tables.
The Internal Revenue Service in their infinite wisdom, with the help of Congress, gives us no choice. In fact, that freedom is not even addressed in the U.S. Constitution. If your taxable income is less than $50,000 per tax year you MUST use the TAX TABLES to calculate your tax liability. (An exception is the use of schedule “G”, and the use of form 4972–Special 10 Year Averaging, which only determines the tax on specific types of income and not your total taxable income).
Now looking up a figure on a Tax Table appears to be a fairly simple thing to do, and one would think that any eleven year old would accomplish it with ease. But not only are the Tax Tables (with their 4,932 separate brackets) NOT easy to use, but they are one of the great inequities that exist in the current tax system. Actual IRS statistics show that more HONEST mistakes are made in this area than any other.
Tax Reform is not the subject of this article, so now let’s get back to business. The IRS in preparing the Tables did not just pull the figures out of the air, but did apply a specific formula. You can’t call the local IRS office to get the formula, because I doubt that the “voice” on the other end of the phone would even know what it is.
It took a few hours of mostly “hit and miss” calculating, but I finally figured out the precise formula used by the IRS programmers. Once I had the equation, breaking down the XYZ schedules into DATA statements was no problem. Then I set out to write the algorythm to calculate the tax. It is necessary to calculate the tax twice at both the upper and the lower bracket parameters for the particular taxable income. This should produce the exact tax found in the Tax Table. Simple, right? Wrong!!! For some reason the IRS computers, billed as the “most sophisticated computer system in the world”, goof-up once in awhile. This is not the ordinary computer goof that may occur due to binary conversions, but goofs in entire sections of the tables. This year, it only occured in one small section of the tables (which is an improvement over past years). I told an auditor at a local IRS office about it last year. He just smiled and said, “Well it’s only a dollar off!”. True, but it’s our dollar.
Since most of us MUST use the Tax Tables, we must also use the correct figures. Therefore, in the Tax Calculator program that follows, some calculations within the DATA itself were necessary so that our 2068 could compensate for the inadequateness of the IRS computers. Line 9512 [DATA 131.9-sch] Everyone with taxable income from $3,700 to $5999.99 will be charged an extra buck. Line 9522 [DATA 0-((ta>3670 AND (ta>3700))+sch)] Taxpayers with taxable amounts $3670 to $3688.99 will get a $1 break. Hey IRS! “It’s only a dollar!”.
All that is left for you to do now is to type-in the sub-program and work it into your own main program. The program itself is lines 1100 thru 9544. The INPUT and OUTPUT variables are detailed in the REM at 1100.

Lines 100 thru 160 are a test module. Plug in some figures and then check them against the Tax Tables that came with your 1040. Since the test module is only intended to test Form 1040, 1040A & EZ, it is necessary to put in a dummy variable (sch=0) so that the program will calculate Tax Table tax. If you are going to calculate tax for other forms or schedules, “sch” should be set to 1 (true).
I would like to get some “feedback” as to how you liked this program, and if you would like to see some more along the same lines. You can either write to TIME DESIGNS, or you can write to me direct. I’ll give you “sudden service” on answering any questions. You can locate me here, behind the same old stand at [address omitted], Chesapeake, VA 23323.
0>REM 1986
**Federal Tax Calculator**
by: herb bowers, sr.
December 1986
100 REM ▒Test Module 1▒
110 LET sch=0:
REM dummy variable
120 INPUT "Filing status (1 TO
5)?"'fs: PRINT "Filing Status: "
;fs
130 INPUT ("Taxable Income:
"'" 1040, Line 37"'" 1040A, Line
19"'" 1040EZ, Line 7")'ta: PRIN
T "Taxable Income: $";ta
140 PRINT "Tax Liability: $";
150 GO SUB 1100: PRINT tax''
160 GO TO 120
1100 REM ▒tax calculation▒
INPUT: ta=taxable amount
fs=filing status
(1 to 5)
sch=Any schedule or
Form other than
1040, 1040A or EZ
OUTPUT: tax=tax liability
1110 LET l=ta: LET l=l/100:
LET data=9500+(fs*10)
-((fs=5)*30)
1120 IF NOT sch AND ta<50000
THEN GO TO 1140
1130 GO SUB 1200:
LET tax=INT (l*100+.5)/100:
RETURN
1140 IF ((fs=1 OR fs=4) AND
ta<=2480) OR ((fs=2 OR
fs=5) AND ta<=3670) OR
((fs=3) AND ta<=1850) THEN
LET tax=0: RETURN
1150 LET br=25+((l>30)*25):
LET b1=INT (ta/br):
LET b2=b1*br: LET b3=b2+br:
LET l=b2/100
1160 GO SUB 1200: LET l1=l:
LET l=b3/100
1170 GO SUB 1200: LET l2=l
1180 LET tax=INT ((l1+l2)/2+.5)
1190 RETURN
1200 RESTORE data: LET lo=0
1210 FOR f=1 TO 15+(fs=1)
1220 READ hi,plus,pct
1230 IF l>lo AND l<=hi THEN
LET l=(l-lo)*pct+plus: RE
TURN
1240 LET lo=hi: NEXT f: RETURN
9500 REM ▒tax calculation data▒
9510 REM ▒single▒
9512 DATA 24.8,0,0,36.7,0,11,47.
5,131.9-sch,12,70.1,260.5,14,91.
7,576.9,15,116.5,900.9,16,139.2,
1297.7,18,161.9,1706.3,20,196.4,
2160.3,23
9514 DATA 253.6,2953.8,26,310.8,
4441,30,368,6157,34,447.8,8101.8
,38,596.7,11134.2,42,882.7,17388
,48,1E36,31116,50
9520 REM ▒joint & q/w▒
9522 DATA 36.7,0,0,59.4,0-((ta>3
670) AND (ta<3700))+sch,11,82,24
9.7,12,128.4,520.9,14,172.7,1170
.5,16,218,1879.3,18,265.5,2694.7
,22,322.7,3739.7,25
9524 DATA 379.8,5169.7,28,494.2,
6768.5,33,647.5,10543.7,38,923.7
,16369.1,42,1180.5,27969.5,45,17
52.5,39525.5,49,1E36,67553.5,50
9530 REM ▒married filing sep.▒
9532 DATA 18.35,0,0,29.7,0,11,41
,124.85,12,64.2,260.45,14,86.35,
585.25,16,109,939.65,18,132.75,1
347.35,22,161.35,1869.85,25
9534 DATA 189.9,2584.85,28,247.1
,3384.25,33,323.75,5271.85,38,46
1.85,8184.55,42,590.25,13984.75,
45,876.25,19762.75,49,1E36,33776
.75,50
9540 REM ▒head of household▒
9542 DATA 24.8,0,0,47.5,0,11,70.
1,249.7,12,93.9,520.9,14,127.3,8
54.1,17,161.9,1421.9,18,196.4,20
44.7,20,253.6,2734.7,24
9544 DATA 310.8,4107.5,28,368,57
09.1,32,482.4,7539.5,35,653.9,11
543.5,42,882.7,18746.5,45,1168.7
,29042.5,48,1E36,42770.5,50
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.