--- title: "Estimate Heating Costs" id: 76420 type: "computer_media" slug: "estimate-heating-costs" url: "http://localhost/computer_media/estimate-heating-costs/" markdown_url: "http://localhost/computer_media/estimate-heating-costs.md" published_at: "2026-11-11T08:02:43+00:00" modified_at: "2026-11-11T08:02:43+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/estimate-heating-costs-1.png" excerpt: "Three ZX80 programs that work out the R value of your walls and ceiling, your home's daily heat loss, and what that heat would cost with each fuel." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Andrew Banta" slug: "banta-andrew" taxonomy: "indiv" url: "http://localhost/indiv/banta-andrew/" genre: - name: "Home" slug: "home" taxonomy: "genre" url: "http://localhost/type/home/" media_type: "Program" programmers: - name: "Andrew Banta" slug: "banta-andrew" taxonomy: "indiv" url: "http://localhost/indiv/banta-andrew/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Estimate%20Heating%20Costs%20%281981%29%28Banta%2C%20Andrew%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1981" images: - url: "http://localhost/wp-content/uploads/2026/11/estimate-heating-costs-1.png" - url: "http://localhost/wp-content/uploads/2026/11/estimate-heating-costs-2.png" - url: "http://localhost/wp-content/uploads/2026/11/estimate-heating-costs-3.png" article_media: - id: 19789 title: "Estimate Heating Costs" type: "article" url: "http://localhost/article/estimate-heating-costs/" media_type_tags: "Home" license: false --- # Estimate Heating Costs Three integer BASIC programs for comparing heating costs in a house or small building, each using all of a 1K ZX80. R Value asks for the inside wall material, insulation type and thickness, sheathing and outside surface, then the ceiling material and insulation, and prints the R values of the walls and ceiling. Heat Loss takes those R values with the house perimeter, ceiling area and height, stories, windows, storm windows and degree days, and prints the wall, ceiling and window losses and the total loss per day in hundreds of BTUs. Fuel Cost takes local prices and the daily heat loss in thousands of BTUs and prints the daily cost of heating with fuel oil, natural gas, electricity, coal and wood. The article lists the heat values and efficiencies the programs assume, and notes that integer arithmetic limits their accuracy, so the results are best used for comparisons. The download has all three programs. Heat Loss needs a little more than 1K: in 1K it runs out of memory (error 4) while printing the total, so give it 2K. Published in Syntax March 1981 ([Estimate Heating Costs](https://timexsinclair.com/article/estimate-heating-costs/)). ## Source Code ``` 10 PRINT "INSIDE WALL MATERIAL? PLASTER=1 WALLBOARD=2 PANELING=3" 15 INPUT I 16 GO TO 20+I*2 22 LET R=104 23 GO TO 30 24 LET R=119 25 GO TO 30 26 LET R=94 27 CLS 30 GO SUB 530 60 PRINT "OUTSIDE SHEATHING? WOOD=1 FIBER =2" 65 INPUT I 66 CLS 67 GO TO 70+I*2 72 LET R=R+100 73 GO TO 80 74 LET R=R+200 80 PRINT "OUTSIDE SURFACE? ALUMINUM SIDING UNINSULATED=1 ALUMINUM SIDING INSULATED=2 WOOD OR SHINGLES=3 BRICK=4 STONE=5" 85 INPUT I 86 GO TO 90+I*2 92 GO TO 105 94 LET R=R+125 95 GO TO 105 96 LET R=R+80 97 GO TO 105 98 LET R=R+40 99 GO TO 105 100 LET R=R+100 105 LET RW=R/100 106 CLS 110 PRINT "CEILING MATERIAL? PLASTER=1 WALLBOARD=2 ACOUSTIC TILE=3" 115 INPUT I 116 GO TO 120+I*2 122 LET R=142 123 GO TO 130 124 LET R=157 125 GO TO 130 126 LET R=247 130 GO SUB 530 140 LET RC=R/100 145 CLS 150 PRINT "R VALUE WALLS=";RW,,,"R VALUE CEILING=";RC 160 STOP 530 PRINT "INSULATION? FIBERGLASS/ROCKWOOL=1 CELLULOSE=2" 535 INPUT I 536 CLS 540 PRINT "INSULATION THICKNESS?" 545 INPUT T 546 GO TO 550+I*2 552 LET R=R+370*T 553 GO TO 560 554 LET R=R+400*T 560 RETURN 10 PRINT "R FOR WALLS?" 20 INPUT RW 30 PRINT "R FOR CEILING?" 40 INPUT RC 50 PRINT "HOUSE PERIMETER?" 60 INPUT L 65 PRINT "CEILING AREA?" 66 INPUT AC 67 PRINT "CEILING HEIGHT?" 68 INPUT CH 70 PRINT "NUMBER OF STORIES?" 80 INPUT NS 90 PRINT "HOW MANY WINDOW SIZES?" 100 INPUT JMAX 105 LET P=0 106 LET WA=0 107 CLS 110 FOR J=1 TO JMAX 111 PRINT "WINDOW HEIGHT?" 112 INPUT HW 113 PRINT "WINDOW WIDTH?" 114 INPUT WW 115 PRINT "HOW MANY THIS SIZE?" 116 INPUT NW 117 LET P=(2*HW+2*WW)*NW+P 118 LET WA=HW*WW*NW+WA 120 CLS 121 NEXT J 130 PRINT "STORM WINDOWS? NO=1 YES=2" 140 INPUT SW 150 CLS 200 PRINT "HOW MANY DEGREE DAYS?" 210 INPUT DD 220 LET AW=L*NS*CH-WA 250 LET BTUW=(AW/RW)*DD 260 LET BTUC=(AC/RC)*DD 270 LET BTUWD=(WA*DD)/SW 280 LET BTUI=(P*DD/2)/SW 300 LET BTU=(BTUW/100+BTUC/100+BTUWD/100+BTUI/100)*24 303 LET BTUWI=BTUWD+BTUI 304 PRINT "WALL LOSS=";BTUW,,,"CEILING LOSS=";BTUC,,"WINDOW LOSS=";BTUWI 310 PRINT "HEAT LOSS/DAY=";BTU;"00 BTUS" 999 STOP 10 PRINT "FUEL OIL COST IN CENTS/GAL?" 20 INPUT FOC 30 PRINT "NATURAL GAS COST IN CENTS/1000 CUBIC FT?" 40 INPUT NGC 50 PRINT "ELECTRIC COST IN MILS/KWH?" 60 INPUT EC 70 PRINT "COAL COST IN $/TON?" 80 INPUT CC 90 PRINT "WOOD COST IN $/CORD?" 100 INPUT WC 110 CLS 120 PRINT "WHAT IS HEAT LOSS IN 1000S OF BTUS/DAY?" 130 INPUT BTU 150 LET FOH=(BTU/91)*FOC 160 LET NGC=NGC/10 170 LET NGH=(BTU/70)*NGC 180 LET EH=(BTU/34)*EC 190 LET CH=(BTU/147)*CC 200 LET WH=(BTU/125)*WC 300 LET COST=FOH 310 PRINT "FUEL OIL COST="; 320 GO SUB 500 330 LET COST=NGH 340 PRINT "NATURAL GAS COST="; 350 GO SUB 500 360 LET COST=EH 370 PRINT "ELECTRIC COST="; 380 GO SUB 500 390 LET COST=CH 400 PRINT "COAL COST="; 410 GO SUB 500 420 LET COST=WH 430 PRINT "WOOD COST="; 440 GO SUB 500 450 STOP 500 LET DOL=COST/100 510 LET CEN=COST-DOL*100 515 IF CEN<10 THEN GO TO 530 520 PRINT "$";DOL;".";CEN 525 RETURN 530 PRINT "$";DOL;".0";CEN 535 RETURN ```