Car Payment and Affordability
03-13-2018, 01:36 PM
Post: #1
 Eddie W. Shore Senior Member Posts: 1,358 Joined: Dec 2013
Car Payment and Affordability
Link to blog entry: https://edspi31415.blogspot.com/2018/03/...ility.html

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
Code:
 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
Code:
 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).
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)