Financial.FV(Double, Double, Double, Double, DueDate) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個基於定期固定支付及固定利率,指定年金未來價值的價值。
public static double FV(double Rate, double NPer, double Pmt, double PV = 0, Microsoft.VisualBasic.DueDate Due = Microsoft.VisualBasic.DueDate.EndOfPeriod);
static member FV : double * double * double * double * Microsoft.VisualBasic.DueDate -> double
Public Function FV (Rate As Double, NPer As Double, Pmt As Double, Optional PV As Double = 0, Optional Due As DueDate = Microsoft.VisualBasic.DueDate.EndOfPeriod) As Double
參數
- Rate
- Double
必須的。 每個週期的利率。 例如,如果您的汽車貸款的年利率 (APR) 是10%,並且每月付款,則每期的利率為 0.1/12 或 0.0083。
- NPer
- Double
必須的。 年金的總付款期間數。 例如,如果你每月還款四年車貸,你的貸款總共有4個12分(或48個)還款期。
- Pmt
- Double
必須的。 每個期間都要支付的款項。 付款通常會包含本金和利息,並且不會隨年金的期限變化。
- PV
- Double
Optional. 一系列未來付款的現值(或一次性付款)。 例如,當你借錢買車時,貸款金額就是你每月汽車還款的現值。 如果沒有指定,會假設為 0。
- Due
- DueDate
Optional. 指定付款到期時間的物件 DueDate 。 這個論點必須是 DueDate.EndOfPeriod 付款是在付款期間結束時到期,或 DueDate.BegOfPeriod 是付款在該期間開始時到期。 若省略, DueDate.EndOfPeriod 則視為假定。
傳回
基於定期固定支付和固定利率的年金未來價值。
範例
此範例使用函 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
備註
年金是一系列隨時間固定支付的現金支付。 年金可能是一筆貸款 (例如房屋貸款) 或投資 (例如每月存款計劃)。
Rate和 NPer 參數必須以相同單位表示的付款期間計算。 例如,若 Rate 是用月份計算,則 NPer 也必須用月份計算。
對於所有引數,付出的現金 (例如要儲蓄的存款金額) 是由負數表示;收入的現金 (例如股利支票) 是由正數表示。