How we calculate mortgage repayments
The standard annuity formula
Your monthly payment M is the amount that reduces the balance to exactly zero at the end of the term:
M = P × [ i(1+i)ⁿ ] / [ (1+i)ⁿ − 1 ] where: P = loan principal n = total number of payments (term × periods per year) i = periodic interest rate (see per-country conventions below)
Per-country conventions
| Country | Convention | Periodic rate |
|---|---|---|
| US | standardMonthly | i = r / 12 |
| UK | standardMonthly | i = r / 12 |
| CA | canadianSemiAnnual | i = (1 + r/2)^(1/6) − 1 |
| AU | standardMonthly | i = r / 12 |
| IE | standardMonthly | i = r / 12 |
| DE | standardMonthly | i = r / 12 |
| NL | standardMonthly | i = r / 12 |
| NZ | standardMonthly | i = r / 12 |
| FR | standardMonthly | i = r / 12 |
| ES | standardMonthly | i = r / 12 |
| SG | standardMonthly | i = r / 12 |
| IN | standardMonthly | i = r / 12 |
Official test vectors
Every convention is tested against worked examples from official sources. These test vectors are the acceptance criteria for the engine:
FRED MORTGAGE30US — $400,000 @ 6.5% × 30yr monthly (standard annuity)
| Principal | 400,000 |
| Annual rate | 6.50% |
| Term | 30 years |
| Expected payment | 2,528.27 |
Bank of Canada — $500,000 @ 5.0% × 25yr monthly (semi-annual compounding)
| Principal | 500,000 |
| Annual rate | 5.00% |
| Term | 25 years |
| Expected payment | 2,907.59 |
Bank of England — £300,000 @ 4.5% × 25yr monthly (standard annuity)
| Principal | 300,000 |
| Annual rate | 4.50% |
| Term | 25 years |
| Expected payment | 1,667.03 |
RBA — $600,000 @ 6.0% × 30yr monthly (standard annuity)
| Principal | 600,000 |
| Annual rate | 6.00% |
| Term | 30 years |
| Expected payment | 3,597.30 |