Share via


FV 函式

更新:2007 年 11 月

傳回 Double,指定以定期、固定付款及固定利率為基礎的年金未來值。

Function FV( _
   ByVal Rate As Double, _
   ByVal NPer As Double, _
   ByVal Pmt As Double, _
   Optional ByVal PV As Double = 0, _
   Optional ByVal Due As DueDate = DueDate.EndOfPeriod _
) As Double

參數

  • Rate
    這是必要項。Double 指定每一期的利率。例如,如果您的汽車貸款年利率 (APR) 為 10% 並採月付方式償還,則每期的利率為 0.1/12,也就是 0.0083。

  • NPer
    這是必要項。Double 指定年金保險投資中付款的總期數。例如,如果您的四年期汽車貸款是採月付方式償還,則付款總期數就是 4 x 12 (即 48) 期。

  • Pmt
    必要項。Double,指定每一期的應付款。付款通常包含在年金期限內不會變更的本金和利息。

  • PV
    選擇項。Double,指定一連串遠期付款的現值 (或總金額)。例如,當您貸款買車時,貸款金額就是您要以每月支付方式付給貸方的車款金額現值。如果省略,則假設為 0。

  • Due
    選擇項。DueDate 列舉型別 型別的物件,指定付款何時到期。這個引數必須是 DueDate.EndOfPeriod (若付款期限是付款期間的結束日),或 DueDate.BegOfPeriod (若付款期限是付款期間的開始日)。如果省略,則假設為 DueDate.EndOfPeriod。

備註

年金是在約定期間內一連串的固定現金付款。年金可以是借貸 (例如房屋抵押貸款) 也可以是投資 (例如每月定存存單)。

Rate 和 NPer 引數必須使用以相同單位表示的付款週期計算。例如,如果 Rate 是以月計算,則 NPer 也必須以月來計算。

凡是引數,現金支出 (例如存款) 都以負數來表示,現金收入 (例如股息支票) 則以正數來表示。

範例

這個範例會使用 FV 函式來傳回投資的未來值,前提是提供每一期的增值率 (APR / 12)、付款總數 (TotPmts)、付款 (Payment)、投資現值 (PVal),以及表示付款時間是在付款期間開頭或結尾的數字 (PayType)。請注意,由於 Payment 代表現金支出,因此是負數。

Sub TestFV()
    Dim TotPmts As Integer
    Dim Payment, APR, PVal, Fval As Double
    Dim PayType As DueDate
    Dim Response As MsgBoxResult

    ' Define money format.
    Dim Fmt As String = "###,###,##0.00"
    Payment = CDbl(InputBox("How much do you plan to save each month?"))
    APR = CDbl(InputBox("Enter the expected interest annual percentage rate."))
    ' Ensure proper form.
    If APR > 1 Then APR = APR / 100
    TotPmts = CInt(InputBox("For how many months do you expect to save?"))
    Response = MsgBox("Do you make payments at the end of month?", MsgBoxStyle.YesNo)
    If Response = MsgBoxResult.No Then
        PayType = DueDate.BegOfPeriod
    Else
        PayType = DueDate.EndOfPeriod
    End If
    PVal = CDbl(InputBox("How much is in this savings account now?"))
    Fval = FV(APR / 12, TotPmts, -Payment, -PVal, PayType)
    MsgBox("Your savings will be worth " & Format(Fval, Fmt) & ".")
End Sub

需求

命名空間 (Namespace)︰Microsoft.VisualBasic

**模組︰**Financial

組件 (Assembly):Visual Basic Runtime Library (在 Microsoft.VisualBasic.dll 中)

請參閱

參考

財務摘要