Wire NY itemized-deduction phase-out into IT-196 Line 40 (pre-TCJA Pease limitation)#8917
Merged
MaxGhenis merged 1 commit intoJul 6, 2026
Conversation
The parameter gov.states.ny.tax.income.deductions.itemized.phase_out.start was orphaned: no formula consumed it. It holds the pre-TCJA federal "applicable amount" (26 U.S.C. 68(b)) that NY Tax Law 615 conforms to and continues to inflation-adjust, and it gates IT-196 Line 40's "Total itemized deductions worksheet" - the classic Pease overall limitation on itemized deductions. This adds that missing computation: - New parameters phase_out.agi_excess_rate (3%) and phase_out.deduction_limited_rate (80%), the two IRC 68(a) limbs. - New variable ny_itemized_deductions_phase_out implementing the Line 40 worksheet: reduce by the lesser of 3% of federal AGI over the applicable amount, or 80% of the deductions subject to the limitation (26 U.S.C. 68(c) excludes medical, investment interest, and casualty/theft). - New gate variable ny_itemized_deductions_phase_out_applies keyed on federal AGI (adjusted_gross_income) exceeding phase_out.start, mirroring the worksheet's line-7 "if not over, stop" check. - Wired into ny_itemized_deductions as a subtraction applied before the existing Line 46 reduction (ny_itemized_deductions_reduction), matching the form's Line 40 -> Line 46 sequence. Line 46 is NY's own 615(f)/(g) higher-income adjustment keyed on NY AGI - a distinct, already-implemented mechanism, not a duplicate of Line 40. Line-to-variable mapping uses ny_itemized_deductions_max minus the NY-only college tuition deduction for worksheet line 1, and medical + investment interest + casualty for worksheet line 2. Form line 39 "other itemized deductions" (gambling, estate tax on IRD, bond premium, disaster loss) and line 16a qualified contributions are not modeled in PolicyEngine and are treated as zero; these are documented as the only simplifying assumptions. Adds 9 household-level tests (boundary at the 2025 SINGLE/JOINT applicable amounts, both the 3% and 80% limbs binding, the 68(c) exclusions, the college tuition exclusion, and end-to-end wiring). The pinned test_ny_itemized_phase_out_start parameter test is unchanged and still passes. Fixes PolicyEngine#8909 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7ee2e9f to
29d0a8f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8917 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 55 52 -3
=========================================
- Hits 55 52 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #8909
Problem
gov.states.ny.tax.income.deductions.itemized.phase_out.startwas an orphaned parameter: it held values (2021-2025) but no formula consumed it. It stores the pre-TCJA federal "applicable amount" from 26 U.S.C. § 68(b) — the income threshold above which New York limits itemized deductions on Form IT-196 Line 40 — which NY Tax Law § 615 conforms to and continues to inflation-adjust. Without a consumer, high-income NY itemizers were not having their itemized deductions limited as the statute requires.Statutory basis
NY Tax Law § 615 requires itemized deductions to be computed using federal rules as they existed immediately before TCJA (Public Law 115-97). Those pre-TCJA rules include the IRC § 68 "Pease" overall limitation on itemized deductions, which TCJA zeroed out for 2018-2025 federally but which NY still applies via its own conformity.
Form IT-196's Line 40 "Total itemized deductions worksheet" implements this limitation: reduce itemized deductions by the lesser of
where the deductions not subject to the limitation (IRC § 68(c)) are medical, investment interest, and casualty/theft losses.
This is distinct from Line 46, which is New York's own § 615(f)/(g) higher-income itemized-deduction adjustment — that one is keyed on NY AGI (thresholds $100k/$475k/$525k/$1M/$10M) and is already implemented in
ny_itemized_deductions_reduction.py. Line 40 (federal-AGI-gated) and Line 46 (NY-AGI-gated) are sequential steps in the same worksheet chain (Line 40 → Lines 41-45 → Line 46 → Line 47), not alternatives. A high-income filer completes both. Confirmed by reading the IT-196 form and instructions directly (Line 40 worksheet, Table 1) and NY Tax Law § 615.Approach — clean line-level mapping (not an approximation)
The Line 40 worksheet's line-total inputs map cleanly onto existing PolicyEngine variables:
ny_itemized_deductions_maxminusny_college_tuition_deduction(the NY-only college tuition deduction is form line 48/43, added after Line 40, so it is excluded from the Pease base).medical_expense_deduction+investment_interest_expense+ny_casualty_loss_deduction.interest_deduction) and L2, so it cancels out of L3, as intended.The mapping is gated on federal AGI (
adjusted_gross_income= IT-201 line 19, "Federal amount column"), matching the worksheet's line-7 "if not over, stop" check — correctly notny_agi.Simplifying assumptions (honest disclosure)
The mapping is exact for every deduction PolicyEngine models. Two IT-196 line items are not modeled anywhere in PolicyEngine and are therefore treated as zero:
ny_itemized_deductions_maxregardless, so no new gap is introduced.These affect L1/L2 only for filers who have those specific (rare, currently-unmodeled) deductions; for all modeled cases the computation is exact.
Changes
New parameters (both cite pre-TCJA IRC § 68(a) and the 2025 IT-196 Line 40 worksheet):
.../itemized/phase_out/agi_excess_rate.yaml= 0.03 (3% of AGI-over-threshold limb).../itemized/phase_out/deduction_limited_rate.yaml= 0.80 (80%-of-limited-deductions cap)New variables:
ny_itemized_deductions_phase_out— the Line 40 lesser-of reduction.ny_itemized_deductions_phase_out_applies— federal-AGI gate onphase_out.start.Modified variable:
ny_itemized_deductions— insertedny_itemized_deductions_phase_outintosubtractsbeforeny_itemized_deductions_reduction, matching the form's Line 40 → Line 46 sequence.New tests (9 household-level cases):
ny_itemized_deductions_phase_out.yaml(7): SINGLE/JOINT boundaries at the 2025 applicable amounts ($340,700 / $408,850); both the 3% and 80% limbs binding; the § 68(c) exclusions (medical/investment interest/casualty); the college-tuition exclusion from L1.ny_itemized_deductions_phase_out_integration.yaml(2): end-to-end from raw household inputs, confirming Line 40 stacks with Line 46.Test results
gov/states/ny): 326 passed, 0 failed — no regressions. Existing high-income NY itemizer fixtures (e.g. the IT-196 MFJ TAXSIM case inny_income_tax.yaml) are unaffected because their federal AGI is below the Line 40 applicable amount.state_itemized_deductions.yaml): 16 passed.test_ny_itemized_phase_out_startpinned parameter test: unchanged, still passing (parameter values are untouched — only a consumer was added).test_parameter_files,test_system_import,test_build_metadata,test_ctc_itemizing_branch_cycle): 16 passed, 1 skipped — the CTC itemizing-branch cycle test confirms no circular dependency was introduced.ruff formatandruff checkpass on all touched files.