Same numbers, programmatically. This page runs entirely in the browser; the same engine is also available as a JSON API and MCP server (see llms.txt). The calculation is a standalone, dependency-free script that works in Node or a browser: https://www.a3sec.net/tools/engines/mortgage-engine.js. Example: curl -sO https://www.a3sec.net/tools/engines/mortgage-engine.js && node -e "const M=require('./mortgage-engine.js');console.log(JSON.stringify(M.summarize(M.quickQuote({country:'CA',region:'ON',price:700000,downPct:10})),null,1))"
Prefill by URL: mortgage.html?country=CA®ion=TOR&price=900000&firstTime=yes&apr=4.5&years=25&agent=1. Parameters: country (US|CA), region (any US state code or DC; any Canadian province or territory code, TOR for Toronto, MTL for Montreal), price, down (percent) or downAmount, apr, years or months, taxYearly, insuranceYearly, hoa, utilities, extra, firstTime (yes|no|unknown), newBuild (yes|no), lang (en|uk), theme (dark|light); agent=1 opens this panel. Results appear below as JSON (element id resultsJson).
Model. Standard amortization. US compounds monthly; Canada semi-annually ((1+APR/2)^(1/6) β 1). US PMI: 1.35 / 0.85 / 0.50% of the loan per year for under 5 / 10 / 20% down, terminated on the original schedule at 78% LTV or the term midpoint, assuming payments are current; early cancellation by request is not modeled. Canada CMHC: 4.00 / 3.10 / 2.80% one-time premium for 5β9.99 / 10β14.99 / 15β19.99% down, financed into the loan, plus 0.20 percentage points for amortizations over 25 years (first-time buyers and newly built homes, maximum 30 years). Minimum down payment, applied automatically: Canada 5% of the first $500k plus 10% of the rest, 20% at $1.5M+; US conventional 3% for a first-time buyer, otherwise 5%, and above the 2026 conforming limit ($832,750; AK/HI $1,249,125) the lesser of staying conforming or 10%. Property-tax presets: US state averages (Tax Foundation 2026), Canada a major cityβs residential rate. Cash at closing = down payment + itemized costs: buyer-paid transfer, recording and mortgage taxes for every state and province (Toronto and Montreal city taxes as separate regions), first-time buyer relief (ON, Toronto, BC, PEI, MD, DE) and BCβs new-build exemption, sales tax on the CMHC premium (ON 8%, QC 9%, SK 6%); US lender fees (state HMDA median), appraisal and credit, title and settlement (LodeStar state averages scaled to the price), recording, inspection, a year of home insurance, 15 days of interest and an escrow deposit; Canada legal or notary fees, title insurance, inspection, appraisal when uninsured and a property-tax adjustment, at least 1.5% of the price. Money is in the local currency (USD / CAD).
Average rates. https://www.a3sec.net/tools/data/rates.json holds the current averages used as APR presets: US 15- or 30-year fixed matched to the loan term (Freddie Mac PMMS via FRED series MORTGAGE15US / MORTGAGE30US, refreshed when the site is deployed) and Canada 5-year fixed for a high-ratio mortgage, posted 5-year and estimated variable (Bank of Canada Valet API series FVI_MTG_RATE_5Y_FIX, V80691335, BROKER_AVERAGE_5YR_VRM, which this page also refreshes live). The APR field is filled from these until you type your own rate.
No code execution? The same calculation is available as a JSON API (https://www.a3sec.net/api) and as MCP tools at https://www.a3sec.net/mcp. All three calculators are described in https://www.a3sec.net/llms.txt. Estimates only β not financial advice.
Current results (JSON, updated on every calculation):
{}
Estimates only. Property tax, insurance and closing-cost presets are regional averages β check local figures. Not financial advice.