# annuterm

Number of periods to obtain value

## Syntax

``NumPeriods = annuterm(Rate,Payment,PresentValue)``
``NumPeriods = annuterm(___,FutureValue,Due)``

## Description

example

````NumPeriods = annuterm(Rate,Payment,PresentValue)` calculates the number of periods needed to obtain a future value. To calculate the number of periods needed to pay off a loan, enter the payment or the present value as a negative value.```

example

````NumPeriods = annuterm(___,FutureValue,Due)` specifies options using one or more optional arguments in addition to the input arguments in the previous syntax.```

## Examples

collapse all

This example shows a savings account with a starting balance of \$1500. \$200 is added at the end of each month and the account pays 9% interest, compounded monthly. How many months will it take to save \$5,000?

`NumPeriods = annuterm(0.09/12, 200, 1500, 5000, 0)`
```NumPeriods = 15.6752 ```

## Input Arguments

collapse all

Interest-rate per period, specified as a scalar numeric decimal.

Data Types: `double`

Payment per period, specified as a scalar numeric.

Data Types: `double`

Present value of the loan, specified as a scalar numeric.

Data Types: `double`

(Optional) Future value of the loan, specified as a scalar numeric.

Data Types: `double`

(Optional) When payments are due, specified as a scalar integer with value of `0` (end of period) or `1` (beginning of period).

Data Types: `double`

## Output Arguments

collapse all

Number of payment periods, returned as a scalar numeric.

## Version History

Introduced before R2006a