{
  "schemaVersion": 1,
  "version": "2026-10-22.1",
  "retrievedAt": "2026-10-22",
  "currency": "CAD",
  "implementation": "lib/canadian-account-planning.ts",
  "tests": "tests/account-planning.test.mjs",
  "sources": [
    {
      "id": "fhsaOpening",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/opening-your-fhsas.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "fhsaRoom",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/contributing-your-fhsa.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "fhsaDeductions",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/tax-deductions-fhsa-contributions.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "fhsaWithdrawals",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/withdrawals-transfers-out-your-fhsas.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "fhsaClosing",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/closing-your-fhsa.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "cpp",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/payroll-deductions-contributions/canada-pension-plan-cpp/cpp-contribution-rates-maximums-exemptions.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "cpp2",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/calculating-deductions/making-deductions/second-additional-cpp-contribution-rates-maximums.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "cppTreatment",
      "url": "https://www.canada.ca/en/services/benefits/publicpensions/cpp/contributions.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "qpp",
      "url": "https://www.revenuquebec.ca/en/businesses/source-deductions-and-employer-contributions/calculating-source-deductions-and-contributions/qpp-contributions/maximum-pensionable-earnings-and-contribution-rate/",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "qpp2",
      "url": "https://www.retraitequebec.gouv.qc.ca/en/professionals-employers/your-role-quebec-pension-plan/contributions-quebec-pension-plan-qpp",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "tfsa",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/tax-free-savings-account/contributing/calculate-room.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "rrsp",
      "url": "https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/t4040/rrsps-other-registered-plans-retirement.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "tax",
      "url": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "taxAmounts",
      "url": "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "manitoba",
      "url": "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4032-payroll-deductions-tables/t4032mb-jan/t4032mb-january-general-information.html",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    },
    {
      "id": "quebecTax",
      "url": "https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/income-tax-rates/",
      "retrievedAt": "2026-10-22",
      "sourceType": "official-government"
    }
  ],
  "rules": [
    {
      "id": "fhsa-opening",
      "jurisdiction": "CA",
      "effectiveYear": 2023,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Eligibility is the conjunction of age on opening date, age no greater than 71 at December 31, residency, first-time-buyer opening test and no ended participation period.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/opening-your-fhsas.html"
      ],
      "assumptions": [
        "Age of contractual capacity can be 19. First-time-buyer test includes homes lived in and owned by a current spouse/common-law partner. The separate qualifying-withdrawal test differs."
      ],
      "testCases": [
        "opening eligibility true/false cases"
      ],
      "values": {
        "minimumTaxAge": 18,
        "maximumYearEndAge": 71
      }
    },
    {
      "id": "fhsa-participation",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Normal room = prior unused re-participation room + min(8000 + prior participation carry, max(0,40000 - cumulative prior deposits/transfers + cumulative prior re-participation used)). Contributions and RRSP transfers share this room.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/contributing-your-fhsa.html"
      ],
      "assumptions": [
        "All holder accounts combined. No excesses, designated corrections, successor or divorce adjustments. No room before first account opening."
      ],
      "testCases": [
        "opening-year cap",
        "zero-activity carry cap",
        "combined cash/RRSP transfer",
        "five-year lifetime exhaustion"
      ],
      "values": {
        "annualRoom": 8000,
        "maximumParticipationCarryforward": 8000,
        "lifetimeBaseLimit": 40000
      }
    },
    {
      "id": "fhsa-taxable-withdrawal-room",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "In this no-excess annual scenario, each gross taxable withdrawal adds to unused re-participation room for later years. Usage above normal room consumes that balance.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/contributing-your-fhsa.html",
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/withdrawals-transfers-out-your-fhsas.html"
      ],
      "assumptions": [
        "Within-year re-contribution sequencing and excess-removal amounts are outside the model. Gross taxable withdrawals are income; withholding is a prepayment."
      ],
      "testCases": [
        "8000 taxable withdrawal permits 16000 later-year contribution",
        "48000 cumulative deposits still capped at 40000 deductions"
      ]
    },
    {
      "id": "fhsa-annual-deduction-limit",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Track CRA annual-limit paragraphs (a) and (b), separate FHSA deduction carryforward and cumulative RRSP-transfer absorption. Annual limit is min(a,b), or zero after participation ends. Deduction available = max(0,min(cumulative annual limits - prior deductions,40000 - prior deductions - cumulative RRSP transfers)).",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/tax-deductions-fhsa-contributions.html",
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/contributing-your-fhsa.html"
      ],
      "assumptions": [
        "Cash after first qualifying withdrawal excluded. RRSP transfers are never newly deductible. Re-participation contributions can need later annual deduction-limit recognition. Qualified unused deductions can be claimed after closure."
      ],
      "testCases": [
        "3000 cash +5000 RRSP =>3000 deduction",
        "8000 deferred then5000=>13000",
        "re-participation delayed deduction",
        "deduction after closure"
      ],
      "values": {
        "lifetimeDeductionCeiling": 40000
      }
    },
    {
      "id": "fhsa-qualifying-and-transfer-out",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Qualifying withdrawals and eligible direct FHSA-to-RRSP/RRIF transfers reduce account balance without restoring participation room.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/withdrawals-transfers-out-your-fhsas.html"
      ],
      "assumptions": [
        "Qualifying-withdrawal facts must be verified separately: first-time-buyer withdrawal definition, written agreement/timing, residency, intended occupancy and RC725. Transfers must be direct, to holder-owned RRSP/RRIF and follow no-excess conditions."
      ],
      "testCases": [
        "qualifying withdrawal no new room",
        "direct RRSP/RRIF transfer no new room"
      ]
    },
    {
      "id": "fhsa-participation-end",
      "jurisdiction": "CA",
      "effectiveYear": 2023,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "End year = min(first opening year +15, birth year +71, first qualifying-withdrawal year +1). End date December31 of that year.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/first-home-savings-account/closing-your-fhsa.html"
      ],
      "assumptions": [
        "The model does not automatically liquidate or transfer a residual balance. It warns in the end year and refuses activity or balances afterward."
      ],
      "testCases": [
        "15th anniversary",
        "age71",
        "withdrawal following-year",
        "post-closure deduction only"
      ]
    },
    {
      "id": "cpp-2024",
      "jurisdiction": "CA excluding QC",
      "effectiveYear": 2024,
      "status": "historical-in-force-values",
      "retrievedAt": "2026-10-22",
      "formula": "First band=max(0,min(earnings,YMPE)-3500). Base=first band*4.95% per share; first additional=1%. CPP2=max(0,min(earnings,YAMPE)-YMPE)*4% per share. Two shares for self-employment.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/payroll-deductions-contributions/canada-pension-plan-cpp/cpp-contribution-rates-maximums-exemptions.html",
        "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/calculating-deductions/making-deductions/second-additional-cpp-contribution-rates-maximums.html",
        "https://www.canada.ca/en/services/benefits/publicpensions/cpp/contributions.html"
      ],
      "assumptions": [
        "Full year pensionable employment with one employer OR self-employment only. Annual, not payroll-period rounding. No mixed CPP/QPP employment, contribution exemptions or combined employment/self-employment calculation. No benefit estimate."
      ],
      "testCases": [
        "published annual maxima",
        "exemption and each ceiling",
        "employee/employer equality",
        "self-employed doubled share"
      ],
      "values": {
        "ympe": 68500,
        "yampe": 73200,
        "cppBase": 0.0495,
        "qppBase": 0.054,
        "additional": 0.01,
        "second": 0.04,
        "exemption": 3500
      }
    },
    {
      "id": "qpp-2024",
      "jurisdiction": "QC",
      "effectiveYear": 2024,
      "status": "historical-in-force-values",
      "retrievedAt": "2026-10-22",
      "formula": "Same annual earnings bands; use selected-year QPP base rate plus first additional1% and second additional4%. Two shares for self-employment.",
      "sources": [
        "https://www.revenuquebec.ca/en/businesses/source-deductions-and-employer-contributions/calculating-source-deductions-and-contributions/qpp-contributions/maximum-pensionable-earnings-and-contribution-rate/",
        "https://www.retraitequebec.gouv.qc.ca/en/professionals-employers/your-role-quebec-pension-plan/contributions-quebec-pension-plan-qpp",
        "https://www.retraitequebec.gouv.qc.ca/en/programs/quebec-pension-plan/work-contributions/pensionable-earnings-contributions"
      ],
      "assumptions": [
        "Province of employment for payroll. QPP is distinct from CPP. Age/election/disability cases excluded."
      ],
      "testCases": [
        "2024 max8696 self-employed",
        "2025 max4735.20 employee",
        "2026 max4895.30 employee"
      ],
      "values": {
        "ympe": 68500,
        "yampe": 73200,
        "cppBase": 0.0495,
        "qppBase": 0.054,
        "additional": 0.01,
        "second": 0.04,
        "exemption": 3500
      }
    },
    {
      "id": "cpp-2025",
      "jurisdiction": "CA excluding QC",
      "effectiveYear": 2025,
      "status": "historical-in-force-values",
      "retrievedAt": "2026-10-22",
      "formula": "First band=max(0,min(earnings,YMPE)-3500). Base=first band*4.95% per share; first additional=1%. CPP2=max(0,min(earnings,YAMPE)-YMPE)*4% per share. Two shares for self-employment.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/payroll-deductions-contributions/canada-pension-plan-cpp/cpp-contribution-rates-maximums-exemptions.html",
        "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/calculating-deductions/making-deductions/second-additional-cpp-contribution-rates-maximums.html",
        "https://www.canada.ca/en/services/benefits/publicpensions/cpp/contributions.html"
      ],
      "assumptions": [
        "Full year pensionable employment with one employer OR self-employment only. Annual, not payroll-period rounding. No mixed CPP/QPP employment, contribution exemptions or combined employment/self-employment calculation. No benefit estimate."
      ],
      "testCases": [
        "published annual maxima",
        "exemption and each ceiling",
        "employee/employer equality",
        "self-employed doubled share"
      ],
      "values": {
        "ympe": 71300,
        "yampe": 81200,
        "cppBase": 0.0495,
        "qppBase": 0.054,
        "additional": 0.01,
        "second": 0.04,
        "exemption": 3500
      }
    },
    {
      "id": "qpp-2025",
      "jurisdiction": "QC",
      "effectiveYear": 2025,
      "status": "historical-in-force-values",
      "retrievedAt": "2026-10-22",
      "formula": "Same annual earnings bands; use selected-year QPP base rate plus first additional1% and second additional4%. Two shares for self-employment.",
      "sources": [
        "https://www.revenuquebec.ca/en/businesses/source-deductions-and-employer-contributions/calculating-source-deductions-and-contributions/qpp-contributions/maximum-pensionable-earnings-and-contribution-rate/",
        "https://www.retraitequebec.gouv.qc.ca/en/professionals-employers/your-role-quebec-pension-plan/contributions-quebec-pension-plan-qpp",
        "https://www.retraitequebec.gouv.qc.ca/en/programs/quebec-pension-plan/work-contributions/pensionable-earnings-contributions"
      ],
      "assumptions": [
        "Province of employment for payroll. QPP is distinct from CPP. Age/election/disability cases excluded."
      ],
      "testCases": [
        "2024 max8696 self-employed",
        "2025 max4735.20 employee",
        "2026 max4895.30 employee"
      ],
      "values": {
        "ympe": 71300,
        "yampe": 81200,
        "cppBase": 0.0495,
        "qppBase": 0.054,
        "additional": 0.01,
        "second": 0.04,
        "exemption": 3500
      }
    },
    {
      "id": "cpp-2026",
      "jurisdiction": "CA excluding QC",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "First band=max(0,min(earnings,YMPE)-3500). Base=first band*4.95% per share; first additional=1%. CPP2=max(0,min(earnings,YAMPE)-YMPE)*4% per share. Two shares for self-employment.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/payroll-deductions-contributions/canada-pension-plan-cpp/cpp-contribution-rates-maximums-exemptions.html",
        "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/calculating-deductions/making-deductions/second-additional-cpp-contribution-rates-maximums.html",
        "https://www.canada.ca/en/services/benefits/publicpensions/cpp/contributions.html"
      ],
      "assumptions": [
        "Full year pensionable employment with one employer OR self-employment only. Annual, not payroll-period rounding. No mixed CPP/QPP employment, contribution exemptions or combined employment/self-employment calculation. No benefit estimate."
      ],
      "testCases": [
        "published annual maxima",
        "exemption and each ceiling",
        "employee/employer equality",
        "self-employed doubled share"
      ],
      "values": {
        "ympe": 74600,
        "yampe": 85000,
        "cppBase": 0.0495,
        "qppBase": 0.053,
        "additional": 0.01,
        "second": 0.04,
        "exemption": 3500
      }
    },
    {
      "id": "qpp-2026",
      "jurisdiction": "QC",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Same annual earnings bands; use selected-year QPP base rate plus first additional1% and second additional4%. Two shares for self-employment.",
      "sources": [
        "https://www.revenuquebec.ca/en/businesses/source-deductions-and-employer-contributions/calculating-source-deductions-and-contributions/qpp-contributions/maximum-pensionable-earnings-and-contribution-rate/",
        "https://www.retraitequebec.gouv.qc.ca/en/professionals-employers/your-role-quebec-pension-plan/contributions-quebec-pension-plan-qpp",
        "https://www.retraitequebec.gouv.qc.ca/en/programs/quebec-pension-plan/work-contributions/pensionable-earnings-contributions"
      ],
      "assumptions": [
        "Province of employment for payroll. QPP is distinct from CPP. Age/election/disability cases excluded."
      ],
      "testCases": [
        "2024 max8696 self-employed",
        "2025 max4735.20 employee",
        "2026 max4895.30 employee"
      ],
      "values": {
        "ympe": 74600,
        "yampe": 85000,
        "cppBase": 0.0495,
        "qppBase": 0.053,
        "additional": 0.01,
        "second": 0.04,
        "exemption": 3500
      }
    },
    {
      "id": "tax-federal-2026",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Sum income in each bracket times its rate; subtract14% of applicable BPA, floor zero. BPA decreases linearly from16452 to14829 between181440 and258482.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Taxable and net income assumed identical before RRSP deduction. No other credits or benefit adjustments."
      ],
      "testCases": [
        "Alberta10000 deduction crosses federal58523 bracket",
        "below BPA zero tax",
        "high-income BPA restoration"
      ],
      "values": {
        "thresholds": [
          0,
          58523,
          117045,
          181440,
          258482
        ],
        "rates": [
          0.14,
          0.205,
          0.26,
          0.29,
          0.33
        ],
        "bpaMax": 16452,
        "bpaMin": 14829,
        "employment": 1501
      }
    },
    {
      "id": "tax-AB-2026",
      "jurisdiction": "AB",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          61200,
          154259,
          185111,
          246813,
          370220
        ],
        "rates": [
          0.08,
          0.1,
          0.12,
          0.13,
          0.14,
          0.15
        ],
        "bpa": 22769
      }
    },
    {
      "id": "tax-BC-2026",
      "jurisdiction": "BC",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          50363,
          100728,
          115648,
          140430,
          190405,
          265545
        ],
        "rates": [
          0.056,
          0.077,
          0.105,
          0.1229,
          0.147,
          0.168,
          0.205
        ],
        "bpa": 13216
      }
    },
    {
      "id": "tax-MB-2026",
      "jurisdiction": "MB",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4032-payroll-deductions-tables/t4032mb-jan/t4032mb-january-general-information.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases",
        "48000 deduction2000=>235.50 provincial reduction"
      ],
      "values": {
        "thresholds": [
          0,
          47000,
          100000
        ],
        "rates": [
          0.108,
          0.1275,
          0.174
        ],
        "bpa": 15780
      }
    },
    {
      "id": "tax-NB-2026",
      "jurisdiction": "NB",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          52333,
          104666,
          193861
        ],
        "rates": [
          0.094,
          0.14,
          0.16,
          0.195
        ],
        "bpa": 13664
      }
    },
    {
      "id": "tax-NL-2026",
      "jurisdiction": "NL",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          44678,
          89354,
          159528,
          223340,
          285319,
          570638,
          1141275
        ],
        "rates": [
          0.087,
          0.145,
          0.158,
          0.178,
          0.198,
          0.208,
          0.213,
          0.218
        ],
        "bpa": 13094
      }
    },
    {
      "id": "tax-NS-2026",
      "jurisdiction": "NS",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          30995,
          61991,
          97417,
          157124
        ],
        "rates": [
          0.0879,
          0.1495,
          0.1667,
          0.175,
          0.21
        ],
        "bpa": 11932
      }
    },
    {
      "id": "tax-NT-2026",
      "jurisdiction": "NT",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          53003,
          106009,
          172346
        ],
        "rates": [
          0.059,
          0.086,
          0.122,
          0.1405
        ],
        "bpa": 18198
      }
    },
    {
      "id": "tax-NU-2026",
      "jurisdiction": "NU",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          55801,
          111602,
          181439
        ],
        "rates": [
          0.04,
          0.07,
          0.09,
          0.115
        ],
        "bpa": 19659
      }
    },
    {
      "id": "tax-ON-2026",
      "jurisdiction": "ON",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          53891,
          107785,
          150000,
          220000
        ],
        "rates": [
          0.0505,
          0.0915,
          0.1116,
          0.1216,
          0.1316
        ],
        "bpa": 12989
      }
    },
    {
      "id": "tax-PE-2026",
      "jurisdiction": "PE",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          33928,
          65820,
          106890,
          142520,
          200000
        ],
        "rates": [
          0.095,
          0.1347,
          0.166,
          0.1762,
          0.19,
          0.2
        ],
        "bpa": 15000
      }
    },
    {
      "id": "tax-QC-2026",
      "jurisdiction": "QC",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/income-tax-rates/",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          54345,
          108680,
          132245
        ],
        "rates": [
          0.14,
          0.19,
          0.24,
          0.2575
        ],
        "bpa": 18952
      }
    },
    {
      "id": "tax-SK-2026",
      "jurisdiction": "SK",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          54532,
          155805
        ],
        "rates": [
          0.105,
          0.125,
          0.145
        ],
        "bpa": 20381
      }
    },
    {
      "id": "tax-YT-2026",
      "jurisdiction": "YT",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Apply each bracket to only its income slice; subtract lowest-rate times BPA, floor zero; then province-specific adjustments below.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html"
      ],
      "assumptions": [
        "Existing site table reused and checked against current official annual sources. Uses annual rates, not prorated July catch-up withholding rates. Other credits, household effects and low-income reductions outside ON/BC omitted explicitly."
      ],
      "testCases": [
        "all province finite/monotone reduction cases"
      ],
      "values": {
        "thresholds": [
          0,
          58523,
          117045,
          181440,
          500000
        ],
        "rates": [
          0.064,
          0.09,
          0.109,
          0.128,
          0.15
        ],
        "bpa": 16452
      }
    },
    {
      "id": "tax-ontario-adjustments",
      "jurisdiction": "ON",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Surtax=.20*max(0,basicTax-5818)+.36*max(0,basicTax-7446). Basic reduction=max(0,600-taxBeforeReduction) capped at that tax. Add health premium using published income bands. Above200000, premium=min(900,750+.25*(income-200000)); it reaches900 at200600.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html",
        "https://www.canada.ca/content/dam/cra-arc/migration/cra-arc/tx/bsnss/tpcs/pyrll/t4032/2026/t4032-on-1-26e.pdf"
      ],
      "assumptions": [
        "No dependant tax-reduction supplements."
      ],
      "testCases": [
        "80000 to72000 includes150 health-premium reduction",
        "Health premium200000=>750;200300=>825;200600=>900;higher incomes capped900",
        "Deduction from200600 to200000 reduces health premium150; shared paycheque function tested across same taxable-income band"
      ],
      "values": {
        "surtaxThresholds": [
          5818,
          7446
        ],
        "surtaxRates": [
          0.2,
          0.36
        ],
        "basicReduction": 300,
        "healthPremiumMaximum": 900,
        "healthPremiumFinalRampStart": 200000,
        "healthPremiumFinalRampEnd": 200600
      }
    },
    {
      "id": "tax-bc-adjustment",
      "jurisdiction": "BC",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Credit=max(0,690-.0356*max(0,netIncome-25570)); reduce provincial tax, floor zero. Annual first bracket is5.6%, not July payroll catch-up6.14%.",
      "sources": [
        "https://www2.gov.bc.ca/gov/content?id=05AC3C069516494DBF1B196BC31BA627&title=General+Tax+Credits",
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html"
      ],
      "assumptions": [
        "Net income assumed equal to taxable income."
      ],
      "testCases": [
        "below threshold",
        "partial reduction",
        "above reduction range"
      ],
      "values": {
        "credit": 690,
        "netIncomeThreshold": 25570,
        "reductionRate": 0.0356
      }
    },
    {
      "id": "tax-mb-bpa",
      "jurisdiction": "MB",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "BPA=15780*clamp((400000-netIncome)/200000,0,1).",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4032-payroll-deductions-tables/t4032mb-jan/t4032mb-january-general-information.html"
      ],
      "assumptions": [
        "Net income assumed equal to taxable income."
      ],
      "testCases": [
        "250000 income deduction10000 restores789 of BPA"
      ],
      "values": {
        "maximumBpa": 15780,
        "phaseOutStart": 200000,
        "phaseOutEnd": 400000
      }
    },
    {
      "id": "tax-qc-and-yt",
      "jurisdiction": "QC/YT",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Quebec federal tax is reduced by16.5% abatement. Yukon uses federal income-tested BPA in its own bracket calculation.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4127-payroll-deductions-formulas/t4127-jan/t4127-jan-payroll-deductions-formulas-computer-programs.html",
        "https://www.revenuquebec.ca/en/citizens/income-tax-return/completing-your-income-tax-return/income-tax-rates/"
      ],
      "assumptions": [
        "Quebec provincial premiums, tax shield and provincial-specific income adjustments are outside model."
      ],
      "testCases": [
        "Quebec205 federal bracket reduction becomes171.175 before cent rounding"
      ]
    },
    {
      "id": "rrsp-deduction-effect",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Limited model reduction=T(income)-T(income-deduction), across every affected bracket. Compare new contribution separately against available contribution room and remaining deduction limit.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/t4040/rrsps-other-registered-plans-retirement.html",
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html"
      ],
      "assumptions": [
        "Deduction capped at new contribution, remaining deduction limit and taxable income. Previous undeducted contributions not part of this new-deposit comparison. Future benefit of unclaimed amount excluded."
      ],
      "testCases": [
        "AB65000 less10000 =>2697.01 model reduction",
        "contribution room overflow",
        "deduction limit differs"
      ]
    },
    {
      "id": "tfsa-room",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "published-current-rules",
      "retrievedAt": "2026-10-22",
      "formula": "Current remaining room=January1 room-new contributions. Next January1 baseline=current remaining room+ordinary withdrawals. Add future annual limit only if explicitly entered as projection.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/tax-free-savings-account/contributing/calculate-room.html"
      ],
      "assumptions": [
        "User reconciles room across all issuers.2026 annual limit must already be included in openingRoom where eligible. Account value, gains and losses are not room."
      ],
      "testCases": [
        "7000 room fully used and5000 withdrawal=>0 current,5000 next-year before new limit",
        "no invented2027 limit"
      ],
      "values": {
        "annualDollarLimit2026": 7000
      }
    },
    {
      "id": "tfsa-rrsp-equivalence",
      "jurisdiction": "CA",
      "effectiveYear": 2026,
      "status": "projection-model",
      "retrievedAt": "2026-10-22",
      "formula": "Both accounts start with same deposit and annual factor=(1+return)*(1-fee). RRSP is reduced by entered effective withdrawal-tax assumption. If chosen, modelled deduction reduction enters separate TFSA after user-selected delay and compounds under same assumptions.",
      "sources": [
        "https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/tax-free-savings-account/contributing/calculate-room.html",
        "https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/t4040/rrsps-other-registered-plans-retirement.html"
      ],
      "assumptions": [
        "Assumptions are hypothetical, not projections of enacted future tax rates. No guaranteed return. Reinvested reduction consumes room in separate alternative, not the TFSA-only alternative. Spent reduction remains consumption and is not included in invested balances."
      ],
      "testCases": [
        "2year10% example: TFSA9680; RRSPnet7260 +refundTFSA2774.20",
        "refund spending",
        "negative100%return",
        "zero horizon"
      ]
    }
  ],
  "sourceConflicts": [
    {
      "topic": "Manitoba2026 brackets",
      "generalPage": "https://www.canada.ca/en/revenue-agency/services/tax/individuals/tax-rates-brackets/current-year.html",
      "generalPageValues": [
        47564,
        101200
      ],
      "selectedSource": "https://www.canada.ca/en/revenue-agency/services/forms-publications/payroll/t4032-payroll-deductions-tables/t4032mb-jan/t4032mb-january-general-information.html",
      "selectedValues": [
        47000,
        100000
      ],
      "reason": "Specific CRA2026 Manitoba payroll chapter and T4127 explicitly describe the freeze for2025 and subsequent years, matching Manitoba Finance. Specific current legislative-update guidance used instead of inconsistent general bracket table."
    },
    {
      "topic": "British Columbia annual versus July payroll rate",
      "annualValues": {
        "firstRate": 0.056,
        "taxReduction": 690
      },
      "julyCatchUpValues": {
        "firstRate": 0.0614,
        "taxReduction": 805
      },
      "selectedSource": "https://www2.gov.bc.ca/gov/content?id=05AC3C069516494DBF1B196BC31BA627&title=General+Tax+Credits",
      "reason": "Use annual tax rules for an annual deduction comparison, not catch-up withholding constants."
    }
  ],
  "statusPolicy": {
    "historical": "2024/2025 pension values are published historical values.",
    "current": "2026 official published current rules; source-specific administrative caveats retained. No claim of personal eligibility or professional sign-off.",
    "projection": "Any year after2026, investment growth, fee, refund timing or withdrawal-tax assumption is a scenario; no unverified future annual TFSA/CPP/tax limits are supplied."
  },
  "limitations": {
    "fhsa": [
      "One holder, all FHSAs combined; opening eligibility and qualifying-withdrawal conditions must be checked separately.",
      "Enter every year from the first opening, including zero-activity years. No contribution room exists before opening.",
      "Normal contributions and RRSP transfers occur at the start of each year; growth and percentage fees follow; withdrawals and direct transfers out occur at year end. Contributions explicitly marked after a qualifying withdrawal occur last and earn no growth that year.",
      "A taxable withdrawal is a gross amount before withholding. It creates re-participation room for a later year in this model; it does not increase the $40,000 lifetime deduction ceiling. Same-year withdrawal and recontribution ordering is not modelled.",
      "Excess amounts, designated corrections, death/successor accounts, divorce transfers, non-residency and retroactive adjustments are excluded. The model rejects deposits above its calculated room; it does not calculate the monthly excess tax.",
      "Deduction carryforward differs from contribution-room carryforward. The annual FHSA deduction-limit formula is tracked separately, including RRSP transfers and re-participation contributions. No deduction is claimed for contributions after the first qualifying withdrawal.",
      "Unused eligible deductions may survive closure. An FHSA deduction reduces taxable income; it is not a dollar-for-dollar refund. This schedule does not calculate tax savings or assess your tax return.",
      "Future years hold the rules reviewed on 2026-10-22 constant. Growth, fees and future balances are assumptions, not enacted future limits or guaranteed returns."
    ],
    "tax": [
      "2026 federal and provincial/territorial brackets; taxable income is before the proposed RRSP deduction. This is a limited income-tax model, not a tax-return or guaranteed-refund calculation.",
      "Assumes the same taxable income and net income for federal and provincial purposes before this deduction. Includes basic personal amounts and their federal/Yukon/Manitoba income phase-outs, Quebec federal abatement, Ontario surtax/health premium/basic tax reduction, and British Columbia basic tax reduction.",
      "Other credits, low-income reductions outside Ontario/British Columbia, benefits and household interactions are excluded. CPP/EI/employment credits, tuition, dependants, age/pension credits, CCB, GST/HST credits, GIS, OAS recovery tax, alternative minimum tax, dividend/capital-gain treatment, Quebec premiums and differing provincial deductions can change the actual reduction.",
      "The deduction is evaluated by calculating tax before and after it across each bracket. One marginal percentage is not applied to the entire contribution. Final displayed effects are rounded half-up to cents; this is not the line-by-line rounding of an actual tax return."
    ],
    "comparison": "One new deposit only; no household optimization, previous deductions, RRIF constraints or account recommendations."
  },
  "testRun": {
    "command": "node tests/account-planning.test.mjs",
    "passed": 26,
    "executedAt": "2026-10-22",
    "environment": "Node24.19.0, pure local tests without network or customer records"
  },
  "review": "Independent expected-value arithmetic and official maxima included; no external professional credential or endorsement asserted."
}
