IPmt Function |
Microsoft.VisualBasic.Financial
IPmt( rate , per , nper , pv [, fv [, due ]])
The interest rate per period.
The period for which a payment is to be computed.
The total number of payment periods.
The present value of a series of future payments.
The future value or cash balance after the final payment. If omitted, the default value is 0.
A value indicating when payments are due. DueDate.EndOfPeriod (or 0) indicates that payments are due at the end of the payment period; DueDate. BegOfPeriod (or 1) indicates that payments are due at the beginning of the period. If omitted, the default value is DueDate.EndOfPeriod .
A Double representing the interest payment
Computes the interest payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate. An annuity is a series of fixed cash payments made over a period of time. It can be either a loan payment or an investment.
The value of per can range from 1 to nper .
If pv and fv represent liabilities, their value is negative; if they represent assets, their value is positive.
The ComputeSchedule function accepts a loan amount, an annual percentage rate, and a number of payment periods. It uses the Pmt function to calculate the payment per period, then returns a two-dimensional array in which each subarray contains the number of the period, the interest paid for that period, and the principal paid for that period.
Private Function ComputeSchedule(dblAmount As Double, _ dblRate As Double, dblNPer As Double) _ As Object(,) Dim dblIPmt, dblPmt, dblPrincipal As Double Dim intPer As Integer Dim strFmt As String Dim objArray(,) As Object ReDim objArray(CInt(dblNPer), 2) strFmt = "###,###,##0.00" dblPmt = Pmt(dblRate / 12, dblNPer, -dblAmount, 0, 0) For intPer = 1 To CInt(dblNPer) dblIPmt = IPmt(dblRate / 12, intPer, dblNPer, -dblAmount) dblPrincipal = PPmt(dblRate / 12, intPer, dblNPer, _ -dblAmount) dblAmount = dblAmount - dblPrincipal objArray(intPer, 0) = intPer & "." objArray(intPer, 1) = Format(dblIPmt, strFmt) objArray(intPer, 2) = Format(dblPrincipal, strFmt) Next ComputeSchedule = objArray End Function
rate and nper must be expressed in the same time unit. That is, if nper reflects the number of monthly payments, rate must be the monthly interest rate.
The interest rate is a percentage expressed as a decimal. For example, if nper is the total number of monthly payments, an annual percentage rate (APR) of 12% is equivalent to a monthly percentage rate of 1%. The value of rate is therefore .01.
FV Function, NPer Function, NPV Function, Pmt Function, PPmt Function, PV Function, Rate Function