WorksheetFunction.Rate Method

Returns the interest rate per period of an annuity. RATE is calculated by iteration and can have zero or more solutions. If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, RATE returns the #NUM! error value.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Rate ( _
    Arg1 As Double, _
    Arg2 As Double, _
    Arg3 As Double, _
    Arg4 As Object, _
    Arg5 As Object, _
    Arg6 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Double
Dim Arg3 As Double
Dim Arg4 As Object
Dim Arg5 As Object
Dim Arg6 As Object
Dim returnValue As Double

returnValue = instance.Rate(Arg1, Arg2, _
    Arg3, Arg4, Arg5, Arg6)
double Rate(
    double Arg1,
    double Arg2,
    double Arg3,
    Object Arg4,
    Object Arg5,
    Object Arg6
)

Parameters

  • Arg1
    Type: System.Double

    Nper - the total number of payment periods in an annuity.

  • Arg2
    Type: System.Double

    Pmt - the payment made each period and cannot change over the life of the annuity. Typically, pmt includes principal and interest but no other fees or taxes. If pmt is omitted, you must include the fv argument.

  • Arg3
    Type: System.Double

    Pv - the present value — the total amount that a series of future payments is worth now.

  • Arg4
    Type: System.Object

    Fv - the future value, or a cash balance you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (the future value of a loan, for example, is 0).

  • Arg5
    Type: System.Object

    Type - the number 0 or 1 and indicates when payments are due.

  • Arg6
    Type: System.Object

    Guess - your guess for what the rate will be.

Return Value

Type: System.Double

Remarks

For a complete description of the arguments nper, pmt, pv, fv, and type, see Pv(Double, Double, Double, Object, Object).

Set type equal to

If payments are due

0 or omitted

At the end of the period

1

At the beginning of the period

If you omit guess, it is assumed to be 10 percent.

If Rate does not converge, try different values for guess. Rate usually converges if guess is between 0 and 1.

Make sure that you are consistent about the units you use for specifying guess and nper. If you make monthly payments on a four-year loan at 12 percent annual interest, use 12%/12 for guess and 4*12 for nper. If you make annual payments on the same loan, use 12% for guess and 4 for nper.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace