FV
Updated 2023-10-06 21:35:01.880000
Syntax
SELECT [westclintech].[wct].[FV] (
<@Rate, float,>
,<@Nper, float,>
,<@Pmt, float,>
,<@PV, float,>
,<@Pay_type, int,>)
Description
Use the scalar function FV to calculate the future value of an investment based on periodic, constant payments and a constant interest rate.
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":204}],"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"}]}
@Pmt
the periodic payment amount . @Pmt is an expression of type float or of a type that can be implicitly converted to float.
@Rate
the interest rate per period. @Rate 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 annuity. @PV is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
If type is equal to 0, FV is calculated as
FV = ((((1+@rate)^@nper-1)/@rate)*-@pmt)+(((1+@rate)^@nper)*-@pv)
If type is equal to 1, FV is calculated as
FV = ((((1+@rate)^(@nper+1)-(1+@rate)))/@rate*-@pmt)+(((1+@rate)^@nper)*-@pv)
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.FV(.12, 12, -1000, -5000, 0);
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"43613.0132339597"}]}