Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server IPMT function


IPMT
 
Updated: 5 August 2010
Use IPMT to calculate the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
Syntax
SELECT [westclintech].[wct].[IPMT] (
   <@Rate, float,>
 ,<@Per, float,>
 ,<@Nper, float,>
 ,<@PV, float,>
 ,<@FV, float,>
 ,<@Pay_type, int,>)
Arguments
@Rate
the interest rate per period. @Rate is an expression of type float or of a type that can be implicitly converted to float.
@Per
the period in the annuity for which the principal payment is being calculated. @Per is an expression of type float or of a type that can be implicitly converted to float.
@Nper
the total number of periods in the annuity to be calculated. @Nper is an expression of type float or of a type that can be implicitly converted to float.
@PV
the present value of the future payments . @PV is an expression of type float or of a type that can be implicitly converted to float.
@FV
the future value at the end of the annuity. @FV is an expression of type float or of a type that can be implicitly converted to float.
@Pay_type
the number 0 or 1 and indicates when payments are due. @Pay_type is an expression of type int or of a type that can be implicitly converted to int. If @Pay_type is NULL it is assumed to be 0. 
 
Set @Pay_type equal to
If payments are due 
0
At the end of a period
1
At the beginning of a period
 
Return Type
float
Remark
·         It is important to be consistent with the units for @Rate and @Nper. For example if payments are to be paid monthly, then @Rate should be the monthly rate, which can be specified as the annual rate divided by 12. If payments are made quarterly, divide the annual rate by 4. If payments are made semi-annually, divide the annual rate by 2.
·         Funds that are paid should be represented with negative numbers. Funds that are received should be represented as positive numbers.
Example
 
SELECT wct.IPMT(.06/12
,13
,12*20
,-400000
,100000
,0)
Here is the result set
----------------------

1959.95301768065

See Also


Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service