Canadian Mortgage Payment Calculator
mortgage_paymentCalculate the periodic mortgage payment for a Canadian home. Call it ONE of two ways: (a) if the user gave a PURCHASE PRICE, pass homePrice + downPayment and CMHC insurance is applied when the down payment is under 20%; (b) if the user gave a MORTGAGE / LOAN AMOUNT (e.g. "payment on a $500,000 mortgage"), pass loanAmount on its own. Do NOT invent a purchase price in order to reach a loan amount — use loanAmount. Inventing a price changes the answer by several percent and attaches a CMHC premium the user does not owe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| province | No | Province name, used only for CMHC PST on the premium | |
| rateType | No | fixed | |
| homePrice | No | Purchase price in CAD, e.g. 650000. Use with downPayment. Omit if the user gave you the mortgage amount instead. | |
| termYears | No | ||
| loanAmount | No | The mortgage amount itself in CAD, when the user stated the loan rather than the purchase price. Mutually exclusive with homePrice. No CMHC premium is applied on this path — the amount is taken as the principal. | |
| downPayment | No | Down payment amount in CAD (or percent if downPaymentType='percent'). Required when homePrice is used. | |
| downPaymentType | No | amount | |
| paymentFrequency | No | monthly | |
| amortizationYears | No | Amortization in years (max 25 insured, 30 uninsured/first-time new builds) | |
| annualInterestRatePct | Yes | Annual interest rate as a percent, e.g. 5.25 |