Method Deck / finance

Future value of an annuity

Computes the future value of a series of equal periodic payments, either an ordinary annuity or an annuity due.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Convert the annual rate to a decimal per period: i = annual_rate_percent / 100 (one compounding per payment period).
  2. Ordinary annuity future value: FV_ordinary = payment * (((1 + i)^periods - 1) / i), or payment * periods if i = 0.
  3. If is_annuity_due is true, future_value = FV_ordinary * (1 + i); otherwise future_value = FV_ordinary.
  4. Round future_value to 2 decimals (money to cents).

Constants

None.

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"payment":1000,"annual_rate_percent":5,"periods":10,"is_annuity_due":false}$12,577.89
test vector: annuity due{"payment":1000,"annual_rate_percent":5,"periods":10,"is_annuity_due":true}$13,206.79

Published card