PV()
Present value of a loan
- Syntax
-
- PV (nPayment, nInterest, nPeriods) --> nPresentValue
- Arguments
-
- <nPayment> amount of money paid back per period <nInterest> rate of interest per period, 1 == 100% <nPeriods> period count
- Returns
-
- <nPresentValue> Present value of a loan when one is paying back <nDeposit> per period at a rate of interest of <nInterest> per period
- Description
-
- PV() calculates the present value of a loan that is paid back in <nPeriods> payments of <nPayment> (Dollars, Euros, Yens,...) while the rate of interest is <nInterest> per period: debt in period 0 = <nPresentValue> debt in period 1 = ((debt in period 0)-<nPayment>)*(1+<nInterest>/100) debt in period 2 = ((debt in period 1)-<nPayment>)*(1+<nInterest>/100) etc... debt in period <nPeriod> = ((debt in period <nPeriod>-1)-<nPayment>)*(1+<nInterest>/100) -> has to be 0, so <nPresentValue> = <nPayment>*(1-(1+<nInterest>/100)^(-n))/(<nInterest>/100)
Examples
// You can afford to pay back 100 Dollars per month for 5 years
// at a interest rate of 0.5% per month (6% per year), so instead
// of 6000 Dollars (the amount you will pay back) the bank will pay
// you
? pv (100, 0.005, 60) --> 5172.56
Tests
pv (100, 0.0, 60) == 6000.0
pv (100, 0.005, 60) == 5172.56
- Status
- Ready
- Compliance
-
- PV() is compatible with CT3's PV().
- Platforms
-
- All
- Files
-
- Source is finan.c, library is libct.
- See Also