Implement CRA line 22215 deduction for CPP/QPP enhanced contributions - #281
Merged
Merged
Conversation
The enhanced portion of CPP/QPP contributions (rate above the pre-2019 base of 4.95% / 5.40%) plus the entire CPP2/QPP2 contribution is deductible from taxable income, reducing both federal and provincial income tax. - Add baseRate to CPP/QPP configs for all years (2023-2026) - Add calculateEnhancedContributionPortion helper shared by the calculator and the tax-visualizer page - Apply the deduction to taxable income before bracket calculations (and before the Ontario surtax, which is based on bracket tax) - Show a Total Taxable Income section with a collapsible deduction breakdown in both the federal and provincial cards
5 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the CRA line 22215 deduction for enhanced CPP/QPP contributions. The enhanced portion of first-tier contributions (the rate above the pre-2019 base of 4.95% CPP / 5.40% QPP) plus 100% of CPP2/QPP2 is deducted from income before applying federal and provincial tax brackets — and before the Ontario surtax, which is computed from bracket tax.
Supersedes #274, re-implemented off current main (post #279 surtax fix) and simplified.
Changes
baseRateto CPP/QPP configs for all years (2023–2026): 4.95% CPP, 5.40% QPPcalculateEnhancedContributionPortionincalculators/cappedCalculator.ts;calculateWithConfigcomputes taxable income asincome − deductionand applies it to both bracket calculations. The deduction total is exposed ascppQppEnhancedDeductiononDetailedTaxCalculationDifferences from #274
cpp-qpp-enhanced-deductionTaxLineItem is dropped: nothing consumes it, and it would double-count inTaxBreakdownAccordionif that component were ever revived (the deduction is already baked intofederalIncomeTax). The scalar on the calculation result remainsincome − deductionTesting
calculator.deduction.test.tsvalidates the deduction amounts against hand-computed 2024 values ($838 at $80k for both CPP and QPP), low-income proportional scaling, and bracket wiring