Breakeven Analysis

Developer(s): Mel Routt
Date: 1982
Type: Program
Platform(s): ZX81, TS 1000
Tags: Business

A breakeven table from BASIC Computer Programs for Business, Volume 1, by Charles D. Sternberg. Enter the fixed costs, the variable cost per unit, the unit price, and the first and last quantities for the table with the step between them. You can correct the figures before the program goes on. The table lists, for each quantity, the job cost, revenue, profit or loss and unit cost, with a BREAKEVEN line at the quantity where cost equals revenue, followed by the total variable costs.

The screen goes blank while it calculates. A long table fills the screen and stops with report 5; press CONT and ENTER to see the rest.

Published in Syntax January 1982 (Breakeven Analysis).

Related Articles

This program requires only a single video format for all control data input with an option to erase and re-enter data. This option occurs just before computation, which doesn't begin until you approve data entries.

Image Gallery

Source Code

   1 REM "PROFLOSS TABLE"
   2 REM BY MEL ROUTT, 10/3/81
   3 REM ADAPTED FROM PG 69
   4 REM "BASIC COMPUTER PROGRAMS FOR BUSINESS, VOL. 1"
   5 REM BY CHARLES D. STERNBERG
   6 REM COPYRIGHT 1980
   7 REM BY PERMISSION MR MADARAS
   8 REM HAYDEN BOOK CO.
   9 REM ROCHELLE PARK, NJ 07662
  10 CLS
  15 PRINT
  20 PRINT "PROFIT/LOSS/BREAKEVEN TABLE"
  25 PRINT
  30 PRINT " ENTER CONTROL DATA:"
  35 PRINT
  40 PRINT "FIXED COSTS:";TAB 21;"$";
  45 INPUT F
  50 PRINT F
  55 PRINT
  60 PRINT "VARIABLE COSTS:";TAB 21;"$";
  65 INPUT V
  70 PRINT V
  75 PRINT
  80 PRINT "UNIT PRICE:";TAB 21;"$";
  85 INPUT P
  90 PRINT P
  95 PRINT
 100 PRINT "START QTY OF TABLE:";TAB 22;
 105 INPUT Q1
 110 PRINT Q1
 115 PRINT
 120 PRINT "STOP QTY OF TABLE:";TAB 22;
 125 INPUT Q2
 130 PRINT Q2
 135 PRINT
 140 PRINT "INCREMENT TABLE BY:";TAB 22;
 145 INPUT S
 150 PRINT S
 155 PRINT
 160 PRINT
 165 PRINT "IF DATA CORRECTION REQ/D TYPE   ""YES"" AND ""N/L""."
 170 PRINT
 175 PRINT "IF DATA OK PRESS ""N/L""."
 180 INPUT D$
 185 IF D$="YES" THEN GOTO 10
 190 CLS
 195 PRINT " PROFIT/LOSS(-)/BREAKEVEN TABLE:"
 200 PRINT
 205 PRINT "RUN";TAB 7;"JOB";TAB 15;"REV.";TAB 22;"PROF";TAB 27;"UNIT"
 210 PRINT "QTY";TAB 7;"COST";TAB 22;"LOSS";TAB 27;"COST"
 215 FOR I=1 TO 32
 220 PRINT "=";
 225 NEXT I
 230 LET Q0=F/(P-V)
 235 LET X=Q0
 240 GOSUB 700
 245 LET Q0=X
 250 LET R0=P*Q0
 255 LET X=R0
 260 GOSUB 700
 265 LET R0=X
 270 LET Q=Q1
 275 LET C0=F+(V*Q0)
 280 LET X=C0
 285 GOSUB 700
 290 LET C0=X
 295 LET V1=V*Q
 300 LET R=P*Q
 305 LET C=F+(V*Q)
 310 LET U=C/Q
 315 LET X=U
 320 GOSUB 700
 325 LET U=X
 330 LET A=R-C
 335 IF Q<Q0 THEN GOTO 360
 340 GOSUB 600
 345 PRINT Q0;TAB 7;C0;TAB 15;R0;TAB 23;"BREAKEVEN"
 350 GOSUB 600
 355 LET Q0=999999999999
 360 PRINT Q;TAB 7;C;TAB 15;R;TAB 22;A;TAB 27;U
 365 LET Q=Q+S
 370 IF Q<Q2+S THEN GOTO 295
 375 PRINT
 380 PRINT "TOTAL VARIABLE COSTS: $";V1
 385 PRINT
 390 PRINT "IF YOU WISH TO RUN NEW DATA     TYPE ""YES"" AND ""N/L""."
 395 PRINT
 400 PRINT "IF NOT PRESS ""N/L""."
 405 INPUT D$
 410 IF D$="YES" THEN GOTO 10
 415 PRINT
 420 PRINT "IT WAS A PLEASURE TOSERVE YOU."
 425 STOP
 600 FOR I=1 TO 32
 605 PRINT "-";
 610 NEXT I
 615 RETURN
 700 LET X=(INT (100*(X+.005)))/100
 705 RETURN

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