Loan Payments

rnewell

New Member
Dose anyone have a function for calculating loan payments similar to the PMT function in excel? In excel it is =PMT(Rate, Nper, Pv).. Rate = interest rate and Nper = number of payments and Pv = amount of loan.

Any help would be appreciated.

Ron
 

Crittar

Member
def var pay as dec no-undo.
def var princ as dec no-undo.
def var interest as dec no-undo.
def var l-term as integer no-undo.

assign
princ = 32000 /* Amount of loan */
interest = 9.75 / 1200 /* Monthly interest */
l-term = 2400. /* Period of loan in months */

assign
pay = (princ * interest) / (1 - (1 / ((1 + interest) * l-term))).

I have not compared this to the output from excel so I cannot vouch 100% for it's accuracy but I think it should be ok.

I hope this helps.
 
U

Unregistered

Guest
Payment = Principal * MonthlyInterestRate / (1 - exp((1 + MonthlyInterestRate), - NoOfPayment))
 

Crittar

Member
I checked out the formula provided by "guest" and the answer (using the figures in my example above) is almost the same:

Using my original post - pay = 260.11
Using Guest's post - pay = 260.00.

I'm not sure why there is this difference but it does suggest that either formula is pretty close.

Having checked excel in the meantime, Guest's post exactly matches excel so his formula is better.

My example above should have the assign modified:

assign
pay = (princ * interest) / (1 - exp((1 + interest),- l-term)).
 
Top