Financial.Pmt(Double, Double, Double, Double, DueDate) 方法

定義

傳回值,指定根據定期、定額付款及固定利率所計算的年金付款款項。

public static double Pmt (double Rate, double NPer, double PV, double FV = 0, Microsoft.VisualBasic.DueDate Due = Microsoft.VisualBasic.DueDate.EndOfPeriod);
static member Pmt : double * double * double * double * Microsoft.VisualBasic.DueDate -> double
Public Function Pmt (Rate 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。

NPer
Double

必要。 年金中付款的總期數。 例如,如果您的四年期汽車貸款是採月付方式償還,則付款總期數就是 4 x 12 (即 48) 期。

PV
Double

必要。 未來要支付之一系列付款的現值 (或整筆金額)。 例如,當您貸款買車時,貸款金額就是您要以每月支付方式付給貸方的車款金額現值。

FV
Double

選擇性。 您在最後一次付款之後想要的未來價值或現金餘額。 例如,貸款的未來值為 $0,因為是代表最後一期付款之後的值。 然而,如果您想在 18 年內存下美金 $50,000 元做為子女教育費用,那麼美金 $50,000 元就是未來值。 如果省略,則假設為 0。

Due
DueDate

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

傳回

根據定期、定額付款及固定利率所計算的年金付款款項。

例外狀況

NPer = 0。

範例

此範例會使用 函 Pmt 式,在固定期間內傳回貸款的每月付款。 假設是每個期間 APR / 12 () 的利率百分比、付款總數 () TotPmts 、貸款 () 的現值或主體、貸款 PValFVal (的未來值) ,以及指出付款是否在付款期間開頭或結束時到期的數位 (PayType).

Sub TestPMT()
    Dim PVal, APR, Payment, TotPmts As Double
    Dim PayType As DueDate
    Dim Response As MsgBoxResult

    ' Define money format.
    Dim Fmt As String = "###,###,##0.00"
    ' Usually 0 for a loan.
    Dim FVal As Double = 0
    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 = CDbl(InputBox("How many monthly payments will you make?"))
    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
    Payment = Pmt(APR / 12, TotPmts, -PVal, FVal, PayType)

    MsgBox("Your payment will be " & Format(Payment, Fmt) & " per month.")
End Sub

備註

年金是一系列在一段時間內進行的固定現金付款。 年金可以是貸款 (,例如家庭貸款) 或投資 (,例如每月節省方案) 。

RateNPer 自變數必須使用以相同單位表示的付款期間來計算。 例如,如果使用 Rate 月份計算, NPer 也必須使用月份計算。

針對所有自變數,支付的現金 (,例如儲存) 的現金會以負數表示;收到 (的現金,例如正數表示) 的除數檢查。

適用於

另請參閱