FANDOM


Computes the value of an annuity given an interest rate and a number of payments, this is also called ordinary annuity. Syntax:

annuity(<interestRate>, <numberOfPeriods>)

Examples:

put annuity(.08,10)
put annuity(currentAnnualRate/12,monthsOfLoan)

Use the annuity function to calculate the present or future value of an annuity or to calculate loan payments.

The formula for the value of an ordinary annuity is

(1 - (1 + interestRate)^(- numberOfPeriods))/ interestRate 

The annuity function calculates this value.

The numberOfPeriods and the interestRate must use the same unit of time. For example, if the periods are months, the interest rate is the interest per month.

You can use the annuity function to calculate the amount of loan payments as follows:

paymentAmount = totalAmount/annuity(rate,periods)

For example, if the loan is for $2500 at an interest rate of 2% per month and is to be repaid in a year, the monthly payment is 2500/annuity(.02,12) or $236.40.

For example, if an ordinary annuity pays $50,000 per year for five years and the interest rate is 7%, the present value would be: Present Value = $50,000 x ((1 - (1 + 0.07) ^ -5) / 0.05) = $205,010.

put 50000 * annuity(0.07,5) # it returns 205010

Parameters:

  • interestRate: A positive number. The interestRate is expressed as a fraction of 1 so,for example, an 8% rate is written .08.
  • numberOfPeriods: A positive number.
  • Returns: The annuity function returns a positive number.

See also: value (function),