From a0c4e4e32672f074bd6e5862dd7b79364c750c94 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 16 Nov 2026 15:29:20 -0500 Subject: [PATCH 1/8] Correct historical NJ property tax cap (#11043) --- .../history-nj-property-tax-limit.fixed.md | 1 + .../income/deductions/property_tax/limit.yaml | 11 ++ .../nj_potential_property_tax_deduction.yaml | 116 ++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 changelog.d/history-nj-property-tax-limit.fixed.md create mode 100644 policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml diff --git a/changelog.d/history-nj-property-tax-limit.fixed.md b/changelog.d/history-nj-property-tax-limit.fixed.md new file mode 100644 index 00000000000..b0a20c76b71 --- /dev/null +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -0,0 +1 @@ +Correct New Jersey's property tax deduction cap for 2015–2017. diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/deductions/property_tax/limit.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/deductions/property_tax/limit.yaml index 2392a8f4a4f..8e1aae4b398 100644 --- a/policyengine_us/parameters/gov/states/nj/tax/income/deductions/property_tax/limit.yaml +++ b/policyengine_us/parameters/gov/states/nj/tax/income/deductions/property_tax/limit.yaml @@ -14,6 +14,17 @@ metadata: href: https://www.state.nj.us/treasury/taxation/pdf/current/1040i.pdf#page=32 - title: 2025 NJ-1040 Instructions (Worksheet H, Line 2) href: https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf#page=32 + - title: "P.L. 2009, c.69, sections 2 and 5 #page 2-4" + href: https://pub.njleg.gov/bills/2008/PL09/69_.PDF#page=2 + - title: "2016 Division of Taxation annual report, property tax deduction #page 34,47" + href: https://www.nj.gov/treasury/taxation/pdf/annual/2016.pdf#page=34 + - title: 2017 NJ-1040 instructions, Worksheet G, line 2 + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2017/1040i.pdf#page=36 + - title: P.L. 2018, c.45, sections 1-3 and 12 + href: https://pub.njleg.gov/bills/2018/AL18/45_.HTM values: + # Earliest model year; the deduction predates 2015. + 2015-01-01: 10_000 + 2018-01-01: 15_000 2021-01-01: 15_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml new file mode 100644 index 00000000000..5c3de21b8a8 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml @@ -0,0 +1,116 @@ +# Conditional general-cap controls, USD per TaxUnit and tax year. Stipulate +# an otherwise-qualified full-year New Jersey resident who solely owns and +# occupies one homestead and pays all stated property taxes for that calendar +# year. Each return uses SINGLE status, no rent, no co-ownership, no separate +# spouse, no Senior Freeze/PTR limitation and no reimbursement application. +# These cases do not test the deduction/credit election or a complete return. +# The 2015 node marks earliest model availability; the statute predates 2015. +# Primary cap sources: +# P.L.2009c69 section2: https://pub.njleg.gov/bills/2008/PL09/69_.PDF#page=2 +# 2016 Division report: https://www.nj.gov/treasury/taxation/pdf/annual/2016.pdf#page=34 +# 2017 WorksheetGline2: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2017/1040i.pdf#page=36 +# P.L.2018c45 sections1-3/12: https://pub.njleg.gov/bills/2018/AL18/45_.HTM +# The 1996/1997 phase-in and taxyear2009 special restriction stay outside these +# periods. Integer paid taxes avoid selecting a fractional-dollar convention. +# In component vectors, nj_agi=50,000 supplies an income premise; compute the +# existing eligibility gate from that premise and positive paid property taxes. + +- name: Case 1, 2015 paid property taxes below, at and above the general cap. + period: 2015 + absolute_error_margin: 0.01 + input: + people: &lower_cap_people + person1: {age: 40, is_tax_unit_head: true, is_tax_unit_spouse: false, is_tax_unit_dependent: false, real_estate_taxes: 9_999} + person2: {age: 40, is_tax_unit_head: true, is_tax_unit_spouse: false, is_tax_unit_dependent: false, real_estate_taxes: 10_000} + person3: {age: 40, is_tax_unit_head: true, is_tax_unit_spouse: false, is_tax_unit_dependent: false, real_estate_taxes: 10_001} + tax_units: &single_returns + tax_unit1: {members: [person1], filing_status: SINGLE, nj_agi: 50_000} + tax_unit2: {members: [person2], filing_status: SINGLE, nj_agi: 50_000} + tax_unit3: {members: [person3], filing_status: SINGLE, nj_agi: 50_000} + households: &homes + household1: {members: [person1], state_code: NJ} + household2: {members: [person2], state_code: NJ} + household3: {members: [person3], state_code: NJ} + output: + nj_potential_property_tax_deduction: [9_999, 10_000, 10_000] + +- name: Case 2, 2016 paid property taxes below, at and above the general cap. + period: 2016 + absolute_error_margin: 0.01 + input: + people: *lower_cap_people + tax_units: *single_returns + households: *homes + output: + nj_potential_property_tax_deduction: [9_999, 10_000, 10_000] + +- name: Case 3, 2017 paid property taxes below, at and above the general cap. + period: 2017 + absolute_error_margin: 0.01 + input: + people: *lower_cap_people + tax_units: *single_returns + households: *homes + output: + nj_potential_property_tax_deduction: [9_999, 10_000, 10_000] + +- name: Case 4, 2018 paid property taxes below, at and above the general cap. + period: 2018 + absolute_error_margin: 0.01 + input: + people: &higher_cap_people + person1: {age: 40, is_tax_unit_head: true, is_tax_unit_spouse: false, is_tax_unit_dependent: false, real_estate_taxes: 14_999} + person2: {age: 40, is_tax_unit_head: true, is_tax_unit_spouse: false, is_tax_unit_dependent: false, real_estate_taxes: 15_000} + person3: {age: 40, is_tax_unit_head: true, is_tax_unit_spouse: false, is_tax_unit_dependent: false, real_estate_taxes: 15_001} + tax_units: *single_returns + households: *homes + output: + nj_potential_property_tax_deduction: [14_999, 15_000, 15_000] + +- name: Case 5, 2019 paid property taxes below, at and above the general cap. + period: 2019 + absolute_error_margin: 0.01 + input: + people: *higher_cap_people + tax_units: *single_returns + households: *homes + output: + nj_potential_property_tax_deduction: [14_999, 15_000, 15_000] + +- name: Case 6, 2020 paid property taxes below, at and above the general cap. + period: 2020 + absolute_error_margin: 0.01 + input: + people: *higher_cap_people + tax_units: *single_returns + households: *homes + output: + nj_potential_property_tax_deduction: [14_999, 15_000, 15_000] + +# Raw financial facts: wage-only income of $50,000, no NJ additions, +# subtractions, retirement exclusions or other income, and $20,000 qualifying +# property taxes. The 2017 WorksheetG cap gives min(20,000,10,000)=10,000. +# Compute NJ AGI and the existing eligibility gate; do not supply their outputs. +- name: Case 7, 2017 single homeowner computes the potential deduction from wages and paid taxes. + period: 2017 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + is_tax_unit_head: true + is_tax_unit_spouse: false + is_tax_unit_dependent: false + employment_income_before_lsr: 50_000 + real_estate_taxes: 20_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + households: + household: + members: [person1] + state_code: NJ + output: + nj_potential_property_tax_deduction: 10_000 + nj_agi: 50_000 From 315d95e53f691d96c8bd80055c5ee7485da98632 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 22:11:18 +0000 Subject: [PATCH 2/8] Fix New Jersey's historical dependent care credit and property tax basis Co-Authored-By: GPT-6.2 Sol --- .../history-nj-property-tax-limit.fixed.md | 2 +- .../nj/tax/income/credits/cdcc/rate.yaml | 32 ++++++++++++-- .../nj/tax/income/credits/cdcc/nj_cdcc.yaml | 32 ++++++++++++++ .../nj_potential_property_tax_deduction.yaml | 43 ++++++++++++++++--- .../nj_potential_property_tax_deduction.yaml | 12 ++++++ .../nj_potential_property_tax_deduction.py | 7 +-- 6 files changed, 114 insertions(+), 14 deletions(-) diff --git a/changelog.d/history-nj-property-tax-limit.fixed.md b/changelog.d/history-nj-property-tax-limit.fixed.md index b0a20c76b71..3cfd861fb97 100644 --- a/changelog.d/history-nj-property-tax-limit.fixed.md +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -1 +1 @@ -Correct New Jersey's property tax deduction cap for 2015–2017. +Correct New Jersey's property tax deduction cap for 2015–2017 and floor property tax and rent payments at zero before calculating the deduction. Start the New Jersey Child and Dependent Care Credit in 2018 and apply the original income brackets through 2020. diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/rate.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/rate.yaml index 674e3237492..7cd4f7db569 100644 --- a/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/rate.yaml +++ b/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/rate.yaml @@ -5,7 +5,15 @@ metadata: threshold_period: year type: single_amount label: New Jersey CDCC match rate - reference: + reference: + - title: P.L. 2018, c.45, sections 5 and 12 + href: https://pub.njleg.gov/bills/2018/AL18/45_.HTM + - title: 2018 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2018/1040i.pdf#page=38 + - title: 2019 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2019/1040i.pdf#page=37 + - title: 2020 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2020/1040i.pdf#page=36 - title: Child and Dependent Care Credit href: https://www.nj.gov/treasury/taxation/depcarecred.shtml - title: 2022 Instructions for Form NJ-1040 (line 64) @@ -19,27 +27,45 @@ metadata: - title: 2025 NJ-1040 Instructions (Line 64) href: https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf#page=46 brackets: - - threshold: + # 2015 is the first model year. New Jersey introduced the credit in 2018. + - threshold: + 2015-01-01: -.inf 2021-01-01: -.inf amount: + 2015-01-01: 0 + 2018-01-01: 0.5 2021-01-01: 0.5 - - threshold: + - threshold: + 2015-01-01: 20_000 2021-01-01: 30_000 amount: + 2015-01-01: 0 + 2018-01-01: 0.4 2021-01-01: 0.4 - threshold: + 2015-01-01: 30_000 2021-01-01: 60_000 amount: + 2015-01-01: 0 + 2018-01-01: 0.3 2021-01-01: 0.3 - threshold: + 2015-01-01: 40_000 2021-01-01: 90_000 amount: + 2015-01-01: 0 + 2018-01-01: 0.2 2021-01-01: 0.2 - threshold: + 2015-01-01: 50_000 2021-01-01: 120_000 amount: + 2015-01-01: 0 + 2018-01-01: 0.1 2021-01-01: 0.1 - threshold: + 2015-01-01: 60_000 2021-01-01: 150_000 amount: + 2015-01-01: 0 2021-01-01: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index cf097e7775c..3b165849ee5 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml @@ -69,3 +69,35 @@ cdcc: 1_000 output: nj_cdcc: 0 + +- name: New Jersey had no child and dependent care credit in 2017. + period: 2017 + input: + state_code: NJ + nj_taxable_income: 40_000 + cdcc: 600 + output: + nj_cdcc: 0 + +- name: At $40,000 of taxable income, the 2018 credit matches 30% of the federal credit. + period: 2018 + input: + state_code: NJ + nj_taxable_income: 40_000 + cdcc: 600 + output: + nj_cdcc: 180 + +- name: The 2017 property tax deduction lowers taxable income without a state dependent care credit. + period: 2017 + input: + state_code: NJ + filing_status: SINGLE + nj_gross_income: 50_000 + nj_taxable_income_before_property_tax_deduction: 45_000 + real_estate_taxes: 20_000 + cdcc: 600 + output: + nj_property_tax_deduction: 10_000 + nj_taxable_income: 35_000 + nj_cdcc: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml index 5c3de21b8a8..a5d7cccdf9e 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/history/nj_potential_property_tax_deduction.yaml @@ -1,14 +1,13 @@ -# Conditional general-cap controls, USD per TaxUnit and tax year. Stipulate -# an otherwise-qualified full-year New Jersey resident who solely owns and -# occupies one homestead and pays all stated property taxes for that calendar -# year. Each return uses SINGLE status, no rent, no co-ownership, no separate -# spouse, no Senior Freeze/PTR limitation and no reimbursement application. -# These cases do not test the deduction/credit election or a complete return. +# Each case assumes a qualified full-year New Jersey homeowner who pays the +# stated property taxes and has no rent, Senior Freeze limit or reimbursement. +# The single filers each own and occupy one home. The separate filers share +# their principal residence with their spouse. # The 2015 node marks earliest model availability; the statute predates 2015. # Primary cap sources: # P.L.2009c69 section2: https://pub.njleg.gov/bills/2008/PL09/69_.PDF#page=2 # 2016 Division report: https://www.nj.gov/treasury/taxation/pdf/annual/2016.pdf#page=34 # 2017 WorksheetGline2: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2017/1040i.pdf#page=36 +# 2018 Worksheet H, line 2: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2018/1040i.pdf#page=33 # P.L.2018c45 sections1-3/12: https://pub.njleg.gov/bills/2018/AL18/45_.HTM # The 1996/1997 phase-in and taxyear2009 special restriction stay outside these # periods. Integer paid taxes avoid selecting a fractional-dollar convention. @@ -91,7 +90,7 @@ # subtractions, retirement exclusions or other income, and $20,000 qualifying # property taxes. The 2017 WorksheetG cap gives min(20,000,10,000)=10,000. # Compute NJ AGI and the existing eligibility gate; do not supply their outputs. -- name: Case 7, 2017 single homeowner computes the potential deduction from wages and paid taxes. +- name: Case 7, 2017 single homeowner claims the deduction from wages and paid taxes. period: 2017 absolute_error_margin: 0.01 input: @@ -114,3 +113,33 @@ output: nj_potential_property_tax_deduction: 10_000 nj_agi: 50_000 + nj_property_tax_deduction: 10_000 + nj_property_tax_credit: 0 + nj_taxable_income: 39_000 + +# The spouses paid $20,000 in total. Each can count $10,000 before the cap. +- name: Case 8, 2017 separate filer sharing a home claims a $5,000 deduction. + period: 2017 + absolute_error_margin: 0.01 + input: &separate_filer + state_code: NJ + age: 40 + filing_status: SEPARATE + cohabitating_spouses: true + employment_income_before_lsr: 50_000 + real_estate_taxes: 20_000 + output: + nj_potential_property_tax_deduction: 5_000 + nj_property_tax_deduction: 5_000 + nj_property_tax_credit: 0 + nj_taxable_income: 44_000 + +- name: Case 9, 2018 separate filer sharing a home claims a $7,500 deduction. + period: 2018 + absolute_error_margin: 0.01 + input: *separate_filer + output: + nj_potential_property_tax_deduction: 7_500 + nj_property_tax_deduction: 7_500 + nj_property_tax_credit: 0 + nj_taxable_income: 41_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/nj_potential_property_tax_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/nj_potential_property_tax_deduction.yaml index 801cb27cc73..941787bbb12 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/nj_potential_property_tax_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/property_tax/nj_potential_property_tax_deduction.yaml @@ -52,3 +52,15 @@ state_code: NJ output: nj_potential_property_tax_deduction: 0 + +- name: Negative real estate taxes do not offset qualifying rent. + period: 2017 + absolute_error_margin: 0.01 + input: + state_code: NJ + filing_status: SINGLE + nj_agi: 50_000 + rent: 1_000 + real_estate_taxes: -200 + output: + nj_potential_property_tax_deduction: 180 diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py index 769da2335b9..12246009d69 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py @@ -9,6 +9,7 @@ class nj_potential_property_tax_deduction(Variable): definition_period = YEAR reference = ( "https://law.justia.com/codes/new-jersey/2022/title-54a/section-54a-3a-17/", + "https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2017/1040i.pdf#page=33", "https://www.state.nj.us/treasury/taxation/pdf/other_forms/tgi-ee/2021/1040i.pdf#page=25", ) defined_for = "nj_property_tax_deduction_eligible" @@ -16,9 +17,9 @@ class nj_potential_property_tax_deduction(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states.nj.tax.income.deductions.property_tax - # property_tax amount calculation follows NJ-1040 form Worksheet G - rent = add(tax_unit, period, ["rent"]) - ptax = add(tax_unit, period, ["real_estate_taxes"]) + # Count property taxes paid and the qualifying share of rent paid. + rent = max_(0, add(tax_unit, period, ["rent"])) + ptax = max_(0, add(tax_unit, period, ["real_estate_taxes"])) property_tax = ptax + rent * p.qualifying_rent_fraction # if filing separate but maintain same home, halve property_tax amount From 44be0e7929d3451cc6777f26be4a2f1f672e2c03 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 10:47:22 +0000 Subject: [PATCH 3/8] Fix New Jersey dependent care credit refundability and reporting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the credit against liability for 2018–2020 and include it in TAXSIM from its first tax year. Co-Authored-By: GPT-6.2 Sol --- .../history-nj-property-tax-limit.fixed.md | 2 +- .../gov/states/household/state_cdccs.yaml | 3 ++ .../nj/tax/income/credits/nonrefundable.yaml | 15 ++++++ .../nj/tax/income/credits/refundable.yaml | 18 +++++++ .../nj/tax/income/credits/cdcc/nj_cdcc.yaml | 30 +++++++++++ .../states/nj/tax/income/nj_income_tax.yaml | 50 +++++++++++++++++++ .../states/tax/income/taxsim_state_cdcc.yaml | 39 +++++++++++++++ .../tax/income/nj_non_refundable_credits.py | 1 + .../nj/tax/income/nj_refundable_credits.py | 7 +-- 9 files changed, 158 insertions(+), 7 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/nj/tax/income/credits/nonrefundable.yaml create mode 100644 policyengine_us/parameters/gov/states/nj/tax/income/credits/refundable.yaml diff --git a/changelog.d/history-nj-property-tax-limit.fixed.md b/changelog.d/history-nj-property-tax-limit.fixed.md index 3cfd861fb97..d892c5109f1 100644 --- a/changelog.d/history-nj-property-tax-limit.fixed.md +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -1 +1 @@ -Correct New Jersey's property tax deduction cap for 2015–2017 and floor property tax and rent payments at zero before calculating the deduction. Start the New Jersey Child and Dependent Care Credit in 2018 and apply the original income brackets through 2020. +Corrected New Jersey's historical property tax deduction caps, floored rent and property tax payments at zero, applied the nonrefundable child and dependent care credit for 2018–2020, and included the credit in TAXSIM from 2018. diff --git a/policyengine_us/parameters/gov/states/household/state_cdccs.yaml b/policyengine_us/parameters/gov/states/household/state_cdccs.yaml index f4a69ee6224..71a32f10d63 100644 --- a/policyengine_us/parameters/gov/states/household/state_cdccs.yaml +++ b/policyengine_us/parameters/gov/states/household/state_cdccs.yaml @@ -66,6 +66,7 @@ values: - la_non_refundable_cdcc - la_refundable_cdcc - me_child_care_credit + - nj_cdcc - ny_cdcc - vt_low_income_cdcc - vt_nonrefundable_cdcc @@ -84,6 +85,7 @@ values: - md_cdcc - md_refundable_cdcc - me_child_care_credit + - nj_cdcc - ny_cdcc - vt_low_income_cdcc - vt_nonrefundable_cdcc @@ -102,6 +104,7 @@ values: - md_cdcc - md_refundable_cdcc - me_child_care_credit + - nj_cdcc - ny_cdcc - sc_cdcc - vt_low_income_cdcc diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/credits/nonrefundable.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/credits/nonrefundable.yaml new file mode 100644 index 00000000000..03d8a88f3d9 --- /dev/null +++ b/policyengine_us/parameters/gov/states/nj/tax/income/credits/nonrefundable.yaml @@ -0,0 +1,15 @@ +description: New Jersey provides these nonrefundable income tax credits. +values: + 2015-01-01: [] + 2018-01-01: + - nj_cdcc + 2021-01-01: [] +metadata: + unit: list + period: year + label: New Jersey nonrefundable income tax credits + reference: + - title: P.L. 2018, c.45, §5(b) + href: https://pub.njleg.gov/bills/2018/PL18/45_.PDF#page=5 + - title: P.L. 2021, c.308, §§1–2 + href: https://pub.njleg.gov/bills/2020/PL21/308_.PDF#page=1 diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/credits/refundable.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/credits/refundable.yaml new file mode 100644 index 00000000000..8cc87fcff08 --- /dev/null +++ b/policyengine_us/parameters/gov/states/nj/tax/income/credits/refundable.yaml @@ -0,0 +1,18 @@ +description: New Jersey provides these refundable income tax credits. +values: + 2015-01-01: + - nj_property_tax_credit + - nj_eitc + - nj_ctc + 2021-01-01: + - nj_property_tax_credit + - nj_eitc + - nj_cdcc + - nj_ctc +metadata: + unit: list + period: year + label: New Jersey refundable income tax credits + reference: + - title: P.L. 2021, c.308, §§1–2 + href: https://pub.njleg.gov/bills/2020/PL21/308_.PDF#page=1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index 3b165849ee5..5a674f0e159 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml @@ -101,3 +101,33 @@ nj_property_tax_deduction: 10_000 nj_taxable_income: 35_000 nj_cdcc: 0 + +# Each pair uses the inclusive upper edge and one dollar above it. +# Apply 50/40, 40/30, 30/20, 20/10, and 10/0 percent to $600. +- name: Original New Jersey dependent care credit bracket edges in 2018 + period: 2018 + input: &original_cdcc_edges + state_code: &nj_filers [NJ, NJ, NJ, NJ, NJ, NJ, NJ, NJ, NJ, NJ] + nj_taxable_income: [20_000, 20_001, 30_000, 30_001, 40_000, 40_001, 50_000, 50_001, 60_000, 60_001] + cdcc: &federal_credits [600, 600, 600, 600, 600, 600, 600, 600, 600, 600] + output: &cdcc_at_edges + nj_cdcc: [300, 240, 240, 180, 180, 120, 120, 60, 60, 0] + +- name: Original New Jersey dependent care credit bracket edges in 2019 + period: 2019 + input: *original_cdcc_edges + output: *cdcc_at_edges + +- name: Original New Jersey dependent care credit bracket edges in 2020 + period: 2020 + input: *original_cdcc_edges + output: *cdcc_at_edges + +# The same percentage pairs now apply to brackets spaced $30,000 apart. +- name: New Jersey dependent care credit bracket edges widen in 2021 + period: 2021 + input: + state_code: *nj_filers + nj_taxable_income: [30_000, 30_001, 60_000, 60_001, 90_000, 90_001, 120_000, 120_001, 150_000, 150_001] + cdcc: *federal_credits + output: *cdcc_at_edges diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml index 33d6bcdad9d..c52507cdd07 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml @@ -90,3 +90,53 @@ nj_refundable_credits: 50 output: nj_income_tax: 9_950 + +# Qualifying payments are max(-$3,200, $0) + 18% × $30,000 = $5,400. +# The deduction leaves $24,000 - $5,400 = $18,600 of taxable income. +# Tax table savings of $350 - $261 = $89 exceed the $50 property tax credit. +# The model's rate schedule gives $18,600 × 1.4% = $260.40 of liability. +# The tentative credit is $600 × 50% = $300. Through 2020, tax is floored at $0. +- name: New Jersey dependent care credit cannot refund excess in 2018 + period: 2018 + absolute_error_margin: 0.01 + input: &mixed_sign_renter + state_code: NJ + filing_status: SINGLE + nj_agi: 26_500 + nj_taxable_income_before_property_tax_deduction: 24_000 + rent: 30_000 + real_estate_taxes: -3_200 + cdcc: 600 + output: &nonrefundable_renter_tax + nj_property_tax_deduction: 5_400 + nj_property_tax_credit: 0 + nj_taxable_income: 18_600 + nj_main_income_tax: 260.40 + nj_cdcc: 300 + nj_income_tax: 0 + nj_non_refundable_credits: 300 + nj_refundable_credits: 0 + +- name: New Jersey dependent care credit cannot refund excess in 2019 + period: 2019 + absolute_error_margin: 0.01 + input: *mixed_sign_renter + output: *nonrefundable_renter_tax + +- name: New Jersey dependent care credit cannot refund excess in 2020 + period: 2020 + absolute_error_margin: 0.01 + input: *mixed_sign_renter + output: *nonrefundable_renter_tax + +# The refundable $300 credit exceeds the $260.40 liability by $39.60. +- name: New Jersey dependent care credit refunds excess in 2021 + period: 2021 + absolute_error_margin: 0.01 + input: *mixed_sign_renter + output: + nj_taxable_income: 18_600 + nj_cdcc: 300 + nj_income_tax: -39.60 + nj_non_refundable_credits: 0 + nj_refundable_credits: 300 diff --git a/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml index d3550824520..f4845005da9 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml @@ -31,3 +31,42 @@ state_code: OH output: taxsim_state_cdcc: 0 + +# The credit starts in 2018, so this 2017 return reports $0. +- name: TAXSIM has no New Jersey dependent care credit in 2017 + period: 2017 + input: &nj_cdcc_filer + state_code: NJ + filing_status: SINGLE + nj_agi: 42_500 + nj_taxable_income: 40_000 + cdcc: 600 + output: + nj_cdcc: 0 + taxsim_state_cdcc: 0 + +# From 2018 through 2020, $40,000 of taxable income matches $600 × 30% = $180. +- name: TAXSIM includes the New Jersey dependent care credit in 2018 + period: 2018 + input: *nj_cdcc_filer + output: &nj_historical_cdcc + nj_cdcc: 180 + taxsim_state_cdcc: 180 + +- name: TAXSIM includes the New Jersey dependent care credit in 2019 + period: 2019 + input: *nj_cdcc_filer + output: *nj_historical_cdcc + +- name: TAXSIM includes the New Jersey dependent care credit in 2020 + period: 2020 + input: *nj_cdcc_filer + output: *nj_historical_cdcc + +# The 2021 schedule matches $600 × 40% = $240 at $40,000 of taxable income. +- name: TAXSIM includes the refundable New Jersey dependent care credit in 2021 + period: 2021 + input: *nj_cdcc_filer + output: + nj_cdcc: 240 + taxsim_state_cdcc: 240 diff --git a/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py b/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py index 03d53f2eca3..8cf9a70f1c1 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py @@ -8,3 +8,4 @@ class nj_non_refundable_credits(Variable): unit = USD definition_period = YEAR defined_for = StateCode.NJ + adds = "gov.states.nj.tax.income.credits.nonrefundable" diff --git a/policyengine_us/variables/gov/states/nj/tax/income/nj_refundable_credits.py b/policyengine_us/variables/gov/states/nj/tax/income/nj_refundable_credits.py index 4f390ca02f9..de0ed6af379 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/nj_refundable_credits.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/nj_refundable_credits.py @@ -8,9 +8,4 @@ class nj_refundable_credits(Variable): unit = USD definition_period = YEAR defined_for = StateCode.NJ - adds = [ - "nj_property_tax_credit", - "nj_eitc", - "nj_cdcc", - "nj_ctc", - ] + adds = "gov.states.nj.tax.income.credits.refundable" From 4e44ce52accd73b3c840a9ecebe7821a8cb8f0cb Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 07:29:47 -0500 Subject: [PATCH 4/8] Point the New Jersey property tax credit route at its parameter list nj_refundable_credits now adds a parameter list, so the route test reads the list in force each year instead of the formula text. Co-Authored-By: Claude Opus 5.5 --- policyengine_us/tests/test_household_spm_resource_parity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us/tests/test_household_spm_resource_parity.py b/policyengine_us/tests/test_household_spm_resource_parity.py index 48aef8ebd8d..1dab2d56627 100644 --- a/policyengine_us/tests/test_household_spm_resource_parity.py +++ b/policyengine_us/tests/test_household_spm_resource_parity.py @@ -190,8 +190,8 @@ "refundable.yaml", "mt_elderly_homeowner_or_renter_credit": "variables/gov/states/mt/tax/income/" "tax_calculation/mt_refundable_credits.py", - "nj_property_tax_credit": "variables/gov/states/nj/tax/income/" - "nj_refundable_credits.py", + "nj_property_tax_credit": "parameters/gov/states/nj/tax/income/credits/" + "refundable.yaml", "nm_property_tax_rebate": "parameters/gov/states/nm/tax/income/credits/" "refundable.yaml", "ny_real_property_tax_credit": "parameters/gov/states/ny/tax/income/credits/" From 01bfa8113e71f54ba66ed8cea55ca58a600c647e Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 08:42:41 -0500 Subject: [PATCH 5/8] Limit New Jersey's dependent care credit for 2018 to 2020 P.L. 2018, c.45 limits the credit to $500 for one qualifying individual and $1,000 for two or more. P.L. 2021, c.308 removed the limits from 2021. Co-Authored-By: Claude Opus 5.5 --- .../history-nj-property-tax-limit.fixed.md | 2 +- .../maximum/one_qualifying_individual.yaml | 22 ++++++++++++++ .../two_or_more_qualifying_individuals.yaml | 22 ++++++++++++++ .../nj/tax/income/credits/cdcc/nj_cdcc.yaml | 29 ++++++++++++++++++ .../states/tax/income/taxsim_state_cdcc.yaml | 30 +++++++++++++++++++ .../nj/tax/income/credits/cdcc/nj_cdcc.py | 15 +++++++--- 6 files changed, 115 insertions(+), 5 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/one_qualifying_individual.yaml create mode 100644 policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/two_or_more_qualifying_individuals.yaml diff --git a/changelog.d/history-nj-property-tax-limit.fixed.md b/changelog.d/history-nj-property-tax-limit.fixed.md index d892c5109f1..78f6a7a8e49 100644 --- a/changelog.d/history-nj-property-tax-limit.fixed.md +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -1 +1 @@ -Corrected New Jersey's historical property tax deduction caps, floored rent and property tax payments at zero, applied the nonrefundable child and dependent care credit for 2018–2020, and included the credit in TAXSIM from 2018. +Corrected New Jersey's historical property tax deduction caps, floored rent and property tax payments at zero, applied the nonrefundable child and dependent care credit and its $500 and $1,000 limits for 2018–2020, and included the credit in TAXSIM from 2018. diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/one_qualifying_individual.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/one_qualifying_individual.yaml new file mode 100644 index 00000000000..64a04bcfd76 --- /dev/null +++ b/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/one_qualifying_individual.yaml @@ -0,0 +1,22 @@ +description: New Jersey limits the Child and Dependent Care Credit to this amount for one qualifying individual. +values: + # 2015 is the first model year. New Jersey introduced the credit in 2018. + 2015-01-01: 0 + 2018-01-01: 500 + # The 2021 amendment removed the limit. + 2021-01-01: .inf +metadata: + unit: currency-USD + period: year + label: New Jersey CDCC maximum for one qualifying individual + reference: + - title: P.L. 2018, c.45, section 5(a) + href: https://pub.njleg.gov/bills/2018/PL18/45_.PDF#page=5 + - title: P.L. 2021, c.308, sections 1 and 2 + href: https://pub.njleg.gov/bills/2020/PL21/308_.PDF#page=1 + - title: 2018 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2018/1040i.pdf#page=38 + - title: 2019 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2019/1040i.pdf#page=37 + - title: 2020 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2020/1040i.pdf#page=36 diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/two_or_more_qualifying_individuals.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/two_or_more_qualifying_individuals.yaml new file mode 100644 index 00000000000..515604a1080 --- /dev/null +++ b/policyengine_us/parameters/gov/states/nj/tax/income/credits/cdcc/maximum/two_or_more_qualifying_individuals.yaml @@ -0,0 +1,22 @@ +description: New Jersey limits the Child and Dependent Care Credit to this amount for two or more qualifying individuals. +values: + # 2015 is the first model year. New Jersey introduced the credit in 2018. + 2015-01-01: 0 + 2018-01-01: 1_000 + # The 2021 amendment removed the limit. + 2021-01-01: .inf +metadata: + unit: currency-USD + period: year + label: New Jersey CDCC maximum for two or more qualifying individuals + reference: + - title: P.L. 2018, c.45, section 5(a) + href: https://pub.njleg.gov/bills/2018/PL18/45_.PDF#page=5 + - title: P.L. 2021, c.308, sections 1 and 2 + href: https://pub.njleg.gov/bills/2020/PL21/308_.PDF#page=1 + - title: 2018 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2018/1040i.pdf#page=38 + - title: 2019 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2019/1040i.pdf#page=37 + - title: 2020 NJ-1040 instructions, Worksheet J + href: https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2020/1040i.pdf#page=36 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index 5a674f0e159..60b4dc63978 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml @@ -131,3 +131,32 @@ nj_taxable_income: [30_000, 30_001, 60_000, 60_001, 90_000, 90_001, 120_000, 120_001, 150_000, 150_001] cdcc: *federal_credits output: *cdcc_at_edges + +# At 50 percent, $1,000 and $1,050 give $500 and $525, and $2,000 and $2,100 +# give $1,000 and $1,050. The limits are $500 for one qualifying individual +# and $1,000 for two or more. +- name: New Jersey limits the 2018 credit by the number of qualifying individuals + period: 2018 + input: &limit_filers + state_code: [NJ, NJ, NJ, NJ, NJ] + nj_taxable_income: [20_000, 20_000, 20_000, 20_000, 20_000] + count_cdcc_eligible: [1, 1, 2, 2, 3] + cdcc: [1_000, 1_050, 2_000, 2_100, 2_100] + output: &limited_credits + nj_cdcc: [500, 500, 1_000, 1_000, 1_000] + +- name: New Jersey limits the 2019 credit by the number of qualifying individuals + period: 2019 + input: *limit_filers + output: *limited_credits + +- name: New Jersey limits the 2020 credit by the number of qualifying individuals + period: 2020 + input: *limit_filers + output: *limited_credits + +- name: New Jersey removes the limit in 2021 + period: 2021 + input: *limit_filers + output: + nj_cdcc: [500, 525, 1_000, 1_050, 1_050] diff --git a/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml index f4845005da9..2a87c0462a1 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml @@ -70,3 +70,33 @@ output: nj_cdcc: 240 taxsim_state_cdcc: 240 + +# Worksheet J stops the $525 match at $500 for one qualifying individual. +- name: TAXSIM reports the limited New Jersey dependent care credit in 2018 + period: 2018 + input: &nj_limited_filer + state_code: NJ + filing_status: SINGLE + nj_taxable_income: 18_600 + count_cdcc_eligible: 1 + cdcc: 1_050 + output: &nj_limited_cdcc + nj_cdcc: 500 + taxsim_state_cdcc: 500 + +- name: TAXSIM reports the limited New Jersey dependent care credit in 2019 + period: 2019 + input: *nj_limited_filer + output: *nj_limited_cdcc + +- name: TAXSIM reports the limited New Jersey dependent care credit in 2020 + period: 2020 + input: *nj_limited_filer + output: *nj_limited_cdcc + +- name: TAXSIM reports the unlimited New Jersey dependent care credit in 2021 + period: 2021 + input: *nj_limited_filer + output: + nj_cdcc: 525 + taxsim_state_cdcc: 525 diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py index 9ce3a2307c0..ae27c88c3cc 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py @@ -14,8 +14,7 @@ class nj_cdcc(Variable): defined_for = StateCode.NJ def formula(tax_unit, period, parameters): - # Get New Jersey CDCC rate - p = parameters(period).gov.states.nj.tax.income.credits.cdcc.rate + p = parameters(period).gov.states.nj.tax.income.credits.cdcc # Get NJ taxable income taxable_income = tax_unit("nj_taxable_income", period) @@ -25,7 +24,15 @@ def formula(tax_unit, period, parameters): federal_cdcc = tax_unit("cdcc", period) # Calculate NJ CDCC - rate = p.calc(taxable_income, right=True) + rate = p.rate.calc(taxable_income, right=True) + + # Worksheet J limits the credit by the number of qualifying individuals + # in 2018 through 2020. + maximum = where( + tax_unit("count_cdcc_eligible", period) >= 2, + p.maximum.two_or_more_qualifying_individuals, + p.maximum.one_qualifying_individual, + ) # Calculate total NJ CDCC - return federal_cdcc * rate + return min_(federal_cdcc * rate, maximum) From 23cee09718faedb61957ab30d26f239f7517d134 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 09:25:08 -0500 Subject: [PATCH 6/8] Let New Jersey's credit limit use the Form 2441 count Worksheet J limits the 2018-2020 credit by the number of qualifying individuals claimed on Form 2441. The model counts them from annual ages, so a return that claims a child who turned 13 can now supply the number. Co-Authored-By: Claude Opus 5.5 --- .../nj/tax/income/credits/cdcc/nj_cdcc.yaml | 88 +++++++++++++++++++ .../states/tax/income/taxsim_state_cdcc.yaml | 29 +++--- .../nj/tax/income/credits/cdcc/nj_cdcc.py | 2 +- .../cdcc/nj_cdcc_qualifying_individuals.py | 26 ++++++ 4 files changed, 130 insertions(+), 15 deletions(-) create mode 100644 policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_qualifying_individuals.py diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index 60b4dc63978..701bd7c3a20 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml @@ -160,3 +160,91 @@ input: *limit_filers output: nj_cdcc: [500, 525, 1_000, 1_050, 1_050] + +# The number supplied from Form 2441 sets the limit when it differs from the +# count of annual ages. +- name: New Jersey limits the 2020 credit by the supplied Form 2441 count + period: 2020 + input: + state_code: [NJ, NJ, NJ, NJ] + nj_taxable_income: [20_000, 20_000, 20_000, 20_000] + count_cdcc_eligible: [0, 1, 1, 2] + nj_cdcc_qualifying_individuals: [2, 1, 2, 1] + cdcc: [2_100, 1_050, 1_050, 1_050] + output: + nj_cdcc: [1_000, 500, 525, 500] + +# A separate filer lives apart from a spouse who itemizes and pays $3,000 for +# the care of a five-year-old and of a child who turns 13 during the year. The +# federal credit is $3,000 x 35% = $1,050, below the $1,609.50 of federal tax on +# $15,000. New Jersey taxable income is $15,000 - $1,000 - $3,000 = $11,000, so +# the match is $1,050 x 50% = $525. +- name: New Jersey's 2018 limit counts one qualifying individual from annual ages + period: 2018 + input: + people: &birthday_people + parent: + age: 35 + employment_income: 15_000 + is_tax_unit_head: true + is_separated: true + younger_child: + age: 5 + is_tax_unit_dependent: true + older_child: + age: 13 + is_tax_unit_dependent: true + spm_units: &birthday_spm_units + spm_unit: + members: &birthday_members [parent, younger_child, older_child] + childcare_expenses: 3_000 + households: &birthday_households + household: + members: *birthday_members + state_code: NJ + tax_units: &birthday_tax_units + tax_unit: + members: *birthday_members + filing_status: SEPARATE + separate_filer_itemizes: true + output: + count_cdcc_eligible: 1 + nj_cdcc_qualifying_individuals: 1 + cdcc: 1_050 + nj_taxable_income: 11_000 + nj_cdcc: 500 + taxsim_state_cdcc: 500 + +- name: New Jersey's 2018 limit uses two qualifying individuals claimed on Form 2441 + period: 2018 + input: + people: *birthday_people + spm_units: *birthday_spm_units + households: *birthday_households + tax_units: + tax_unit: + members: *birthday_members + filing_status: SEPARATE + separate_filer_itemizes: true + nj_cdcc_qualifying_individuals: 2 + output: + cdcc: 1_050 + nj_taxable_income: 11_000 + nj_cdcc: 525 + taxsim_state_cdcc: 525 + +# In 2021 the federal credit is $3,000 x 50% = $1,500, and New Jersey matches +# half of it without a limit. +- name: New Jersey has no limit for the same return in 2021 + period: 2021 + input: + people: *birthday_people + spm_units: *birthday_spm_units + households: *birthday_households + tax_units: *birthday_tax_units + output: + nj_cdcc_qualifying_individuals: 1 + cdcc: 1_500 + nj_taxable_income: 11_000 + nj_cdcc: 750 + taxsim_state_cdcc: 750 diff --git a/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml index 2a87c0462a1..f3d6fd634f3 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/tax/income/taxsim_state_cdcc.yaml @@ -71,32 +71,33 @@ nj_cdcc: 240 taxsim_state_cdcc: 240 -# Worksheet J stops the $525 match at $500 for one qualifying individual. +# At 50 percent, $1,000 and $1,050 give $500 and $525, and $2,000 and $2,100 +# give $1,000 and $1,050. Worksheet J limits the credit to $500 for one +# qualifying individual and $1,000 for two or more. - name: TAXSIM reports the limited New Jersey dependent care credit in 2018 period: 2018 - input: &nj_limited_filer - state_code: NJ - filing_status: SINGLE - nj_taxable_income: 18_600 - count_cdcc_eligible: 1 - cdcc: 1_050 + input: &nj_limited_filers + state_code: [NJ, NJ, NJ, NJ, NJ] + nj_taxable_income: [18_600, 18_600, 18_600, 18_600, 18_600] + count_cdcc_eligible: [1, 1, 2, 2, 3] + cdcc: [1_000, 1_050, 2_000, 2_100, 2_100] output: &nj_limited_cdcc - nj_cdcc: 500 - taxsim_state_cdcc: 500 + nj_cdcc: [500, 500, 1_000, 1_000, 1_000] + taxsim_state_cdcc: [500, 500, 1_000, 1_000, 1_000] - name: TAXSIM reports the limited New Jersey dependent care credit in 2019 period: 2019 - input: *nj_limited_filer + input: *nj_limited_filers output: *nj_limited_cdcc - name: TAXSIM reports the limited New Jersey dependent care credit in 2020 period: 2020 - input: *nj_limited_filer + input: *nj_limited_filers output: *nj_limited_cdcc - name: TAXSIM reports the unlimited New Jersey dependent care credit in 2021 period: 2021 - input: *nj_limited_filer + input: *nj_limited_filers output: - nj_cdcc: 525 - taxsim_state_cdcc: 525 + nj_cdcc: [500, 525, 1_000, 1_050, 1_050] + taxsim_state_cdcc: [500, 525, 1_000, 1_050, 1_050] diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py index ae27c88c3cc..8c27481d833 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py @@ -29,7 +29,7 @@ def formula(tax_unit, period, parameters): # Worksheet J limits the credit by the number of qualifying individuals # in 2018 through 2020. maximum = where( - tax_unit("count_cdcc_eligible", period) >= 2, + tax_unit("nj_cdcc_qualifying_individuals", period) >= 2, p.maximum.two_or_more_qualifying_individuals, p.maximum.one_qualifying_individual, ) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_qualifying_individuals.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_qualifying_individuals.py new file mode 100644 index 00000000000..aaf9ee9fbc9 --- /dev/null +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_qualifying_individuals.py @@ -0,0 +1,26 @@ +from policyengine_us.model_api import * + + +class nj_cdcc_qualifying_individuals(Variable): + value_type = int + entity = TaxUnit + label = "Number of qualifying individuals for the New Jersey CDCC limit" + documentation = ( + "Number of qualifying individuals claimed on federal Form 2441, which " + "sets the New Jersey Child and Dependent Care Credit limit from 2018 " + "through 2020. The formula counts them from annual ages. Supply the " + "number on the form when it differs, as when a child turned 13 during " + "the year and is claimed for care before the birthday." + ) + unit = "person" + definition_period = YEAR + reference = ( + # Worksheet J, line 5. + "https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2018/1040i.pdf#page=38", + "https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2019/1040i.pdf#page=37", + "https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2020/1040i.pdf#page=36", + # Form 2441 instructions, "Qualifying Person(s)". + "https://www.irs.gov/pub/irs-prior/i2441--2018.pdf#page=1", + ) + defined_for = StateCode.NJ + adds = ["count_cdcc_eligible"] From 411fbe73bc999d7c7f43051155da7f9b0b3f896c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 23:10:20 +0000 Subject: [PATCH 7/8] Prorate New Jersey's dependent care credit for part-year residents Apply the historical Form 2441 limits before proration and read the qualifying count only in capped years. Cover the historical property tax credit refund and the birthday fixture's federal tax. Co-Authored-By: GPT-6.2 Sol --- .../history-nj-property-tax-limit.fixed.md | 2 +- .../nj/tax/income/credits/cdcc/nj_cdcc.yaml | 60 ++++++++++++++++++- .../states/nj/tax/income/nj_income_tax.yaml | 20 +++++++ .../tests/test_nj_cdcc_dependencies.py | 33 ++++++++++ .../nj/tax/income/credits/cdcc/nj_cdcc.py | 36 +++++------ .../credits/cdcc/nj_cdcc_residency_months.py | 21 +++++++ 6 files changed, 151 insertions(+), 21 deletions(-) create mode 100644 policyengine_us/tests/test_nj_cdcc_dependencies.py create mode 100644 policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_residency_months.py diff --git a/changelog.d/history-nj-property-tax-limit.fixed.md b/changelog.d/history-nj-property-tax-limit.fixed.md index 78f6a7a8e49..f534a52ade4 100644 --- a/changelog.d/history-nj-property-tax-limit.fixed.md +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -1 +1 @@ -Corrected New Jersey's historical property tax deduction caps, floored rent and property tax payments at zero, applied the nonrefundable child and dependent care credit and its $500 and $1,000 limits for 2018–2020, and included the credit in TAXSIM from 2018. +Corrected New Jersey's historical property tax deduction caps, floored rent and property tax payments at zero, and applied the nonrefundable child and dependent care credit and its $500 and $1,000 limits for 2018–2020. Prorated the credit for part-year residents and included it in TAXSIM from 2018. diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index 701bd7c3a20..f2e614051f1 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml @@ -174,11 +174,63 @@ output: nj_cdcc: [1_000, 500, 525, 500] +# $600 × 30% × 6 / 12 = $90. +- name: Six qualifying months halve the historical New Jersey credit + period: 2020 + input: + state_code: NJ + nj_taxable_income: 40_000 + cdcc: 600 + nj_cdcc_qualifying_individuals: 1 + nj_cdcc_residency_months: 6 + output: + nj_cdcc: 90 + taxsim_state_cdcc: 90 + +# The 50% matches of $525 and $1,050 hit the $500 and $1,000 limits. +# Six of 12 months gives $250 and $500. The Pennsylvania filer gets no NJ credit. +- name: New Jersey prorates after applying the historical Form 2441 limits + period: 2020 + input: + state_code: [NJ, NJ, PA] + nj_taxable_income: [20_000, 20_000, 20_000] + cdcc: [1_050, 2_100, 1_050] + nj_cdcc_qualifying_individuals: [1, 2, 1] + nj_cdcc_residency_months: [6, 6, 6] + output: + nj_cdcc: [250, 500, 0] + taxsim_state_cdcc: [250, 500, 0] + +# $600 × 40% × 6 / 12 = $120. +- name: Six qualifying months halve the refundable New Jersey credit + period: 2021 + input: + state_code: NJ + nj_taxable_income: 40_000 + cdcc: 600 + nj_cdcc_residency_months: 6 + output: + nj_cdcc: 120 + taxsim_state_cdcc: 120 + +# Both filers get $2,100 × 50% = $1,050 once the limits expire. +- name: New Jersey's 2021 credit is independent of the supplied Form 2441 count + period: 2021 + input: + state_code: [NJ, NJ] + nj_taxable_income: [20_000, 20_000] + cdcc: [2_100, 2_100] + nj_cdcc_qualifying_individuals: [1, 2] + output: + nj_cdcc: [1_050, 1_050] + taxsim_state_cdcc: [1_050, 1_050] + # A separate filer lives apart from a spouse who itemizes and pays $3,000 for # the care of a five-year-old and of a child who turns 13 during the year. The -# federal credit is $3,000 x 35% = $1,050, below the $1,609.50 of federal tax on -# $15,000. New Jersey taxable income is $15,000 - $1,000 - $3,000 = $11,000, so -# the match is $1,050 x 50% = $525. +# federal credit is $3,000 × 35% = $1,050, below the $1,545.54 of modeled tax +# on $15,000 - $533 of optional sales tax = $14,467 of taxable income. +# New Jersey taxable income is $15,000 - $1,000 - $3,000 = $11,000, so +# the match is $1,050 × 50% = $525. - name: New Jersey's 2018 limit counts one qualifying individual from annual ages period: 2018 input: @@ -210,6 +262,8 @@ output: count_cdcc_eligible: 1 nj_cdcc_qualifying_individuals: 1 + taxable_income: 14_467 + income_tax_before_credits: 1_545.54 cdcc: 1_050 nj_taxable_income: 11_000 nj_cdcc: 500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml index c52507cdd07..f7f275d2106 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml @@ -140,3 +140,23 @@ nj_income_tax: -39.60 nj_non_refundable_credits: 0 nj_refundable_credits: 300 + +# Worksheet H compares $350 without the deduction with $349 after deducting +# $100. The $1 saving is less than the $50 property tax credit. +# The $50 refund reduces the $350 liability to $300. +- name: New Jersey refunds the property tax credit in 2018 + period: 2018 + input: + state_code: NJ + filing_status: SINGLE + age: 40 + nj_agi: 25_000 + nj_taxable_income_before_property_tax_deduction: 24_000 + real_estate_taxes: 100 + output: + nj_property_tax_deduction: 0 + nj_property_tax_credit: 50 + nj_non_refundable_credits: 0 + nj_refundable_credits: 50 + state_refundable_credits: 50 + nj_income_tax: 300 diff --git a/policyengine_us/tests/test_nj_cdcc_dependencies.py b/policyengine_us/tests/test_nj_cdcc_dependencies.py new file mode 100644 index 00000000000..9df0f271f2c --- /dev/null +++ b/policyengine_us/tests/test_nj_cdcc_dependencies.py @@ -0,0 +1,33 @@ +import pytest + +from policyengine_us import Simulation + + +@pytest.mark.parametrize( + "year, expected_credit, reads_count", + [(2017, 0, False), (2020, 500, True), (2021, 1_050, False)], +) +def test_nj_cdcc_reads_form_2441_count_only_when_the_limit_applies( + year, expected_credit, reads_count +): + simulation = Simulation( + situation={ + "people": {"person": {}}, + "tax_units": { + "tax_unit": { + "members": ["person"], + "nj_taxable_income": {year: 20_000}, + "cdcc": {year: 2_100}, + "nj_cdcc_qualifying_individuals": {year: 1}, + } + }, + "households": { + "household": {"members": ["person"], "state_code": {year: "NJ"}} + }, + }, + trace=True, + ) + + assert simulation.calculate("nj_cdcc", year)[0] == expected_credit + dependencies = {node.name for node in simulation.tracer.trees[-1].children} + assert ("nj_cdcc_qualifying_individuals" in dependencies) == reads_count diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py index 8c27481d833..1ccf3c66db6 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py @@ -1,6 +1,12 @@ from policyengine_us.model_api import * +def _matched_credit(tax_unit, period, rates): + taxable_income = tax_unit("nj_taxable_income", period) + federal_cdcc = tax_unit("cdcc", period) + return federal_cdcc * rates.calc(taxable_income, right=True) + + class nj_cdcc(Variable): value_type = float entity = TaxUnit @@ -9,30 +15,26 @@ class nj_cdcc(Variable): unit = USD definition_period = YEAR reference = ( - "https://www.state.nj.us/treasury/taxation/pdf/current/1040i.pdf#page=44" + "https://pub.njleg.gov/bills/2018/PL18/45_.PDF#page=5", + "https://pub.njleg.gov/bills/2020/PL21/308_.PDF#page=1", ) defined_for = StateCode.NJ - def formula(tax_unit, period, parameters): + def formula_2018(tax_unit, period, parameters): p = parameters(period).gov.states.nj.tax.income.credits.cdcc + credit = _matched_credit(tax_unit, period, p.rate) - # Get NJ taxable income - taxable_income = tax_unit("nj_taxable_income", period) - - # Get federal CDCC - # New Jersey matches the actual federal credit value - federal_cdcc = tax_unit("cdcc", period) - - # Calculate NJ CDCC - rate = p.rate.calc(taxable_income, right=True) - - # Worksheet J limits the credit by the number of qualifying individuals - # in 2018 through 2020. + # Worksheet J caps the full-year credit before proration. maximum = where( tax_unit("nj_cdcc_qualifying_individuals", period) >= 2, p.maximum.two_or_more_qualifying_individuals, p.maximum.one_qualifying_individual, ) - - # Calculate total NJ CDCC - return min_(federal_cdcc * rate, maximum) + months = tax_unit("nj_cdcc_residency_months", period) + return min_(credit, maximum) * (months / MONTHS_IN_YEAR) + + def formula_2021(tax_unit, period, parameters): + rates = parameters(period).gov.states.nj.tax.income.credits.cdcc.rate + credit = _matched_credit(tax_unit, period, rates) + months = tax_unit("nj_cdcc_residency_months", period) + return credit * (months / MONTHS_IN_YEAR) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_residency_months.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_residency_months.py new file mode 100644 index 00000000000..0757bced6a4 --- /dev/null +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_residency_months.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class nj_cdcc_residency_months(Variable): + value_type = int + entity = TaxUnit + label = "Months of New Jersey residence for the child and dependent care credit" + documentation = ( + "Number of New Jersey residency months for the child and dependent care " + "credit, from 0 to 12. Count a partial month of 15 days or more. " + "Defaults to a full year." + ) + unit = "month" + default_value = MONTHS_IN_YEAR + definition_period = YEAR + defined_for = StateCode.NJ + reference = ( + # N.J.S.A. 54A:4-17(d). + "https://pub.njleg.gov/bills/2018/PL18/45_.PDF#page=5", + "https://pub.njleg.gov/bills/2020/PL21/308_.PDF#page=1", + ) From 7a71cd8c97605aa14da00b1b9852fa26dbdea443 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 1 Dec 2026 07:06:08 +0000 Subject: [PATCH 8/8] Correct New Jersey dependent care eligibility and property tax elections Co-Authored-By: GPT-6.2 Sol --- .../history-nj-property-tax-limit.fixed.md | 2 +- .../nj/tax/income/credits/cdcc/nj_cdcc.yaml | 48 +++++++++++++++++ .../states/nj/tax/income/nj_income_tax.yaml | 41 ++++++++++++-- .../income/adjusted_gross_income/nj_agi.py | 14 +++-- .../nj/tax/income/credits/cdcc/nj_cdcc.py | 53 +++++++++++++------ .../cdcc/nj_cdcc_full_year_taxable_income.py | 31 +++++++++++ .../nj_taking_property_tax_deduction.py | 38 ++++++++++--- 7 files changed, 194 insertions(+), 33 deletions(-) create mode 100644 policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_full_year_taxable_income.py diff --git a/changelog.d/history-nj-property-tax-limit.fixed.md b/changelog.d/history-nj-property-tax-limit.fixed.md index f534a52ade4..dd1c66df56f 100644 --- a/changelog.d/history-nj-property-tax-limit.fixed.md +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -1 +1 @@ -Corrected New Jersey's historical property tax deduction caps, floored rent and property tax payments at zero, and applied the nonrefundable child and dependent care credit and its $500 and $1,000 limits for 2018–2020. Prorated the credit for part-year residents and included it in TAXSIM from 2018. +Corrected New Jersey's historical property tax deduction caps and floored qualifying payments at zero. Applied the nonrefundable child and dependent care credit and its dollar limits for 2018–2020. Compared the property tax deduction and credit after applying the historical care credit. Bounded residency proration, floored the federal credit used in the match at zero, checked full-year income for part-year eligibility from 2022, and included the care credit in TAXSIM from 2018. diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index f2e614051f1..f2cb0964e92 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml @@ -302,3 +302,51 @@ nj_taxable_income: 11_000 nj_cdcc: 750 taxsim_state_cdcc: 750 + +# Full-year taxable income is $170,000 - $1,000 = $169,000, above $150,000. +# Using the resident return for eligibility would give $600 × 40% × 6/12 = $120. +- name: Part-year care credit uses full-year income for eligibility in 2022 + period: 2022 + input: &part_year_high_income + state_code: NJ + filing_status: SINGLE + employment_income: 170_000 + nj_agi: 42_500 + nj_taxable_income: 40_000 + cdcc: 600 + nj_cdcc_residency_months: 6 + output: &no_part_year_credit + nj_cdcc: 0 + taxsim_state_cdcc: 0 + nj_cdcc_full_year_taxable_income: 169_000 + +- name: Part-year care credit uses full-year income for eligibility in 2025 + period: 2025 + input: *part_year_high_income + output: *no_part_year_credit + +# $150,000 qualifies and $150,001 does not. At $40,000 on the resident +# return, the eligible filer receives $600 × 40% × 6/12 = $120. +- name: Supplied full-year taxable income controls part-year care credit eligibility + period: 2025 + input: + state_code: [NJ, NJ] + nj_taxable_income: [40_000, 40_000] + nj_cdcc_full_year_taxable_income: [150_000, 150_001] + cdcc: [600, 600] + nj_cdcc_residency_months: [6, 6] + output: + nj_cdcc: [120, 0] + taxsim_state_cdcc: [120, 0] + +# A $600 × 50% = $300 match prorates by 0/12 and 12/12 at the bounds. +- name: Out of range New Jersey residency months cannot make a negative or oversized credit + period: 2021 + input: + state_code: [NJ, NJ] + nj_taxable_income: [30_000, 30_000] + cdcc: [600, 600] + nj_cdcc_residency_months: [-1, 13] + output: + nj_cdcc: [0, 300] + taxsim_state_cdcc: [0, 300] diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml index f7f275d2106..62fe422601f 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml @@ -93,9 +93,9 @@ # Qualifying payments are max(-$3,200, $0) + 18% × $30,000 = $5,400. # The deduction leaves $24,000 - $5,400 = $18,600 of taxable income. -# Tax table savings of $350 - $261 = $89 exceed the $50 property tax credit. -# The model's rate schedule gives $18,600 × 1.4% = $260.40 of liability. -# The tentative credit is $600 × 50% = $300. Through 2020, tax is floored at $0. +# The $260.40 tax on the deduction route is offset by $600 × 50% = $300. +# The credit route leaves $350 - ($600 × 40%) - $50 = $60 in tax. +# The deduction leaves $0 after the nonrefundable care credit. - name: New Jersey dependent care credit cannot refund excess in 2018 period: 2018 absolute_error_margin: 0.01 @@ -160,3 +160,38 @@ nj_refundable_credits: 50 state_refundable_credits: 50 nj_income_tax: 300 + +# $30,000 × 18% = $5,400 potential deduction. Tax before credits is +# $19,500 × 1.4% = $273 without it and $14,100 × 1.4% = $197.40 with it. +# The $600 × 50% = $300 care credit offsets either liability. The property +# tax credit gives a $50 refund, so the filer takes it. +- name: Historical nonrefundable care credit changes the property tax election + period: 2018 + absolute_error_margin: 0.01 + input: + state_code: NJ + filing_status: SINGLE + nj_agi: 22_000 + nj_taxable_income_before_property_tax_deduction: 19_500 + rent: 30_000 + cdcc: 600 + nj_cdcc_qualifying_individuals: 1 + nj_eitc: 0 + output: + nj_income_tax: -50 + nj_property_tax_deduction: 0 + nj_property_tax_credit: 50 + +# A negative federal override gives a $0 match. Tax is $20,000 × 1.4% = $280. +- name: Negative supplied federal credit cannot raise New Jersey liability + period: 2020 + input: + state_code: NJ + filing_status: SINGLE + nj_agi: 22_500 + nj_taxable_income: 20_000 + cdcc: -600 + output: + nj_cdcc: 0 + taxsim_state_cdcc: 0 + nj_income_tax: 280 diff --git a/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_agi.py b/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_agi.py index ee6c9ca48ef..244aaab6e06 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_agi.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_agi.py @@ -1,6 +1,14 @@ from policyengine_us.model_api import * +def nj_agi_from_income(tax_unit, period, parameters): + # A dependent's income goes on the dependent's own return. + total_income = tax_unit_non_dep_add(tax_unit, period, ["nj_total_income"]) + p = parameters(period).gov.states.nj.tax.income + exclusions = add(tax_unit, period, p.all_exclusions) + return max_(0, total_income - exclusions) + + class nj_agi(Variable): value_type = float entity = TaxUnit @@ -26,8 +34,4 @@ class nj_agi(Variable): defined_for = StateCode.NJ def formula(tax_unit, period, parameters): - # A dependent's income goes on the dependent's own return. - total_income = tax_unit_non_dep_add(tax_unit, period, ["nj_total_income"]) - p = parameters(period).gov.states.nj.tax.income - exclusions = add(tax_unit, period, p.all_exclusions) - return max_(0, total_income - exclusions) + return nj_agi_from_income(tax_unit, period, parameters) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py index 1ccf3c66db6..acb1def8ca2 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py @@ -1,12 +1,29 @@ from policyengine_us.model_api import * -def _matched_credit(tax_unit, period, rates): - taxable_income = tax_unit("nj_taxable_income", period) - federal_cdcc = tax_unit("cdcc", period) +def _matched_credit(tax_unit, period, rates, taxable_income): + federal_cdcc = max_(tax_unit("cdcc", period), 0) return federal_cdcc * rates.calc(taxable_income, right=True) +def _residency_months(tax_unit, period): + return np.clip(tax_unit("nj_cdcc_residency_months", period), 0, MONTHS_IN_YEAR) + + +def historical_cdcc(tax_unit, period, p, taxable_income): + credit = _matched_credit(tax_unit, period, p.rate, taxable_income) + + # Worksheet J caps the full-year credit before proration. + maximum = where( + tax_unit("nj_cdcc_qualifying_individuals", period) >= 2, + p.maximum.two_or_more_qualifying_individuals, + p.maximum.one_qualifying_individual, + ) + return min_(credit, maximum) * ( + _residency_months(tax_unit, period) / MONTHS_IN_YEAR + ) + + class nj_cdcc(Variable): value_type = float entity = TaxUnit @@ -22,19 +39,23 @@ class nj_cdcc(Variable): def formula_2018(tax_unit, period, parameters): p = parameters(period).gov.states.nj.tax.income.credits.cdcc - credit = _matched_credit(tax_unit, period, p.rate) - - # Worksheet J caps the full-year credit before proration. - maximum = where( - tax_unit("nj_cdcc_qualifying_individuals", period) >= 2, - p.maximum.two_or_more_qualifying_individuals, - p.maximum.one_qualifying_individual, - ) - months = tax_unit("nj_cdcc_residency_months", period) - return min_(credit, maximum) * (months / MONTHS_IN_YEAR) + taxable_income = tax_unit("nj_taxable_income", period) + return historical_cdcc(tax_unit, period, p, taxable_income) def formula_2021(tax_unit, period, parameters): rates = parameters(period).gov.states.nj.tax.income.credits.cdcc.rate - credit = _matched_credit(tax_unit, period, rates) - months = tax_unit("nj_cdcc_residency_months", period) - return credit * (months / MONTHS_IN_YEAR) + taxable_income = tax_unit("nj_taxable_income", period) + credit = _matched_credit(tax_unit, period, rates, taxable_income) + return credit * (_residency_months(tax_unit, period) / MONTHS_IN_YEAR) + + def formula_2022(tax_unit, period, parameters): + rates = parameters(period).gov.states.nj.tax.income.credits.cdcc.rate + taxable_income = tax_unit("nj_taxable_income", period) + months = _residency_months(tax_unit, period) + full_year_income = tax_unit("nj_cdcc_full_year_taxable_income", period) + # Worksheet J uses the resident return to set the match rate. + eligible = (months == MONTHS_IN_YEAR) | ( + rates.calc(full_year_income, right=True) > 0 + ) + credit = _matched_credit(tax_unit, period, rates, taxable_income) + return eligible * credit * (months / MONTHS_IN_YEAR) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_full_year_taxable_income.py b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_full_year_taxable_income.py new file mode 100644 index 00000000000..78df578d5af --- /dev/null +++ b/policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc_full_year_taxable_income.py @@ -0,0 +1,31 @@ +from policyengine_us.model_api import * +from policyengine_us.variables.gov.states.nj.tax.income.adjusted_gross_income.nj_agi import ( + nj_agi_from_income, +) + + +class nj_cdcc_full_year_taxable_income(Variable): + value_type = float + entity = TaxUnit + label = "Full-year taxable income for New Jersey dependent care credit eligibility" + documentation = ( + "Supply full-year New Jersey taxable income when filing a part-year " + "return. The default estimates it from annual income, modeled " + "deductions and exemptions, with resident-return taxable income as " + "a fallback when annual income inputs are incomplete." + ) + unit = USD + definition_period = YEAR + defined_for = StateCode.NJ + reference = ( + "https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2022/1040i.pdf#page=44", + "https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf#page=46", + ) + + def formula(tax_unit, period, parameters): + annual_agi = nj_agi_from_income(tax_unit, period, parameters) + deductions = tax_unit("nj_total_deductions", period) + exemptions = tax_unit("nj_total_exemptions", period) + property_tax_deduction = tax_unit("nj_property_tax_deduction", period) + estimated_income = annual_agi - deductions - exemptions - property_tax_deduction + return max_(tax_unit("nj_taxable_income", period), estimated_income) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py index 9bda5c4618b..0d06fcea8bc 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py @@ -1,4 +1,14 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.states.nj.tax.income.credits.cdcc.nj_cdcc import ( + historical_cdcc, +) + + +def _tax_after_nonrefundable_cdcc(tax_unit, period, credits, taxable_income, tax): + if "nj_cdcc" in credits.nonrefundable: + cdcc = historical_cdcc(tax_unit, period, credits.cdcc, taxable_income) + return max_(0, tax - cdcc) + return tax class nj_taking_property_tax_deduction(Variable): @@ -8,14 +18,14 @@ class nj_taking_property_tax_deduction(Variable): unit = USD definition_period = YEAR reference = ( - "https://law.justia.com/codes/new-jersey/2022/title-54a/section-54a-3a-17/" + "https://www.nj.gov/treasury/taxation/pdf/other_forms/tgi-ee/2018/1040i.pdf#page=33", + "https://pub.njleg.gov/bills/2018/PL18/45_.PDF#page=5", ) defined_for = "nj_property_tax_deduction_eligible" def formula(tax_unit, period, parameters): - p = parameters(period).gov.states.nj.tax.income.main - - # follows NJ-1040 form Worksheet H + income = parameters(period).gov.states.nj.tax.income + p = income.main deduction = tax_unit("nj_potential_property_tax_deduction", period) # calculate taxes without deduction @@ -63,12 +73,24 @@ def formula(tax_unit, period, parameters): ) # calculate credit amount - credit_amount = parameters( - period - ).gov.states.nj.tax.income.credits.property_tax.amount + credit_amount = income.credits.property_tax.amount separate = filing_status == status.SEPARATE cohabitating = tax_unit("cohabitating_spouses", period) credit_amount = credit_amount / (1 + separate * cohabitating) - # choose between taxable income deduction and refundable credit + # Compare both liabilities after the historical nonrefundable care credit. + taxes_without_deduction = _tax_after_nonrefundable_cdcc( + tax_unit, + period, + income.credits, + taxable_income_before_deduction, + taxes_without_deduction, + ) + taxes_with_deduction = _tax_after_nonrefundable_cdcc( + tax_unit, + period, + income.credits, + taxable_income_after_deduction, + taxes_with_deduction, + ) return (taxes_without_deduction - taxes_with_deduction) > credit_amount