Skip to content

Wire NY itemized-deduction phase-out into IT-196 Line 40 (pre-TCJA Pease limitation)#8917

Merged
MaxGhenis merged 1 commit into
PolicyEngine:mainfrom
MaxGhenis:codex/ny-itemized-phaseout-orphan
Jul 6, 2026
Merged

Wire NY itemized-deduction phase-out into IT-196 Line 40 (pre-TCJA Pease limitation)#8917
MaxGhenis merged 1 commit into
PolicyEngine:mainfrom
MaxGhenis:codex/ny-itemized-phaseout-orphan

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Fixes #8909

Problem

gov.states.ny.tax.income.deductions.itemized.phase_out.start was 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

  • 3% of federal AGI over the applicable amount (worksheet lines 5-8, IRC § 68(a)(1)), or
  • 80% of the deductions subject to the limitation (worksheet lines 1-4, IRC § 68(a)(2)),

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:

  • Worksheet line 1 (L1) = form lines 4, 9, 15, 19, 20, 28, 39 = total itemized deductions before the limitation = ny_itemized_deductions_max minus ny_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).
  • Worksheet line 2 (L2) = form lines 4, 14, 16a, 20, 29, 30, 37 = the § 68(c) exclusion set = medical_expense_deduction + investment_interest_expense + ny_casualty_loss_deduction.
  • L3 = L1 − L2 = mortgage interest + real estate taxes + charitable gifts + 2%-floor misc — exactly the § 68(c) base. Investment interest appears in both L1 (inside 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 not ny_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:

  • Form line 39 "other itemized deductions" (gambling losses, estate tax on income in respect of a decedent, amortizable bond premium, federal disaster loss, etc.) — absent from ny_itemized_deductions_max regardless, so no new gap is introduced.
  • Form line 16a "qualified contributions" subset (PolicyEngine does not split charitable into qualified/non-qualified).

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 on phase_out.start.

Modified variable:

  • ny_itemized_deductions — inserted ny_itemized_deductions_phase_out into subtracts before ny_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

  • New phase-out tests: 9 passed.
  • Full NY state tree (gov/states/ny): 326 passed, 0 failed — no regressions. Existing high-income NY itemizer fixtures (e.g. the IT-196 MFJ TAXSIM case in ny_income_tax.yaml) are unaffected because their federal AGI is below the Line 40 applicable amount.
  • Cross-state itemized (state_itemized_deductions.yaml): 16 passed.
  • test_ny_itemized_phase_out_start pinned parameter test: unchanged, still passing (parameter values are untouched — only a consumer was added).
  • Structural/integrity (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 format and ruff check pass on all touched files.

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>
@MaxGhenis MaxGhenis force-pushed the codex/ny-itemized-phaseout-orphan branch from 7ee2e9f to 29d0a8f Compare July 6, 2026 10:20
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f9e58e7) to head (29d0a8f).
⚠️ Report is 127 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaxGhenis MaxGhenis merged commit 40c4a5b into PolicyEngine:main Jul 6, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NY itemized deduction phase-out start parameter is orphaned (no formula consumes it)

1 participant