DEV Community

UseCOS Research & Engineering
UseCOS Research & Engineering

Posted on Originally published at usecos.app

Why US Mortgage Math Overstates Canadian Payments by $4,479 (and How to Implement Semi-Annual Compounding)

Most mortgage calculators on the web default to monthly compounding (the US standard). Under Canada's Interest Act (Section 6), fixed-rate Canadian mortgages must be compounded semi-annually, not in advance.

On a $500,000 mortgage at 5.00% over 25 years:

Metric US Monthly Compounding Canadian Semi-Annual Compounding Difference
Monthly Payment $2,922.95 $2,908.02 +$14.93/mo
Total Paid (25 yrs) $876,885.00 $872,406.00 +$4,479.00

The Exact Formula

Convert the nominal annual rate r to an effective monthly rate i:

i = (1 + r / 2) ^ (2 / 12) - 1
Enter fullscreen mode Exit fullscreen mode

In TypeScript (from canadian-mortgage-math-engine, the open-source engine behind UseCOS Mortgage Calculator):

export function monthlyRateFromSemiAnnual(annualRatePercent: number): number {
  const r = annualRatePercent / 100;
  return Math.pow(1 + r / 2, 2 / 12) - 1;
}
Enter fullscreen mode Exit fullscreen mode

OSFI B-20 Stress Test

Federally regulated lenders qualify borrowers at the greater of:

  • contractRate + 2.00%
  • 5.25%

Use It via MCP (Claude / Cursor / Windsurf)

We also packaged this engine alongside CRA payroll, GST/HST, auto loan, and ISO 3779 VIN validation into usecos-mcp (GitHub):

{
  "mcpServers": {
    "usecos": {
      "command": "npx",
      "args": ["-y", "usecos-mcp"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Full interactive calculator and methodology: usecos.app/guides/mortgage-stress-test-canada.

Top comments (0)