Logo

PPMT

Updated 2023-10-06 23:16:59.333000

Syntax

SELECT [westclintech].[wct].[PPMT] (
   <@Rate, float,>
 ,<@Per, float,>
 ,<@Nper, float,>
 ,<@PV, float,>
 ,<@FV, float,>
 ,<@Pay_type, int,>)

Description

Use the scalar function PPMT to calculate the principal payments for an investment for a given period.

Arguments

@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.

{"columns":[{"field":"Set @Pay_type equal to","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell","width":169},{"field":"If payments are due","width":240}],"rows":[{"Set @Pay_type equal to":"0","If payments are due":"At the end of a period"},{"Set @Pay_type equal to":"1","If payments are due":"At the beginning of a period"}]}

@Rate

the interest rate per period. @Rate 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.

@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.

@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.

@PV

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.

Return Type

float

Remarks

PPMT is calculated as the payment for the specified period minus the interest payment for the specified period.

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.

Examples

SELECT wct.PPMT(.06 / 12, 13, 12 * 20, -400000, 100000, 0);

Here is the result set.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"689.340157753871"}]}

See Also

IPMT - Calculate the interest portion of a periodic payment

PMT - Calculate the periodic payment for an annuity

RATE - Rate of an annuity given number of periods, periodic payment, present value, and future value

NPER - number of periods in an annuity

PV - Present value of an annuity

CUMPRINC - cumulative principal payments for an annuity

LPPMT - principal payment on a loan with an odd first period

R78PPMT - principal portion of an annuity payment using the Rule-of-78

PMTSCHED - Calculate an amortization schedule for a loan with no odd periods.

TOTALINT - total of interest payments over the life of an annuity