Showing posts with label payment. Show all posts
Showing posts with label payment. Show all posts

Saturday, July 11, 2026

HP 20S: The July 2026 Program Collection

HP 20S: The July 2026 Program Collection


Triangulation






d = l * sin(α) * sin(ß) ÷ sin(α + ß)


Store in the following registers before calculation:

R1 = measure of angle A

R2 = measure of angle B

R3 = length l from point A to B


Solve:

R4: distance


Code:

01: LBL A; 61, 41 ,A

02: DEG; 61, 23

03: RCL 1; 22, 1

04: SIN; 23

05: ×; 55

06: RCL 2; 22, 2

07: SIN; 23

08: ÷; 45

09: (; 33

10: RCL 1; 22, 1

11: +; 75

12: RCL 2; 22, 2

13: ); 34

14: SIN; 23

15: ×; 55

16: RCL 3; 22, 3

17: =; 74

18: STO 4; 21, 4

19: RTN; 61, 26


Examples


Example 1:

Inputs: R1 = 60°, R2 = 50°, R3 = 10

Output: R4: 7.05990377592


Example 2:

Input: R1 = 30°, R2 = 80°, R3 = 27.5

Output: R4: 14.4101446626


Source:

“Triangulation (surveying)” Wikipedia. https://en.wikipedia.org/wiki/Triangulation_(surveying) (last edited October 24, 2025). Retried March 17, 2026


Payment: Continuous Compounding


PMT = PV * (e^r – 1) ÷ (1 – e^(-r * t))


Store in the following registers before calculation:

R1 = t: number of payments

R2 = r: periodic interest rate (as a decimal)

R3 = PV: present value


Solve:

R4: PMT: present


Code:

01: GTO B; 61, 41, b

02: RCL 3; 22, 3

03: ×; 55

04: (; 33

05: RCL 2; 22, 2

06: e^x; 12

07: -; 65

08: 1; 1

09: ); 34

10: ÷; 45

11: (; 33

12: 1; 1

13: -; 65

14: (; 33

15: RCL 1; 22, 1

16: ×; 55

17: RCL 2; 22, 2

18: ); 34

19: +/-; 32

20: e^x; 12

21: ); 34

22: =; 74

23: STO 4; 21, 4

24: RTN; 61, 26


Examples


Example 1:

Input: t: 36, r: 0.10 ÷ 12, PV: 5,000.00

Output: PMT: 161.434037378


Example 2:

Input: t: 60, r: 0.05 ÷ 12; PV: 26,349.56

Output: PMT: 497.374636585


Electrical Engineering: System Temperature to Noise Figure


When an amplifier is activated, two ways to express noise are the noise temperature (in Kelvin) and the noise figure (in decibels, dB). Using a reference temperature of 290 K, when the noise temperature (T) is known, the noise figure (F) can be calculated by:


F = 10 * log((T + 290) ÷ 290)


If temperature is given in degrees Celsius (°C), then the formula for noise figure becomes:


F = 10 * log((T°C + 563.15) ÷ 290)


since T = T°C + 273.15.


The following program assumes that temperature is given in degrees Celsius.


Store in the following registers before calculation:

R1 = T°C; temperature in degrees Celsius


Solve:

R2: F: noise figure


Code:

01: LBL C; 61, 41, C

02: RCL 1; 21, 1

03: +; 75

04: 5; 5

05: 6; 6

06: 3; 3

07 . ; 73

08: 1; 1

09: 5; 5

10: =; 74

11: ÷; 45

12: 2; 2

13: 9; 9

14: 0; 0

15: =; 74

16: LOG; 51, 13

17: ×; 55

18: 1; 1

19: 0; 0

20: =; 74

21: STO 2; 21, 2

22: RTN; 61, 26


Examples


Example 1:

Input: T = -160 °C (store in R1)

Output: F: 1.43068666235 dB


Example 2:

Input: T = 15°C

Output: F: 2.99642532081 dB


Source:

Ball, John A. Algorithms for RPN Calculators John Wiley & Sons: New York. 1978. ISBN 0-47-03070-8. pp. 266-267


Moderate Exercise: Target Heart Rate Range


The following equations calculate the target heart range for a typical person engaging in moderate exercise. According to the particle by Jenna Fletcher (see Source), the American Heart Society (AHA) states the person is engaged in moderate exercise when their heart rate is 50% to 70% of their maximum heart rate. The maximum heart rate is 220 minus the person’s age.


Disclaimer: This is not medical advice, any questions should be discussed with a doctor or health professional.


The moderate range is determined by:

high = (220 – age) * 0.7 = low * 1.4

low = (220 – age) * 0.5 = high * 5/7


For high intensity, use the range 70% to 85%.


Code:

01: LBL D; 61, 41, d

02: +/-; 32

03: +; 75

04: 2; 2

05: 2; 2

06: 0; 0

07: =; 74

08: ÷; 2

09: 2; 2

10: =; 74

11: R/S; 26

12: ×; 55

13: 1; 1

14: . ; 73

15: 4 ; 4

16: =; 74

17: RTN; 61, 26


Examples


Example 1:

Input: Age 49 (my age at the time of this blog)

Output: low: 85.5, high: 119.7


Example 2:

Input: Age 25

Output: low: 97.5, high: 136.5


Source:

Fletcher, Jenna. “What a target heart rate is and how to calculate it”. Medically Reviewed by Debra Sullivan Ph. D. Medical News Today. January 22, 2024. https://www.medicalnewstoday.com/articles/target-heart-rate-calculator March 16, 2026.



Percentile in a Range


The program calculates the percentile of x in the range [a, b].


percentile = (x – a) ÷ (b – a) * 100%


Store before calculating:

R1 = a, R2 = b, R3 = x


Code:

01: LBL E; 61, 42, E

02: ( ; 33

03: RCL 3; 22, 3

04: - ; 65

05 RCL 1; 22, 1

06: ) ; 34

07: ÷; 45

08: ( ; 33

09: RCL 2; 22, 2

10: - ; 65

11: RCL 1; 22, 1

12: ) ; 34

13: ×; 55

14: 2; 2

15: 10^x; 51, 12

16: =; 74

17: RTN; 61, 26


Examples


Example 1:

Input: R1 = 10, R2 = 50, R3 = 30 (30 in [10, 50])

Output: 50 (50%)


Example 2:

Input: R1 = 85.5, R2 = 117.5, R3 = 110 (110 in [85.5, 117.5])

Output: 76.5625 (76.5625%)


Programming all five of these programs will fill the program space of the HP 20S entirely (99 steps)!


Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, February 17, 2024

TI-30Xa Algorithms: Annuity Factors

TI-30Xa Algorithms:   Annuity Factors




Introduction


Even when a calculator isn't (technically) programmable, algorithms can be applied to scientific and financial calculations.


The calculations take numerical arguments that are stored in the TI-30Xa's three memory slots:  M1, M2, and M3.  Store amounts into the memory registers by the [ STO ] key.  


Careful:  For the solar versions of the TI-30Xa, do not press the [ON/AC] button as doing so clears the memory registers.



Today's list of routines deals with annuity factors.



SPFV:  Future Value of a Single Present Value Factor


SPFV = (1 + i%)^n


FV = PV × SPFV



SPPV:  Present Value of a Single Future Value Factor


SPPV = (1 + i%)^(-n)


PV = FV × SPPV



USFV:  Future Value of a Payment Stream Factor


USFV = ((1 + i%)^n - 1) ÷ i%


FV = PMT × USFV



USPV:  Present Value of a Payment Stream Factor


USPV = (1 - (1 + i%)^(-n)) ÷ i%


PV = PMT × USPV



where:

PV = present value

PMT = payment

FV = future value

n = number of periods

i% = periodic interest rate


For monthly payments per year:

n = number of years × 12

i% = annual interest rate ÷ 12


For quarterly payments per year:  

n = number of years × 4

i% = annual interest rate ÷ 4


For the routines, n is stored in memory register 1 and i% is stored in memory register 2. 


n [ STO ] 1 

i% [ STO ] 2




SPFV:  Future Value of a Single Present Value Factor


 [ ( ] 1 [ + ] [ RCL ] 2 [ 2nd ] { % } [ ) ] [ y^x ] [ RCL ] 1 [ = ]


SPPV:  Present Value of a Single Future Value Factor


 [ ( ] 1 [ + ] [ RCL ] 2 [ 2nd ] { % } [ ) ] [ y^x ] [ RCL ] 1 [ ± ] [ = ]


USFV:  Future Value of a Payment Stream Factor


[ ( ] [ ( ] 1 [ + ] [ RCL ] 2 [ 2nd ] { % } [ ) ] [ y^x ] [ RCL ] 1 [ - ] 1 [ ) ] 

[ ÷ ] [ RCL ] 2 [ 2nd ] { % } [ = ]


USPV:  Present Value of a Payment Stream Factor


[ ( ] 1 [ - ] [ ( ] 1 [ + ] [ RCL ] 2 [ 2nd ] { % } [ ) ] [ y^x ] [ RCL ] 1 [ ± ] [ ) ]

[ ÷ ] [ RCL ] 2 [ 2nd ] { % } [ = ]



Example


Let n = 60, i% = 5  


60 [ STO ] 1

5 [ STO ] 2


SPFV:  18.67918589

SPPV:  0.053535524

USFV:  353.5837179

USPV:  18.92928953



Eddie


All original content copyright, © 2011-2024.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Sunday, January 23, 2022

HP 17BII+ and Numworks: Payment of a Loan with an Unusual First Period

 HP 17BII+ and Numworks: Payment of a Loan with an Unusual First Period


The First Payment Is Not Due in a Month

In finance, the first payment of a loan is not due at the end of a month from signing. This happens when all payments are due at a certain date, such as the 30th/31st or 1st of each month, regardless of when the loan papers are signed.  Loans of this type are referred to odd period loans or partial period loans.  Every payment after the first follows the conventional month time line.


HP 17BII+ Formula:  Partial Period Loan 

The following HP 17BII+ formula deals with calculating odd period loans.  This solver formula is directly from the HP 17BII+ Financial Calculator User's Guide, pg. 196 (see source):

ODD:  PV×(I%÷100×FP(DAYS÷30)+1)=-IF(DAYS<30:(1+I%÷100)×PMT:PMT)×UPSV(I%:N)-FV×SPPV(I%:N)

In the solver, the percent sign is a character used in variables, not a function.  PV, FV, PMT, I%, N are all valid variables in the HP 17BII+ solver.  The variables:

N:  number of payments
DAYS:  number of days in the first period, from 0 to 59.
I%:  the periodic interest rate.   For monthly payments, divide the annual interest rate by 12.
PV:  the loan amount
FV:  the balloon amount
PMT:  payment

This formula follows the cash flow convention:  negative amounts for cash outflows, positive amounts for cash inflows.


Numworks Script:  Partial Period Loan
oddperiod.py


# 2021-11-14 EWS
# odd period

from math import *

print("Loan with partial period")
print("0 - 59 days")
print("Monthly Payments")
n=float(input("N: n? "))
rate=float(input("I/YR:  rate? "))
pv=float(input("PV: loan amt? "))
fv=float(input("FV: balooon pmt? "))
days=float(input("DAYS: odd period? "))

r=rate/1200

if days<30:
  j=1+r
else:
  j=1

f=days/30-int(days/30)
w=r*f+1
  
# uspv
u=(1-(1+r)**(-n))/r
# sppv
s=(1+r)**(-n)


pmt=(pv*w+fv*s)/(j*u)
# rounding
pmt=-int(pmt*100+.5)/100
# result
print("Payment: "+str(pmt))

Note:   the cash flow convention is followed


Examples

Loan 1:
Inputs:
N = 60
DAYS = 10
PV = $58,425.10
I%/YR = 4.48%  (annual rate), for the HP 17BII+, divide this by 12
FV = $0.00 (no balloon payment)

Result:  PMT:  -1,085.99  


Loan 2:
Inputs:
N = 240
DAYS = 40
PV = $16,956.00
I%/YR = 7.02%  (annual rate), for the HP 17BII+, divide this by 12
FV = $500.00 (enter -500.00 for HP 17BII+)

Result:  PMT:   -130.96


Source

HP 17BII+ Financial Calculator User's Guide.  Ed. 2.  Hewlett Packard.  San Diego, CA  2004


All original content copyright, © 2011-2022.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, April 24, 2021

TI-Nspire CX and CX II: Finance Widgets

TI-Nspire CX and CX II:  Finance Widgets


Financial Widgets


The zip file has five widgets:


simple interest widget:  Calculates the total interest paid in a simple interest loan


pi payment widget:  Calculates the payment of a monthly mortgage without a balloon payment.  


piti widget:  Calculates the PITI (payment-interest-tax-insurance) of a mortgage.  Down payment, annual property tax, and annual property insurance are included.


qualified loan amount widget:  Determines the amount of purchase price a buyer can afford.  The standard 28/36 ratio test is used, compares the two methods, and uses the minimum payment to estimate the qualified amount.  


qualified income test widget:  Test whether the proposed PITI and debt payments against a buyer's income  


Instructions


1.  Download the zip file here:  https://drive.google.com/file/d/1cl-yMpcwRHypGa1kdi66ThZs2xf5pPaQ/view?usp=sharing

2.  Save the widget (tns) files to the MyWidgets folder.

3.  Any tns file in the MyWidgets can be opened as a regular document or be added to a document by Insert-Widget.  

4.  When operated as a widget, highlight the entire page by Ctrl+A, pressing [ menu ], selecting 1. Actions, 1.  Evaluate (Enter).  


Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Sunday, September 27, 2020

Financial Calculators: Deferred Mortgages: Solving for Payment and Price

Financial Calculators:  Deferred Mortgages: Solving for Payment and Price

Finance Now, Pay Later!

When a customer financing a loan or mortgage, and the customer can enjoy the benefits for a period of months prior to being required to make the first payment, we are dealing with a deferred mortgage.   Interest is accrued from the beginning of the mortgage.

The procedures outlined on this blog entry can be applied to any financial calculator* with time value of money keys, such as the HP 12C and the HP 10bII+ (see source below).  

* The procedure should be fine for most financial calculators.   Check your manual for details.  


Deferred Mortgage:  Finding The Monthly Payment


Part 1:

Set the calculator to END mode.

N:  Enter the number of deferred payments minus 1

I:   Enter the interest rate of the loan

PV:  Enter the borrowed amount as a negative number

PMT:  Set to 0

Solve for FV


Part 2:

PV = FV from part 1   ( RCL FV, STO PV )

N:  Enter the number of payments of the term

I = interest rate of the loan

FV:  Enter the balloon payment as a negative number.  If there is no balloon payment, enter 0.

Solve for PMT, this is your payment of the deferred mortgage.  


Example 1:  


A homeowner finances a house for $455,000.00.   The mortgage lasts for 30 years at 2.86%.   No payment is due for the first six months of the mortgage.  


Part 1:

N: 6 -1 = 5

I:  2.86% annual rate, about 0.24% per month

PV:  -455000.00

PMT:  0.00

FV = 460447.99


Part 2:

PV:  460447.99

N:  30* 12 = 360

I:  2.86% annual rate, about 0.24% per month

FV:  0.00

PMT = -1906.67


The monthly payment is $1,906.67.


Example 2:

A homeowner purchases a fixer-up property for $149,000.00.  The buyer secures a 15-year mortgage at 4%.  The end of the loan requires a $1,000.00 balloon payment but allows the buyer to defer the first payment for five months.


Part 1:

N:  5 - 1 = 4

I:  4% annual rate, about 0.33% per month

PV:  -149000.00

PMT: 0.00

FV = 150996.62


Part 2:

PV:  150996.62

N:  15 * 12 = 180

I:  4% annual rate, about 0.33% per month

FV: -1000.00

PMT = -1112.84


Deferred Payment:  Calculating the Price of the Mortgage


Part 1:

Set the calculator to END mode.

N:  Enter the number of payments of the term

I:   Enter the interest rate of the loan

PMT: Enter the payment as a positive number

FV: Enter the balloon payment as a positive number.  If there is no balloon payment, enter 0.   

Solve for FV


Part 2:

FV = PV from part 1   ( RCL PV, STO FV )

N:  Enter the number of deferred payments minus 1

I = interest rate of the loan

Set PMT to 0

Solve for PV, this is your price of the deferred mortgage.  


Example 3:

An owner enters a lease which requires at monthly payment of $495.00.  The lease lasts for 8 years at 6.69%.  There is no balloon payment at the end of the lease.  The lease allowed the owner to defer the first required payments for three months.  What is the value of the lease?


Part 1:

N:  8 * 12 = 96

I:  6.69% annual rate, about 0.56% per month

PMT:  495.00

FV:  0.00

PV = -36721.17


Part 2:

FV:  -36721.17

N:  3 - 1 = 2

I:  6.69% annual rate, about 0.56% per month

Set PMT to 0

PV = 36315.13


The value of the lease is $36,315.13.


Example 4:

An owner executes a 30-year, 3% mortgage with the required payment of $1,005.85.  The mortgage allows for the first payment to be deferred for six months.  A $1,000.00 balloon payment is required.  What is the price of the mortgage?


Part 1:

N:  30 * 12 = 360

I:  3% annual rate, 0.25% per month

PMT:  1005.85

FV:  1000.00

PV = -238983.97


Part 2:

FV:  -238983.97

N:  6 - 1 = 5

I:  3% annual rate, 0.25% per month

Set PMT to 0

PV = 236018.94


The value of the lease is $236,018.94.


And that is how we work with deferred mortgages.  


Source:


Greynolds Jr., Elbert B. and Aronofsky, Julius S.  Practical Real Estate Financial Analysis: Using The HP 12C Calculator:  A Step-by-Step Approach   Real Estate Education Company: Dearborn Financial Publishing, Inc.  1983.  ISBN 0-88462-378-5


Eddie

All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, June 22, 2019

Time Value of Money: Using Present Value Factors

Time Value of Money:  Using Present Value Factors

Introduction

The time value of money equation is:

0 = PV + PMT * PVAF + FV * PVSF

where

PVAF = present value of annuity factor = Σ( (1 + i%)^(-k), k, 1, n )
PVSF = present value of single factor = (1 + i%)^-n
n = number of payments
i% = periodic interest rate (as a decimal)

The cash flow convention is maintained with this model.  Cash outflows (payments) are negative, cash inflows (receipts) are positive.

Solving for Payment (PMT)

0 = PV + PMT * PVAF + FV * PVSF
-PMT * PVAF = PV + FV * PVSF
-PMT = (PV + FV * PVSF) / PVAF
PMT = -(PV + FV * PVSF) / PVAF

Example

PV = $50,000.00
FV = -$10,000.00
n = 60  (5 years of monthly payments)
i% = 0.05/12

PVAF = 52.99071
PVSF = 0.77921

PMT = -(50000 - 10000 * 0.77921) / 52.99071 = -796.5150873
(cash payment of $796.52)

Solving for Future Value (FV)

0 = PV + PMT * PVAF + FV * PVSF
-FV * PVSF = PV + PMT * PVAF
FV = -( PV + PMT * PVAF ) / PVSF

Example

PV = -$1,000.00
PMT = -$250.00
n = 60  (5 years of monthly payments)
i% = 0.05/12

PVAF = 52.99071
PVSF = 0.77921

FV = -( -1000 - 250 * 52.99071) / 0.77921 = 18284.7724
(future value of deposit $18,284.77)

We can use this method with any calculator.  A partial present value factor table, one for single payment, and one for annuity, is presented below.





Source:

"HP 17BII Financial Calculator Owner's Manual"  Edition 1  Hewlett Packard.  Corvallis, OR.  December 1989.

Have fun,

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Monday, March 26, 2018

HP Prime: Length of a Loan with a Certain Payment


HP Prime:  Length of a Loan with a Certain Payment

Introduction

The program PMTLENGTH will calculate how many payments that are required to finish a loan, given a certain annual interest rate and payment.  Payments are assumed to be monthly, and end of period.  The program will also return the last payment.  Due to the rounding in the financial algorithms, the last payment is an approximate (unless the interest rate is 0%).

Input:  PMTLENGTH(I,P,X)
I = annual interest rate
P = loan amount
X = payment amount, enter as a negative amount

Firmware 13441 or later is required.


HP Prime Program PMTLENGTH

EXPORT PMTLENGTH(I,P,X)
BEGIN
// I%YR, PV, PMT (as negative)
// 2018-03-19 EWS
// how many monthly payments?
// last payment? (FV)

LOCAL N,B;

N:=Finance.TvmNbPmt(I,P,X,0,12);
B:=P;
IF FP(N)≠0 THEN
B:=Finance.TvmFV(IP(N),I,P,X,12);
N:=IP(N)+1;
END;

// {N, final pmt}
RETURN {N,B};
END;

Examples

Example 1:  How long will I take to pay off a $2,000 loan if I make $600 payments each month?  This is a no interest loan.

Result:  {4, -200}

It will take 4 payments, with the last payment being $200.

Example 2:  How long will I take to pay off a $5,350 loan if I make $750 monthly payments each month?  The loan has a 10% monthly interest rate.

Result:  {8, -286.906502677}

It will take 8 payments, with the last payment being about $286.91.

Eddie

This blog is property of Edward Shore, 2018.

Tuesday, March 13, 2018

HP Prime: Car Payment and Affordability


HP Prime:  Car Payment and Affordability

Introduction

The two programs presented here tackle common financial questions of purchasing automobiles.  (or other equipment).   CARPMT calculates what would be the monthly payment, while CARAFFORD calculates the sticker price that the buyer can afford.  The variables that are considered are:

N = number of monthly payments, typically 48, 60, or 72 (for 4, 5, or 6 year term, respectively)
I = annual interest rate of the buyer can get, hopefully this rate is low
S = sales tax rate
D = discount rate, as car dealers tend to off discounts
W = down payment (enter as negative)

Firmware 13441 is used and the Finance app functions TvmPMT and TvmPV are used.  For the finance functions, they are designated with the “Finance.” prefix to allow usage of the program on any app.   TVM cash flow convention is retained, outflows (payments) are entered as negative while inflows (in this case the financing loan) are treated as positive. 

HP Prime Program CARPMT

EXPORT CARPMT(N,I,P,S,D,W)
BEGIN
// enter down pmt as negative
// 2018-03-12 EWS
// Function Setup
// no. payments,
// annual interest, price,
// sales tax, discount, down pmt

LOCAL X;
X:=P*(1+S/100)*(1-D/100)+W;
// Finance app
X:=
Finance.TvmPMT(N,I,X,0,12);

RETURN ROUND(X,2);

END;

Example: 
Term:  60 months
Interest Rate: 4.5%
Sticker Price: 18995
Sales Tax: 9.5%
Discount Rate: 10%
Down Payment: $1000

CARPMT(60,4.5,18995,9.5,10,-1000)

Result:  -330.35

Payment is $330.35

HP Prime Program CARAFFORD

EXPORT CARAFFORD(N,I,X,S,D,W)
BEGIN
// pmt and down pmt enter
// as negative
// 2018-03-12 EWS
// Function Setup
// no pmts, annual interest,
// payment (as pqsitive),
// sales tax, discount, down pmt

LOCAL P;
// Finance app
P:=
Finance.TvmPV(N,I,X,0,12);
// calculating affordable price
P:=(P-W)/((1+S/100)*(1-D/100));

RETURN ROUND(P,2);

END;

Example: 
Term:  60 months
Interest Rate: 4.8%
Payment:  $350.00
Sales Tax: 9.5%
Discount Rate: 10%
Down Payment: $500

CARAFFORD(60,4.8,-350,9.5,10,-500)

Result:  $19,418.67
The car that can be afforded is $19,418.67 (before sales tax and discounts). 

As day of this post is on Pi-Day Eve, Happy Pi Day on March 14!  π = 3.141592653…

Eddie

This blog is property of Edward Shore

Wednesday, February 14, 2018

HP Prime and TI-84 Plus CE: Graduated Mortgage Payments

HP Prime and TI-84 Plus CE:  Graduated Mortgage Payments

Introduction

The program GRADMORT calculates the payment schedule of a graduated mortgage.  A graduated payment mortgage (GPM) is a mortgage option that allows home buyers, particularly young, first-time home buyers, to purchase a home.  The payments increase by a set percentage of at annual rate for several years until it reaches a plateau. 

According to Daniel T. Winkler’s and G. Donald Jud’s article, “The Graduated-Payment Mortgage: Solving the Initial Payment Enigma” (see Source at the end of the blog entry), the HUD (United States Department of Housing and Urban Development), offers five graduated payment schedule plans, known as Section 245 loans. 

In the article Winkler and Jud derive a formula for solving for the first tier payment.  The article states the solution for a two-tier case and a general case.  The program GRADMORT covers the general case.

Variables:

A = amount of the mortgage (PV).

I = periodic monthly interest of the mortgage, I%YR/1200.

T = Number of years the payment increases.  For example, if T = 5, then the payment would increase 5 times, once a year, until it reaches the final constant payment on year 6

C = The payment’s annual percent increase, C%/100.

N = The term of the mortgage, in years.

P = The initial payment (PMT).  To calculate the payments for subsequent years, multiply the last result by (1 + C).  (hence, add C% every year for each tier)

The general formula:

P = A / ( (1 + Σ((1 + C)^(k)/(1 + I)^(12*k), k, 1, N-1) * ( 1/I * (1 + I)^(-12) )
+  (1 + C)^N/(1 + I)^(12*N) * (1/I * (1 – (1 + I)^-(12*T – 12*N) )

The program breaks the formula into smaller parts for calculation purposes.

GRADMORT returns a two column matrix, the first column is the year and the second column is the payment.  The last row shows the payment when it stabilizes (stops increasing).

Monthly payments and end of period payments (end of month) are assumed.  Property taxes and interest are not calculated in this program.

HP Prime Program GRADMORT

EXPORT GRADMORT()
BEGIN
// Graduated Mortgage
// Winkler, Jud
// 2018-02-11 EWS

LOCAL A,I,N,C,T,mat;
LOCAL P,X,Y;

INPUT({A,I,N,C,T},"Graduated
Mortgage",{"Loan Amount:",
"Loan Rate: ","# Tiers: ",
"% Increase: ","Term (yrs): "});

I:=I/1200;
C:=C/100;

X:=Σ((1+C)^K/(1+I)^(12*K),K,0,N-1);
X:=X/I*(1-(1+I)^(−12));
Y:=(1+C)^N/(1+I)^(12*N);
Y:=Y/I*(1-(1+I)^−(12*T-12*N));
P:=A/(X+Y);

mat:=[[1,P]];
LOCAL k;
FOR k FROM 1 TO N DO
mat:=ADDROW(mat,
[k+1,mat[k,2]*(1+C)],k+1);
END;

RETURN mat;

END;

TI-84 Plus CE Program GRADMORT

"GRADUATED MORTGAGE"
"WINKLER/JUD"
"EWS 2018-02-11"
Input "LOAN AMT: ",A
Input "LOAN RATE: ",I
I/1200→I
Input "NO. TIERS: ",N
Input "INCREASE: ",C
C/100→C
Input "LOAN TERM (YRS): ",T

Σ((1+C)^K/(1+I)^(12*K),K,0,N-1)→X
X/I*(1-(1+I)^(­12))→X

(1+C)^N/(1+I)^(12*N)→Y
Y/I*(1-(1+I)^­(12T-12N))→Y

A/(X+Y)→P
{1}→L1
{P}→L2
For(K,1,N)
augment(L1,{K+1})→L1
augment(L2,{L2(K)*(1+C)})→L2
End
List→matr(L1,L2,[A])
Disp [A]

Example

A young couple, who just graduated from college and starting on their careers, have qualified to participate in a GPM.  They will finance a $200,000 mortgage at a fixed annual interest of 4.4%.  Payments increase 2.1% for the first five years of the 35 year mortgage. 

Variables (the program will prompt you for the amounts):

Loan Amount:  200000
Loan Rate:  4.4
# Tiers:  5
% Increase: 2.1
Term (yrs): 35

Results:

Matrix:
[ [1, 855.231019434]
[2, 873.190870842]
[3, 891.52787913]
[4, 910.249964592]
[5, 929.365213848]
[6, 948.881883339] ]

Year 1:  $855.23
Year 2:  $873.19
Year 3:  $891.53
Year 4:  $910.25
Year 5:  $929.37
Year 6 (years 6 – 35):  $948.88

Source 

Winkler, D.T. an G.D. Jud.  “The Graduated Payment Mortgage:  Sovling the Initial Payment Enigma”  Journal of Real Estate Practice and Education, vol. 1, 1998, pp 67-79.  Retrieved February 10, 2018.  Link:  https://libres.uncg.edu/ir/uncg/f/D_Winkler_Graduated_1998(MULTI%20UNCG%20AUTHORS).pdf

Eddie


This blog is property of Edward Shore, 2018.

Earth's Radius by Latitude

Earth's Radius by Latitude Introduction: Calculating the Earth’s Radius In quick, general calculations, we assume that the...