Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Brad Schulz
  Where is Brad Schulz?
 San Carlos
 California - United States
 Brad Schulz
 To: Robert Hayward
  Where is Robert Hayward?
 Sacramento
 California - United States
 Robert Hayward
 Tags
Subject: RE: Amortization Code
Thread ID: 191681 Message ID: 191686 # Views: 58 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Windows Vista and VFP
Date: Thursday, August 28, 2008 6:31:14 AM         
   


> Does anyone have a code snippet for calculation the P/I spilt of a 10 to 30 year amortization schedule. I need the Interest, Principal, total Payment and the remain balance.
>
> Thank you all inadvance


Amortizations Schedule for a Loan Amount of $5000 with a 6% annual interest rate over 60 months:

lnLoanAmt=5000.00
lnInterestRate=.06/12
lnNumPeriods=60

lnPayment=ROUND(PAYMENT(lnLoanAmt,lnInterestRate,lnNumPeriods),2)
lnBalance=lnLoanAmt
FOR lnPeriod=1 TO lnNumPeriods
  lnPeriodInterest=ROUND(PAYMENT(lnBalance,lnInterestRate,1),2)-lnBalance
  lnPeriodPrincipal=lnPayment-lnPeriodInterest
  lnBalance=lnBalance-lnPeriodPrincipal
  ? lnPeriod,lnPeriodInterest,lnPeriodPrincipal
ENDFOR


You can fill in the appropriate values for your situation.

--Brad



COMPLETE THREAD
Amortization Code Posted by Robert Hayward @ 8/28/2008 5:29:39 AM
RE: Amortization Code Posted by Brad Schulz @ 8/28/2008 6:31:14 AM