Financial.IPmt メソッド
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)
構文
Public Shared Function IPmt ( _ Rate As Double, _ Per As Double, _ NPer As Double, _ PV As Double, _ <OptionalAttribute> Optional FV As Double = 0, _ <OptionalAttribute> Optional Due As DueDate = DueDate.EndOfPeriod _ ) As Double
Dim Rate As Double Dim Per As Double Dim NPer As Double Dim PV As Double Dim FV As Double Dim Due As DueDate Dim returnValue As Double returnValue = Financial.IPmt(Rate, Per, NPer, PV, FV, Due)
public static double IPmt ( double Rate, double Per, double NPer, double PV, [OptionalAttribute] double FV, [OptionalAttribute] DueDate Due )
public: static double IPmt ( double Rate, double Per, double NPer, double PV, [OptionalAttribute] double FV, [OptionalAttribute] DueDate Due )
public static double IPmt ( double Rate, double Per, double NPer, double PV, /** @attribute OptionalAttribute() */ double FV, /** @attribute OptionalAttribute() */ DueDate Due )
public static function IPmt ( Rate : double, Per : double, NPer : double, PV : double, FV : double, Due : DueDate ) : double
- Rate
必須。投資期間を通じて一定の利率を示す Double 型の値。たとえば、10% の年率 (APR) で自動車ローンを利用する際、毎月の支払いを指定した場合の月々の利率は 0.1/12 (0.0083) になります。
- NPer
必須。投資期間全体での支払い回数の合計を示す Double 型の値。たとえば、4 年間、月々分割払い自動車ローンを利用した場合、合計で 4 × 12 (= 48) の返済期間があることになります。
- PV
必須。現在の投資額、つまり将来行われる一連の支払いや受け取りを現時点で一括した場合の合計金額を示す Double 型の値。たとえば、自動車を購入するために資金を借り入れた場合、ローン金額は、毎月の返済の対象となる貸手にとっての現在価値を表します。
- FV
省略可能。投資の将来価値、つまり最後の支払いを行った後に残る現金の収支を示す Double 型の値。たとえば、ローンの将来価値は 0 です。最終支払い後の価値であるためです。ただし、子供の教育費のため、18 年間かけて 50 万円を貯金する場合、この 50 万円は将来価値になります。省略した場合、0 が使用されます。
- Due
省略可能。支払い期日を示すオブジェクト型 DueDate 列挙型 の値。各期の期末に支払う場合は DueDate.EndOfPeriod を、各期の期首に支払う場合は DueDate.BegOfPeriod をそれぞれ引数に指定します。省略した場合は、DueDate.EndOfPeriod を指定したものと見なされます。
定期的な定額の支払いおよび一定した利率に基づいて、特定の期に支払う金利を指定する Double 型の値を返します。
詳細については、Visual Basic のトピック「IPmt 関数」を参照してください。
投資とは、一連の定額の支払いを一定の期間行うことです。たとえば、住宅ローンなどのローンまたは毎月の貯蓄プランなどの出資を指します。
Rate 引数と NPer 引数は、単位が同じ支払い期日を使用して計算する必要があります。たとえば、月を使用して Rate が計算される場合は、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
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- Financial.IPmt メソッドのページへのリンク