Loan Repayment Calculator

This is relevant to credit cards (daily), lines of credit (monthly), and some types of loans (monthly/amortized).

Source Code
Information
Principal: original loan value; Annualized rate: interest charged per year (usually just called the "interest rate" of the loan); Amortization: fixed time period over which the loan is repaid (e.g., mortgage); Average payment: average payment per period

This calculator assumes monthly statements are given. If interest is charged daily, it is added daily to the balance. If it is charged monthly, it is only added on the first day of the next month. In this case, the interest shown in the table is not truly realized until the next statement period.

Credit Card (charged daily)

Mortgage (amortized, charged monthly)

Line of Credit and Other Loans (charged monthly)


Definitions for the formulae used in these calculations

Pn: Payment for period n ($)

Bn: Starting balance for period n ($) (previous month ending balance)

In: Interest for period n ($)

ℳ: Minimum payment multiplier (%) (e.g., 4.5% => M=1.045)

dprd: Days in the period (e.g., biweekly => d=14)

rann: Annualized rate (%) (e.g., 5% => r=0.05)


Period Payment: Pn = ℳ × Bn-1 + In

Period Interest (Charged monthly): In = Bn-1 ( d prd rann 365.25 )

Period Interest (Charged daily): I n = Bn-1 ( ( 1 + rann 365.25 ) − 1 ) dprd