IPMT
Returns the interest payment for a given period for an investment, based on periodic, constant payments and a constant interest rate.
Syntax
expression.IPMT(arg1, arg2, arg3, arg4, arg5, arg6);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. | |
arg2 | Required | ApiRange | ApiName | number | The period for which the interest will be returned. It must be in the range from 1 to the total number of payments. | |
arg3 | Required | ApiRange | ApiName | number | The total number of payment periods in an investment. | |
arg4 | Required | ApiRange | ApiName | number | The present value, or the lump-sum amount that a series of future payments is worth now. | |
arg5 | Optional | ApiRange | ApiName | number | The future value, or a cash balance which will be attained after the last payment is made. If omitted, it is equal to 0. | |
arg6 | Optional | ApiRange | ApiName | number | A logical value representing the timing of payment: at the end of the period = 0 or omitted, at the beginning of the period = 1. |
Returns
number
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.IPMT(0.1/12, 1, 2*12, 2000, 0));