Skip to main content

RATE

Returns the interest rate per period for a loan or an investment. For example, use 6%/4 for quarterly payments at 6% APR.

Syntax

expression.RATE(arg1, arg2, arg3, arg4, arg5, arg6);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe total number of payment periods for the loan or investment.
arg2RequiredApiRange | ApiName | numberThe payment made each period and cannot change over the life of the loan or investment.
arg3RequiredApiRange | ApiName | numberThe present value: the total amount that a series of future payments is worth now.
arg4OptionalApiRange | ApiName | numberThe future value, or a cash balance which will be attained after the last payment is made. If omitted, it is equal to 0.
arg5OptionalApiRange | ApiName | numberA logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted.
arg6OptionalApiRange | ApiName | numberAn estimate at what the rate will be. If it is omitted, the function will assume guess to be 0.1 (10 percent).

Returns

number

Example

This example shows how to return the interest rate per period for a loan or an investment. For example, use 6%/4 for quarterly payments at 6% APR.

// How to estimate the interest rate per period for a loan or an investment.

// Use a function to get the loan/investment interest rate per period.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.RATE(2*12, -500, 10000, 0));