Mintax // Incorporate

This file is part of Timex Sinclair Public Domain Library Tape 1002 . Download the collection to get this file.
Date: 198x
Type: Program
Platform(s): TS 1000

MINTAX is a personal finance program that computes and compares the effective after-tax net income for a business operated as a corporation versus a sole proprietorship. It applies a tiered U.S. corporate income tax schedule (with brackets at $25,000, $50,000, $75,000, and $100,000) and a separate tiered personal income tax subroutine (with brackets at $23,500, $55,300, and $108,300) reflecting late-1970s/early-1980s U.S. tax law. The corporate path deducts an owner salary before calculating corporate tax, then adds salary back to the remaining corporate net income to determine the owner’s personal tax base. Input validation checks that the entered salary does not exceed net income and that net income is at least $1,000 before proceeding with the analysis.


Program Analysis

Program Structure

The program is organized into a main linear flow with a shared subroutine and several error-exit paths. The overall structure is:

  1. Lines 5–24: Title display and input of net income (A) and owner salary (B).
  2. Lines 30–40: Input validation — salary must not exceed income (B>A), and income must be at least $1,000.
  3. Lines 50–210: Corporate path — salary deduction, corporate tax calculation, owner personal tax calculation, effective net income display.
  4. Lines 280–360: Proprietorship path — personal tax on full income, effective net income display.
  5. Lines 400–410 / 500–510: Error handlers with re-entry or halt.
  6. Lines 600–700: Personal income tax subroutine (GOSUB 600), using F as input and G as output.
  7. Line 800: STOP.

Tax Bracket Tables

Both corporate and personal tax calculations use a cascade of IF … THEN GOTO guards, falling through to progressively lower brackets. Note the guards are checked from the top bracket downward, but the logic relies on fall-through: if C>100000 is false, execution continues to check C>75000, etc. This is correct but unconventional — in effect the last branch that passes wins.

Bracket floorBase taxMarginal rateLines
$100,000+$26,75046%104–105
$75,000$16,75040%106–107
$50,000$9,25030%108–109
$25,000$4,25020%110
Bracket floorBase taxMarginal rateLines
$108,300+$55,69770%650–660
$55,300$20,98263%670–680
$23,500$5,36739%690
<$23,50034%630–640

The corporate brackets match the U.S. IRC rates in force circa 1981–1982; the personal brackets reflect the pre-ERTA married-filing-jointly schedule for approximately the same era.

Key BASIC Idioms

  • INT(rate*(income-floor)) — truncation via INT rather than rounding, which slightly underestimates tax (a common simplification in financial BASIC programs).
  • PRINT ,, — uses column TAB stops (comma-separated) to right-align column headers without explicit TAB() arithmetic.
  • The subroutine at line 600 communicates through global variables F (income in) and G (tax out), a standard ZX81/TS1000 BASIC pattern since local variables are not supported.
  • Line 370 uses GOTO 800 to reach STOP, bypassing the subroutine block — a clean structural choice.

Notable Techniques and Anomalies

  • Cascade guard anomaly: At lines 100–103, the guards test descending thresholds but fall through sequentially. Because each true branch immediately GOTOs past the others, the logic is correct. However, if none of the conditions 100–103 is true (i.e., C≤25000), execution falls through all four guards and arrives at line 104 (>$100,000 formula), which would compute a wildly incorrect tax. There is a latent bug: income below $25,000 is not caught and will be processed with the top bracket formula. A correct implementation would need a fifth guard or reorder the checks from lowest to highest.
  • Variable reuse: F is first used in lines 170–174 as total owner income for the corporate case, then overwritten at line 320 (LET F=A) for the proprietorship case. H is similarly reused. This is intentional and saves variable slots.
  • No dividend tax: The model treats all remaining corporate net income as flowing directly to the owner’s personal income (line 168 adds E, corporate net after tax, to the salary). This double-taxes corporate earnings at both the corporate and personal rate without modeling dividend exclusions — a simplification that may overstate the corporate tax burden.
  • Lines 810–820: A SAVE followed by RUN appears after STOP at line 800, forming an unreachable but convenient re-save/restart block that the user can jump to manually.

Content

Appears On

Assembled by Tim Ward from many sources. Contains programs 10051 – 10121.

Related Products

Related Articles

Related Content

Image Gallery

Mintax // Incorporate

Source Code

   5 REM MINTAX(INCORP--Y/N)
   6 PRINT TAB (5);"MINTAX//INCORPORATE Y/N"
   7 PRINT 
  10 PRINT "ENTER NET INCOME BEFORE SALARY AND TAXES"
  20 INPUT A
  21 PRINT A
  22 PRINT "ENTER OWNER SALARY"
  23 INPUT B
  24 PRINT B
  30 IF B>A THEN GOTO 400
  40 IF A<1000 THEN GOTO 500
  45 PRINT 
  50 PRINT ,,"CORP."
  60 PRINT "NET INCOME BEFORE SALARY AND TAXES",A
  70 PRINT "SALARY",,B
  80 LET C=A-B
  90 PRINT "NET INCOME BEFORE TAX",C
 100 IF C>100000 THEN GOTO 104
 101 IF C>75000 THEN GOTO 106
 102 IF C>50000 THEN GOTO 108
 103 IF C>25000 THEN GOTO 110
 104 LET D=26750+INT (.46*(C-100000))
 105 GOTO 140
 106 LET D=16750+INT (.40*(C-75000))
 107 GOTO 140
 108 LET D=9250+INT (.30*(C-50000))
 109 GOTO 140
 110 LET D=4250+INT (.20*(C-25000))
 140 PRINT "CORPORATE INCOME TAX",D
 150 LET E=C-D
 160 PRINT "CORP.NET INCOME",E
 162 PRINT 
 164 PRINT ,,"OWNER"
 166 PRINT "SALARY FROM ABOVE",B
 168 PRINT "CORP NET INCOME, FROM ABOVE",E
 170 LET F=B+E
 174 PRINT "TOTAL INCOME",,F
 180 GOSUB 600
 190 PRINT "PERSONAL INCOME TAX",G
 200 LET H=F-G
 210 PRINT "EFFECTIVE NET INCOME",H;"**"
 220 PRINT 
 280 PRINT ,,,"PROP."
 290 PRINT "PROP. PROFIT SAME"
 300 PRINT "    AS NET INCOME BEFORE"
 310 PRINT "    SAL AND TAXES ABOVE",,A
 320 LET F=A
 330 GOSUB 600
 340 PRINT "PERSONAL INCOME TAX",,G
 350 LET H=A-G
 360 PRINT "EFFECTIVE NET INCOME",,H;"**"
 370 GOTO 800
 400 PRINT "SALARY > NET INCOME--TRY AGAIN"
 410 GOTO 10
 500 PRINT "NET INCOME TOO LOW TO ACCEPT RISK OF ENTERING BUSINESS"
 510 GOTO 800
 600 IF F>108300 THEN GOTO 650
 610 IF F>55300 THEN GOTO 670
 620 IF F>23500 THEN GOTO 690
 630 LET G=INT (.34*F)
 640 GOTO 700
 650 LET G=55697+INT (.7*(F-108300))
 660 GOTO 700
 670 LET G=20982+INT (.63*(F-55300))
 680 GOTO 700
 690 LET G=5367+INT (.39*(F-23500))
 700 RETURN 
 800 STOP 
 810 SAVE "1011%9"
 820 RUN 

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top