Financial.IPmt(Double, Double, Double, Double, Double, DueDate) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個基於定期固定支付及固定利率,指定特定期間年金利息支付的價值。
public static double IPmt(double Rate, double Per, double NPer, double PV, double FV = 0, Microsoft.VisualBasic.DueDate Due = Microsoft.VisualBasic.DueDate.EndOfPeriod);
static member IPmt : double * double * double * double * double * Microsoft.VisualBasic.DueDate -> double
Public Function IPmt (Rate As Double, Per As Double, NPer As Double, PV As Double, Optional FV As Double = 0, Optional Due As DueDate = Microsoft.VisualBasic.DueDate.EndOfPeriod) As Double
參數
- Rate
- Double
必須的。 每個週期的利率。 例如,如果您的汽車貸款的年利率 (APR) 是10%,並且每月付款,則每期的利率為 0.1/12 或 0.0083。
- Per
- Double
必須的。 付款期間範圍為1至 NPer。
- NPer
- Double
必須的。 年金的總付款期間數。 例如,如果你每月還款四年車貸,你的貸款總共有4個12分(或48個)還款期。
- PV
- Double
必須的。 即一系列未來付款或收款的現值,或今日價值。 例如,當你借錢買車時,貸款金額就是你每月汽車還款的現值。
- FV
- Double
Optional. 你在支付最後一筆款項後想要的未來價值或現金餘額。 例如,貸款的未來價值是 \$0,因為那是最後一筆還款後的價值。 然而,如果你想在18年內為孩子存下50,000美元,那麼50,000美元就是未來的價值。 如果沒有指定,會假設為 0。
- Due
- DueDate
Optional. 指定付款到期時間的物件 DueDate 。 這個論點必須是 DueDate.EndOfPeriod 付款是在付款期間結束時到期,或 DueDate.BegOfPeriod 是付款在該期間開始時到期。 若省略, DueDate.EndOfPeriod 則視為假定。
傳回
年金在特定期間內的利息支付,基於定期、固定的支付額和固定利率。
例外狀況
Per
<= 0 或 Per>NPer
範例
此範例使用函 IPmt 數計算當所有付款金額相等時,利息佔多少。 給出的有:) (APR / 12 期間利率、) (Period 利息部分所需還款期間、) (TotPmts 還款總數、貸款 (PVal) 的現值或本金、貸款 (FVal) 的未來價值,以及表示還款期限 (PayType) 開始或結束的數字。
Sub TestIPMT()
Dim APR, PVal, Period, IntPmt, TotInt, TotPmts As Double
Dim PayType As DueDate
Dim Response As MsgBoxResult
' Usually 0 for a loan.
Dim Fval As Double = 0
' Define money format.
Dim Fmt As String = "###,###,##0.00"
PVal = CDbl(InputBox("How much do you want to borrow?"))
APR = CDbl(InputBox("What is the annual percentage rate of your loan?"))
If APR > 1 Then APR = APR / 100 ' Ensure proper form.
TotPmts = CInt(InputBox("How many monthly payments?"))
Response = MsgBox("Do you make payments at end of the month?", MsgBoxStyle.YesNo)
If Response = MsgBoxResult.No Then
PayType = DueDate.BegOfPeriod
Else
PayType = DueDate.EndOfPeriod
End If
For Period = 1 To TotPmts ' Total all interest.
IntPmt = IPmt(APR / 12, Period, TotPmts, -PVal, Fval, PayType)
TotInt = TotInt + IntPmt
Next Period
' Display results.
MsgBox("You will pay a total of " & Format(TotInt, Fmt) &
" in interest for this loan.")
End Sub
備註
年金是一系列隨時間固定支付的現金支付。 年金可能是一筆貸款 (例如房屋貸款) 或投資 (例如每月存款計劃)。
Rate和 NPer 參數必須以相同單位表示的付款期間計算。 例如,若 Rate 是用月份計算,則 NPer 也必須用月份計算。
對於所有引數,付出的現金 (例如要儲蓄的存款金額) 是由負數表示;收入的現金 (例如股利支票) 是由正數表示。