Skip to content

Model NY IT-214 2025+ flat credit-amount tables; fix elderly-dependent tier and gate rate - #9313

Merged
hua7450 merged 3 commits into
PolicyEngine:mainfrom
DTrim99:fix/ny-it214-amount-tables
Aug 24, 2026
Merged

Model NY IT-214 2025+ flat credit-amount tables; fix elderly-dependent tier and gate rate#9313
hua7450 merged 3 commits into
PolicyEngine:mainfrom
DTrim99:fix/ny-it214-amount-tables

Conversation

@DTrim99

@DTrim99 DTrim99 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Models the New York IT-214 real property tax credit's 2025+ flat credit-amount tables and fixes two related defects. Closes #9310.

⚠️ Stacked on #9301 (fix/ny-it214-eligibility). This builds on #9301's 2025 federal-AGI income measure and touches the same file, so the diff shows #9301's commit too until that merges. Merge #9301 first, then this rebases to a clean diff.

Changes

1. 2025+ flat amount tables (Part RR of Ch. 59 of the Laws of 2025)

For tax years beginning on/after 2025-01-01 the credit amount is a flat lookup by federal-AGI bracket, with "property tax > FAGI × rate" as a pure gate — replacing the pre-2025 "50% of excess, capped by the 18-row chart" formula. New parameters (dated 2025-01-01):

  • amount/elderly.yamlTable A (65+): $375 / 330 / 300 / 260 / 230 / 200 / 150 by FAGI bracket.
  • amount/non_elderly.yamlTable B (<65): $75 / 70 / 60 / 50 (wider, distinct brackets).
  • uses_flat_amount_table.yaml — bool flag flipping true at 2025-01-01 (mirrors Fix NY IT-214 real property tax credit eligibility #9301's uses_household_gross_income).

The formula branches on the flag: 2025+ returns the gated flat amount; ≤2024 is unchanged. Source: 2025 IT-214 Tables A/B.

2. Elderly tier now includes a 65+ dependent

meets_age_condition dropped the ~is_dependent term. Both the 2024 and 2025 forms grant the elderly amount if "you, your spouse, or a dependent you claimed" was 65+ (Line 7). Previously a unit whose only 65+ member was a claimed dependent wrongly got the non-elderly amount. Sources: 2024 IT-214-I, 2025 IT-214.

3. Gate rate fix — excess_real_property_tax single rate (pre-existing bug, folded in)

While implementing the 2025 gate I found excess_real_property_tax was missing type: single_amount, so its .calc() summed the bracket rates (0.12 at $6k, 0.35 at $16k) instead of returning the single Table-1 rate the form specifies (0.045, 0.065). This understated the credit via an inflated income threshold — and it affected 2024 as well as 2025. Added type: single_amount so the gate uses the correct rate. The existing 2024 cases were maximum-cap-bound so their outputs are unchanged, but this corrects the underlying gate for marginal cases in both years.

FAGI before (summed) after (Table 1)
$6,000 0.12 0.045
$10,000 0.225 0.055
$16,000 0.35 0.065

Tests

NY RPTC suite 19/19 (.venv-py312). Coverage added: Table A/B brackets across the ladder, the $X,001 boundary transitions, a gate-fails → $0 case, the dependent-65+ case for 2025 and 2024 (locks item 2), a FAGI-over-$18k → $0 case, and a single-rate-gate regression case (FAGI $16k, property tax $2k → $150 under the fix, $0 under the old summed gate).

🤖 Generated with Claude Code

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9cff969) to head (a68c725).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #9313    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            8         1     -7     
  Lines          147        37   -110     
  Branches         0         2     +2     
==========================================
- Hits           147        37   -110     
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.

…+ gate (ref PolicyEngine#9310)

Follow-up to PolicyEngine#9301. Three corrections to ny_real_property_tax_credit:
- 2025+ amount: Part RR of Ch. 59 of the Laws of 2025 replaced the 50%-of-excess
  formula (capped by the 18-row chart) with a flat lookup by federal-AGI bracket,
  gated by 'property tax > FAGI x rate'. Add Table A (65+) and Table B (<65) amount
  parameters + a uses_flat_amount_table flag (2025-01-01); the formula branches to the
  flat table for 2025+ and keeps the pre-2025 formula unchanged.
- Elderly tier: drop the ~is_dependent term so a claimed dependent aged 65+ qualifies
  the unit for the elderly amount (2024 and 2025 IT-214 Line 7).
- Gate rate: excess_real_property_tax was missing type: single_amount, so its .calc
  summed the bracket rates (0.12 at $6k) instead of the single Table-1 rate (0.045).
  Add type: single_amount so the income gate uses the correct rate (affects 2024 too).

NY RPTC suite 19/19, incl. a regression case nonzero only under the single-rate gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DTrim99
DTrim99 force-pushed the fix/ny-it214-amount-tables branch from 982ecc3 to d8007aa Compare August 21, 2026 16:05
@DTrim99
DTrim99 marked this pull request as ready for review August 21, 2026 20:33
hua7450 and others added 2 commits August 24, 2026 14:29
Income exactly at a band top (e.g. FAGI 3,000) was shifted into the next
band by Table 1, Tables A/B, and the pre-2025 credit-limit chart, flipping
the line 19 gate and mis-sizing the cap. Look up all five scales with
right=True over band-top thresholds (first threshold -.inf so income 0
stays in the first band), round income to whole dollars half up per
IT-214-I before the lookups and the 18,000 limit, and fix a 1_0000 typo
threshold. Adds boundary and rounding regression tests; corrects the 2022
expectation at HGI 5,000 to the 4,001-5,000 chart row cap (67).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hua7450

hua7450 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Reviewed against the primary sources and pushed a follow-up commit (24272a7, plus a merge of main).

Verified as correct

  • Table A/B values and bands match the 2025 IT-214 exactly (page 3), the line 19 gate is the strict inequality the form specifies, and $18,000 FAGI exactly still qualifies ("more than $18,000, stop").
  • Dropping ~is_dependent for all years is right: the 2025 form's line 7 says "you, your spouse (if married), or a dependent," and the 2024 form keys on "the qualifying household member 65 or older."
  • All test arithmetic re-derives by hand, including the 2024 dependent case (imputed SSI 11,316 → HGI 13,316 → cap 154).

Fixed in the follow-up commit

Band-boundary off-by-one. Every IT-214 income table uses closed integer bands ($0 to 3,000, then 3,001 to 5,000 — Table 1, Tables A/B, and the pre-2025 credit-limit chart, see 2024 IT-214-I pages 2–3), but single_amount scales put a value exactly at a threshold into the next bracket. So FAGI exactly 3,000 got rate 0.040 instead of 0.035 — with $110 of property tax the gate wrongly failed and the credit was $0 instead of $375; at HGI exactly 1,000 the 2024 cap was 73 instead of 75. Fixed by looking up all five scales with calc(..., right=True) over band-top thresholds, with a -.inf first threshold so income of exactly $0 stays in the first band rather than falling below the scale (same pattern as the NYC household credit). Tables A/B are re-keyed from 3_001-style to band tops to match, and a latent 1_0000 (10,000) typo threshold in the non-elderly chart is corrected.

Whole-dollar rounding. IT-214-I page 1: "enter whole dollar amounts only… drop amounts below 50 cents and increase amounts from 50 to 99 cents to the next dollar." Income is now rounded half up (floor(income + 0.5)) before the rate/amount lookups and the $18,000 limit, so e.g. FAGI $3,000.49 correctly stays in the 0–3,000 band and $18,000.30 remains eligible.

Test corrections. Nine regression tests added (five boundary, four rounding). One pre-existing 2022 expectation encoded the boundary bug: at HGI exactly $5,000 the 2022 chart row "4,001 to 5,000" gives a non-elderly cap of 67, not 65; updated accordingly.

Changelog. Rewritten to list the changes; the clause about applying the single Table-1 rate in the gate was removed since that fix already landed on main via 4d669d1 (#9301).

All 29 tests in the credit's test file pass locally after merging main.

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the 2025 IT-214 form and the 2022/2024 IT-214-I instructions; Table A/B values, the line 19 gate, and the elderly-household-member tier all match the sources. Band-boundary and whole-dollar-rounding corrections pushed directly to the branch with regression tests (see review comment above). All 33 checks green after merging main.

@hua7450
hua7450 merged commit 5490d04 into PolicyEngine:main Aug 24, 2026
33 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 IT-214: model the 2025+ flat credit-amount tables and fix the elderly tier to include dependents

2 participants