## Payment Type FunctionMath Financial Class

```Public Function PaymentType( _
ByVal vRate As Variant _
, ByVal vNPer As Variant _
, ByVal vPmt As Variant _
, ByVal vPV As Variant _
, Optional ByVal vFV As Variant _
) As Variant```

### Calculate the Payment Type for an annuity that is based on fixed, periodic payments and a fixed interest rate, given other information about the annuity. Function returns 1 (one) if for beginning of period payments or 0 (zero) for end of period payments.

Example: Assuming you have an annuity which earns interest at 7% annually and is worth \$50,000 today, and assuming that you will withdraw \$3954.94 from that annuity annually and at the end of 20 years it is worth \$20,000, were the withdrawals made at the beginning or end of each year? Beginning of period.
`     PaymentType(0.07, 20, 3954.94, -50000, 20000) = 1.00000712417407`
See the PaymentTypeVerify Subroutine for more examples of this Function.
```    InterestRate Function
NumberPeriods Function
Payment Function
PresentValue Function
FutureValue 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).
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.
vPmt: Amount of the payment made each period. Cash paid out is represented by negative numbers and cash received by positive numbers. Function will return Null if vPmt 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.
Return value: Function returns 0 (zero) if payments are due at the end of the period, and 1 (one) if payments are due at the beginning of the period. Because of the algorithm used, the function will seldom return exactly 0 or 1, so you should probably use the Round function to round the result to the nearest whole number.
v2.0 Addition: This function is new to this version of Entisoft Tools.