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..dd1c66df56f --- /dev/null +++ b/changelog.d/history-nj-property-tax-limit.fixed.md @@ -0,0 +1 @@ +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/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/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/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/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/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/credits/cdcc/nj_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml index cf097e7775c..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 @@ -69,3 +69,284 @@ 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 + +# 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 + +# 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] + +# 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] + +# $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 × 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: + 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 + taxable_income: 14_467 + income_tax_before_credits: 1_545.54 + 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 + +# 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/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..a5d7cccdf9e --- /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,145 @@ +# 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. +# 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 claims the 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 + 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/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..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 @@ -90,3 +90,108 @@ 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. +# 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 + 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 + +# 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 + +# $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/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..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 @@ -31,3 +31,73 @@ 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 + +# 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_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, 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_filers + output: *nj_limited_cdcc + +- name: TAXSIM reports the limited New Jersey dependent care credit in 2020 + period: 2020 + 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_filers + output: + 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/tests/test_household_spm_resource_parity.py b/policyengine_us/tests/test_household_spm_resource_parity.py index 658bb8c52af..2b15a38d7ba 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/" 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/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 9ce3a2307c0..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,6 +1,29 @@ from policyengine_us.model_api import * +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 @@ -9,23 +32,30 @@ 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): - # Get New Jersey CDCC rate - p = parameters(period).gov.states.nj.tax.income.credits.cdcc.rate - - # Get NJ taxable income + def formula_2018(tax_unit, period, parameters): + p = parameters(period).gov.states.nj.tax.income.credits.cdcc taxable_income = tax_unit("nj_taxable_income", period) + return historical_cdcc(tax_unit, period, p, taxable_income) - # Get federal CDCC - # New Jersey matches the actual federal credit value - federal_cdcc = tax_unit("cdcc", period) - - # Calculate NJ CDCC - rate = p.calc(taxable_income, right=True) + def formula_2021(tax_unit, period, parameters): + rates = parameters(period).gov.states.nj.tax.income.credits.cdcc.rate + 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) - # Calculate total NJ CDCC - return federal_cdcc * rate + 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/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"] 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", + ) 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" 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 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