Rate Function

   
Rate Function

Class

Microsoft.VisualBasic.Financial

Syntax

 Rate(   nper   ,   pmt   ,   pv   [,   fv   [,   due   [,   guess   ]]]) 
nper (required; Double)

The total number of periods in the annuity.

pmt (required; Double)

The payment amount per period.

pv (required; Double)

The present value of the payments or future receipts.

fv (optional; Double)

The future value or cash balance after the final payment. If omitted, its value defaults to 0.

due (optional; DueDate enumeration)

A flag indicating whether payments are due at the beginning of the payment period (a value of DueDate.BegOfPeriod ) or at the end of the payment period (a value of DueDate.EndOfPeriod , the default).

guess (optional; Double)

An estimate of the value to be returned by the function. If omitted, its value defaults to .1 (10%).

Return Value

A Double representing the interest rate per period

Description

Calculates the interest rate for an annuity (a loan or an investment) that consists of fixed payments over a known duration

Rules at a Glance

  • For pv and fv , cash paid out is expressed as a negative number; cash received is expressed as a positive number.

  • The function works using iteration. Starting with guess , Rate cycles through the calculation until the result is accurate to within 0.00001 percent. If a result can't be found after 20 tries , the function fails.

Programming Tips and Gotchas

  • In the case of a loan, pv is the loan amount. In the case of an investment, pv is the beginning balance.

  • In the case of a loan, fv is typically 0, reflecting that the entire loan has been paid. In the case of an investment, fv is the value of the investment with interest at the end of the investment period.

  • If the function fails because it could not calculate an accurate interest rate in 20 iterations, try a different value for guess .

  • The value returned by the function rate is the interest rate for the same time period as payments were made. Typically, this is one month, in which case you must multiply by 12 to derive the annual percentage rate.

See Also

FV Function, IPmt Function, NPer Function, NPV Function, Pmt Function, PV Function, NPV 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