Annuity Calculator Formula

Understand the math behind the annuity calculator. Each variable explained with a worked example.

Formulas Used

Future Value of Annuity

fv_annuity = rate > 0 ? payment * (pow(1 + rate, n) - 1) / rate : payment * n

Present Value of Annuity

pv_annuity = rate > 0 ? payment * (1 - pow(1 + rate, -n)) / rate : payment * n

Total Payments

total_payments = payment * n

Variables

VariableDescriptionDefault
paymentPayment Amount(USD)1000
annual_rateAnnual Interest Rate(%)5
yearsNumber of Years(years)20
rateDerived value= annual_rate / 100calculated
nDerived value= yearscalculated

How It Works

Annuity Formulas

Future Value = PMT × [(1+r)^n - 1] / r

Present Value = PMT × [1 - (1+r)^-n] / r

These assume annual payments at the end of each period (ordinary annuity).

Worked Example

$1,000 annual payments for 20 years at 5% interest.

payment = 1000annual_rate = 5years = 20
  1. 01Future value = $1,000 × (1.05^20 - 1) / 0.05
  2. 02= $1,000 × (2.6533 - 1) / 0.05 = $33,066
  3. 03Present value = $1,000 × (1 - 1.05^-20) / 0.05
  4. 04= $1,000 × (1 - 0.3769) / 0.05 = $12,462
  5. 05Total payments = $1,000 × 20 = $20,000

Ready to run the numbers?

Open Annuity Calculator