Tech Note 03f: Financial Functions

March 12, 2003

© NSB Corporation. All rights reserved.

For more information on this control, see Microsoft's documentation.


NS Basic/CE has a set of functions for financial calculations. These are contained in the Finance object, which has to be initialized using an addobject function. The Finance object is built into the ROM of some Windows CE, and does not always have to be downloaded to be used.

addObject("finance")
payments=finance.NPer(0.1/12, -500, 12000)
msgbox payments

 

On EmCE, use CreateObject instead (works on device as well):
set finance=createObject("pVBFinFunc.pvbFinFunc")


Method

Description

DDB(cost, salvage, life, period, factor)

Returns the depreciation of an asset for a specific time period using the double declining balance method, or some other method that you specify.

FV(rate, nper, pmt[, pv[, type]])

Returns the future value of an annuity based on periodic, fixed payments and a fixed interest rate.

IPmt(rate, per, nper, pv, fv, type)

Returns the interest payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate.

IRR(values[, guess])

Returns the internal rate of return for a series of periodic cash flows (payments and receipts).

MIRR(values, finance_rate, reinvest_rate)

Returns the modified internal rate of return for a series of periodic cash flows (payments and receipts).

NPer(rate, pmt, pv[, fv[, type]])

Returns the number of periods for an annuity based on periodic, fixed payments and a fixed interest rate.

NPV(rate, values)

Returns the net present value of an investment based on a series of periodic cash flows (payments and receipts) and a discount rate.

Pmt(rate, nper, pv[, fv[, type]])

Returns the payment for an annuity based on periodic, fixed payments and a fixed interest rate.

PPmt(rate, per, nper, pv, type)

Returns the principal payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate.

PV(rate, nper, pmt[, fv[, type]])

Returns the present value of an annuity based on periodic, fixed payments to be paid in the future, and a fixed interest rate.

Rate(nper, pmt, pv[, fv[, type[, guess]]])

Returns the interest rate per period for an annuity.

SLN(cost, salvage, life)

Returns the straight line depreciation of an asset for a single period.

SYD(cost, salvage, life, period)

Returns the sum of years' digits depreciation of an asset for a specified period.

 

 

 

 

DDB(cost, salvage, life, period, factor)

Specifies the depreciation of an asset for a specific time period using the double-declining balance method, or some other method that you specify.

Cost

Required. Sets initial cost of the asset.

Salvage

Required. Sets value of the asset at the end of its useful life.

Life

Required. Sets length of useful life of the asset.

Period

Required. Sets period for which asset depreciation is calculated.

Factor

Required. Sets rate at which the balance declines.

The double declining balance method computes depreciation at an accelerated rate. Depreciation is highest in the first period and decreases in successive periods. The life and period arguments must be expressed in the same units. For example, if life is given in months, period must also be given in months. All arguments must be positive numbers.

The DDB function uses the following formula to calculate depreciation for a given period:

Depreciation / period = ((cost ˆ salvage) * factor) / life

 

 

FV(rate, nper, pmt[, pv[, type]])

Specifies the future value of an annuity based on periodic fixed payments and a fixed interest rate.

 

Rate

Required. Sets interest rate per period. For example, if you obtain a boat loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.

nper

Required. Sets total number of payment periods in the annuity. For example, if you make monthly payments on a four year boat loan, your loan has a total of 4 * 12 (or 48) payment periods.

Pmt

Required. Sets payment to be made each period. Payments usually contain principal and interest that does not change over the life of the annuity.

Pv

Optional. Sets present value (or lump sum) of a series of future payments. For example, when you borrow money to buy a boat, the loan amount is the present value to the lender of the monthly boat payments you will make. If omitted, 0 is assumed.

Type

Optional. Sets when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

The rate and nper arguments must be calculated using payment periods expressed in the same units. For example, if rate is calculated using months, nper must also be calculated using months.

For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

 

 

 

 

IPmt(rate, per, nper, pv, fv, type)

Specifies the interest payment for a given period of an annuity based on periodic fixed payments and a fixed interest rate. 

Rate

Required. Sets interest rate per period. For example, if you obtain a boat loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.

per

Required. Sets payment period in the range 1 through nper.

Nper

Required. Sets total number of payment periods in the annuity. For example, if you make monthly payments on a four year boat loan, your loan has a total of 4 * 12 (or 48) payment periods.

Pv

Required. Sets present value, or value today, of a series of future payments or receipts. For example, when you borrow money to buy a boat, the loan amount is the present value to the lender of the monthly boat payments you will make.

Fv

Required. Sets future value or cash balance you want after you have made the final payment. For example, the future value of a loan is $0 because that is its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.

Type

Required. Sets when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period.

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

The rate and nper arguments must be calculated using payment periods expressed in the same units. For example, if rate is calculated using months, nper must also be calculated using months.

For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

 

 

 

IRR(values[, guess])

Specifies the internal rate of return for a series of periodic cash flows (payments and receipts).

 

Value

Required. Array of Sets cash flow values. The array must contain at least one negative value (a payment) and one positive value (a receipt).

Guess

Optional. Sets value you estimate will be returned by IRR. If omitted, guess is 0.1 (10 percent).

The internal rate of return is the interest rate received for an investment consisting of payments and receipts that occur at regular intervals.

The IRR function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence. The cash flow for each period does not have to be fixed, as it is for an annuity.

IRR is calculated by iteration. Starting with the value of guess, IRR cycles through the calculation until the result is accurate to within 0.00001 percent. If IRR cannot find a result after 20 tries, it fails.

 

 

 

 

MIRR(values, finance_rate, reinvest_rate)

Specifies the modified internal rate of return for a series of periodic cash flows (payments and receipts).

 

 

Valuesfinance_rate

Required. Sets interest rate paid as the cost of financing.

reinvest_rate

Required. Sets interest rate received on gains from cash reinvestment.

The modified internal rate of return is the internal rate of return when payments and receipts are financed at different rates. The MIRR function takes into account both the cost of the investment (finance_rate) and the interest rate received on reinvestment of cash (reinvest_rate).

The finance_rate and reinvest_rate arguments are percentages expressed as decimal values. For example, 12 percent is expressed as 0.12.

The MIRR function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence.

 

 

 

 

NPer(rate, pmt, pv[, fv[, type]])

Specifies the number of periods for an annuity based on periodic fixed payments and a fixed interest rate.

Rate-Required. Sets interest rate per period. For example, if you obtain a boat loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.

Pmt

Required. Sets payment to be made each period. Payments usually contain principal and interest that does not change over the life of the annuity.

Pv

Required. Sets present value, or value today, of a series of future payments or receipts. For example, when you borrow money to buy a boat, the loan amount is the present value to the lender of the monthly boat payments you will make.

Fv

Optional. Sets future value or cash balance you want after you have made the final payment. For example, the future value of a loan is $0 because that is its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.

Type

Optional. Sets when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

 

 

 

 

NPV(rate, values)

Specifies the net present value of an investment based on a series of periodic cash flows (payments and receipts) and a discount rate.

Rate

Required. Sets discount rate over the length of the period, expressed as a decimal.

Values

Required. Array of Sets cash flow values. The array must contain at least one negative value (a payment) and one positive value (a receipt).

The net present value of an investment is the current value of a future series of payments and receipts.

The NPV function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence.

The NPV investment begins one period before the date of the first cash flow value and ends with the last cash flow value in the array.

The net present value calculation is based on future cash flows. If your first cash flow occurs at the beginning of the first period, the first value must be added to the value returned by NPV and must not be included in the cash flow values of values().

The NPV function is similar to the PV function (present value) except that the PV function allows cash flows to begin either at the end or the beginning of a period. Unlike the variable NPV cash flow values, PV cash flows must be fixed throughout the investment.

 

 

 

 

Pmt(rate, nper, pv[, fv[, type]])

Specifies the payment for an annuity based on periodic fixed payments and a fixed interest rate.

Rate

Required. Sets interest rate per period. For example, if you obtain a boat loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.

Nper

Required. Sets total number of payment periods in the annuity. For example, if you make monthly payments on a four year boat loan, your loan has a total of 4 * 12 (or 48) payment periods.

Pv

Required. Sets present value (or lump sum) that a series of payments to be paid in the future is worth now. For example, when you borrow money to buy a boat, the loan amount is the present value to the lender of the monthly boat payments you will make.

Fv

Optional. Sets future value or cash balance you want after you made the final payment. For example, the future value of a loan is $0 because that is its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.

Type

Optional. Sets when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

The rate and nper arguments must be calculated using payment periods expressed in the same units. For example, if rate is calculated using months, nper must also be calculated using months.

For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

 

 

 

 

PPmt(rate, per, nper, pv, type)

Specifies the principal payment for a given period of an annuity based on periodic fixed payments and a fixed interest rate.

Rate

Required. Sets interest rate per period. For example, if you obtain a boat loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.

Per

Required. Sets payment period in the range 1 through nper.

Nper

Required. Sets total number of payment periods in the annuity. For example, if you make monthly payments on a four year boat loan, your loan has a total of 4 * 12 (or 48) payment periods.

Pv

Required. Sets present value, or value today, of a series of future payments or receipts. For example, when you borrow money to buy a boat, the loan amount is the present value to the lender of the monthly boat payments you will make.

Fv

Optional. Sets future value or cash balance you want after you have made the final payment. For example, the future value of a loan is $0 because that is its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.

Type

Required. Sets when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

The rate and nper arguments must be calculated using payment periods expressed in the same units. For example, if rate is calculated using months, nper must also be calculated using months.

For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

 

 

 

 

PV(rate, nper, pmt[, fv[, type]])

Specifies the present value of an annuity based on periodic fixed payments to be paid in the future and a fixed interest rate.

Rate

Required. Sets interest rate per period. For example, if you have a boat loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.

Nper

Required. Sets total number of payment periods in the annuity. For example, if you make monthly payments on a four year boat loan, your loan has a total of 4 * 12 (or 48) payment periods.

Pmt

Required. Sets payment to be made each period. Payments usually contain principal and interest that does not change over the life of the annuity.

Fv

Optional. Sets future value or cash balance you want after you have made the final payment. For example, the future value of a loan is $0 because that is its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.

Type

Optional. Sets when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

The rate and nper arguments must be calculated using payment periods expressed in the same units. For example, if rate is calculated using months, nper must also be calculated using months.

For all arguments, cash paid out (such as deposits to savings) is by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

 

 

 

 

Rate(nper, pmt, pv[, fv[, type[, guess]]])

Specifies the interest rate per period for an annuity.

Nper

Required. Sets total number of payment periods in the annuity. For example, if you make monthly payments on a four year boat loan, your loan has a total of 4 * 12 (or 48) payment periods.

Pmt

Required. Sets payment to be made each period. Payments usually contain principal and interest that does not change over the life of the annuity.

Pv

Required. Sets present value, or value today, of a series of future payments or receipts. For example, when you borrow money to buy a boat, the loan amount is the present value to the lender of the monthly boat payments you will make.

Fv

Optional. Sets future value or cash balance you want after you make the final payment. For example, the future value of a loan is $0 because that is its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.

Type

Optional. Sets a number indicating when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

Guess

Optional. Sets value you estimate will be returned by the Rate function. If omitted, guess is 0.1 (10 percent).

An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan).

For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

Rate is calculated by iteration. Starting with the value of guess, the Rate function cycles through the calculation until the result is accurate to within 0.00001 percent. If Rate cannot find a result after 20 tries, it fails. If your guess is 10 percent and Rate fails, try a different value for guess.

 

 

 

 

SLN(cost, salvage, life)

Specifies the straight-line depreciation of an asset for a single period.

Cost

Required. Sets initial cost of the asset.

Salvage

Required. Sets value of the asset at the end of its useful life.

Life

Required. Sets length of the useful life of the asset.

The depreciation period must be expressed in the same unit as the life argument. All arguments must be positive numbers.

 

 

 

 

SYD(cost, salvage, life, period)

Specifies the sum-of-years' digits depreciation of an asset for a specified period.

Cost

Required. Sets initial cost of the asset.

Salvage

Required. Sets value of the asset at the end of its useful life.

Life

Required. Sets length of the useful life of the asset.

Period

Required. Sets period for which asset depreciation is calculated.

The life and period arguments must be expressed in the same units. For example, if life is given in months, period must also be given in months. All arguments must be positive numbers.