Click or drag to resize

PV Function

X#
Returns the present value of an investment.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION PV(
	nPayment AS FLOAT,
	nInterestRate AS FLOAT,
	nTotalPayments AS FLOAT
) AS FLOAT
Request Example View Source

Parameters

nPayment
Type: Float
Specifies the periodic payment amount. nPayment can evaluate to a positive or negative number. PV( ) assumes that the payments are made at the end of each period.
nInterestRate
Type: Float
Specifies the periodic interest rate. If the interest rate of an investment is annual and the payments are made monthly, divide the annual interest rate by 12.
nTotalPayments
Type: Float
Specifies the total number of payments.

Return Value

Type: Float
Numeric
Remarks
PV( ) computes the present value of an investment based on a series of equal periodic payments at a constant periodic interest rate.
Examples
X#
1STORE 500 to gnPayment  // Periodic payments made monthly
2STORE .075/12 TO gnInterest     // 7.5% annual interest rate
3STORE 48 TO gnPeriods  // Four years (48 months)
4Clear
5? PV(gnPayment, gnInterest, gnPeriods)  // Displays 20679.19
See Also