Method Deck / finance

Total interest over a loan

Computes the total interest paid over the full life of a fixed-payment amortizing loan.

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: r = annual_rate_percent / 100; monthly rate i = r / 12.
  2. Compute the fixed monthly payment using the standard annuity formula: payment = principal * i * (1+i)^months / ((1+i)^months - 1) (or principal/months if i = 0).
  3. total_paid = payment * months.
  4. total_interest = total_paid - principal.
  5. Round monthly_payment, total_paid, and total_interest to 2 decimals (money to cents).

Constants

None.

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"principal":200000,"annual_rate_percent":6,"months":360}$231,676.00
test vector: zero interest{"principal":12000,"annual_rate_percent":0,"months":12}$0.00

Published card