IPmt Function

   
IPmt Function

Class

Microsoft.VisualBasic.Financial

Syntax

 IPmt(   rate   ,   per   ,   nper   ,   pv   [,   fv   [,   due   ]]) 
rate (required; Double)

The interest rate per period.

per (required; Double)

The period for which a payment is to be computed.

nper (required; Double)

The total number of payment periods.

pv (required; Double)

The present value of a series of future payments.

fv (optional; Double)

The future value or cash balance after the final payment. If omitted, the default value is 0.

due (optional; DueDate enumeration)

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 .

Return Value

A Double representing the interest payment

Description

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.

Rules at a Glance

  • 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.

Example

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 

Programming Tips and Gotchas

  • 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.

See Also

FV Function, NPer Function, NPV Function, Pmt Function, PPmt Function, PV Function, Rate Function

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net