Signature (Visual Basic / VBA)
Public Function Payment( _
ByVal vRate As Variant _
, ByVal vNPer As Variant _
, ByVal vPV As Variant _
, Optional ByVal vFV As Variant _
, Optional ByVal vType As Variant _
) As Variant
Code Examples
Payment(0.0525 / 12, 20 * 12, 0, 50000) = -118.172083172565
Payment(0.07 / 12, 4 * 12, 20000) = -478.924893248856
Parameters
| Parameter | Description |
|---|---|
| vRate | Interest rate per period, expressed as a decimal number. The vRate and vNPer arguments must be expressed in corresponding units. If vRate is a monthly interest rate, then the number of periods (vNPer) must be expressed in months. For a mortgage loan at 6% annual percentage rate (APR) with monthly payments, vRate would be 0.06 / 12 or 0.005. Function will return Null if vRate is Null or cannot be interpreted as a number. |
| vNPer | Number of periods. The vRate and vNPer arguments must be expressed in corresponding units. If vRate is a monthly interest rate, then the number of periods (vNPer) must be expressed in months. For a 30-year mortgage loan with monthly payments, vNPer would be 30 * 12 or 360. Function will return Null if vNPer is Null or cannot be interpreted as a number. |
| vPV | Present value (lump sum) of the series of future payments. Cash paid out is represented by negative numbers and cash received by positive numbers. Function will return Null if vPV is Null or cannot be interpreted as a number. |
| vFV | Optional future value (cash balance) left after the final payment. Cash paid out is represented by negative numbers and cash received by positive numbers. The future value of a loan will usually be 0 (zero). vFV defaults to 0 (zero) if it is missing or Null or cannot be interpreted as a number. |
| vType | Optional argument that specifies when payments are due. Set to 0 (zero) if payments are due at the end of the period, and set to 1 (one) if payments are due at the beginning of the period. vType defaults to 0 (zero), meaning that payments are due at the end of the period, if it is missing or Null or cannot be interpreted as a number. Function returns Null if vType is not 0 (zero) nor 1 (one). |
Notes & Version History
| Example | How much would you have to pay into a savings account monthly in order for that savings account to be worth $50,000 after 20 years, assuming that the savings account pays 5.25% annual percentage rate (APR) compounded monthly? At least $118.18. |
| Example | How much would your monthly payments be for a four-year loan on a car that costs $20,000 assuming the loan has an annual percentage rate (APR) of 7.5%? Approximately $478.92. See the PaymentVerify Subroutine for more examples of this Function. |
| Summary | An annuity is a series of fixed payments (all payments are the same amount) made over time. An annuity can be a loan (such as a car loan or a mortgage loan) or an investment (such as a savings account or a certificate of deposit). |
| v2.0 Addition | This function is new to this version of Entisoft Tools. |