From dbfd5d0406c05f330c5e905816c90de86276a5a2 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 00:09:32 -0500 Subject: [PATCH 1/7] Drop remaining dependent amounts under the state exemption repeal Apply the Delaware personal credit cap and use the same dependent credit count for Filing Status 4 allocation and credit amounts. Remove the remaining Michigan, Massachusetts and Indiana dependent exemptions when filers enable the repeal. Co-Authored-By: GPT-6.2 Sol --- ...repeal-dep-exemptions-de-mi-ma-in.fixed.md | 1 + .../state_dependent_exemptions/README.md | 78 ++-- .../repeal_state_dependent_exemptions.py | 14 +- .../repeal_state_dependent_exemptions.yaml | 348 ++++++++++++++++++ .../de_dependent_personal_credit_units.py | 23 ++ .../personal/de_personal_credit_indv.py | 3 +- .../income/de_combined_separate_credits.py | 3 +- .../ma_part_b_dependent_exemption.py | 20 + .../ma_part_b_taxable_income_exemption.py | 3 +- .../exemptions/mi_dependent_exemptions.py | 28 ++ .../mi/tax/income/exemptions/mi_exemptions.py | 6 +- 11 files changed, 473 insertions(+), 54 deletions(-) create mode 100644 changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md create mode 100644 policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py create mode 100644 policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_dependent_exemption.py create mode 100644 policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_dependent_exemptions.py diff --git a/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md b/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md new file mode 100644 index 00000000000..b16c072ceae --- /dev/null +++ b/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md @@ -0,0 +1 @@ +Under the contributed repeal, remove Delaware's dependent personal credits, Michigan's filing-exception dependent exemptions, Massachusetts's Part B dependent exemption and Indiana's qualifying-child exemption. diff --git a/policyengine_us/reforms/state_dependent_exemptions/README.md b/policyengine_us/reforms/state_dependent_exemptions/README.md index aade9a629c4..b9d3bff3d43 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/README.md +++ b/policyengine_us/reforms/state_dependent_exemptions/README.md @@ -1,39 +1,39 @@ -The following adjustments have been made in this reform: -Alabama: Neutralize dependent exemptions -California: Remove the dependent exemption structure from `ca_exemptions` -Georgia: Remove the dependent exemption structure from `ga_exemptions` -Hawaii: Change the `exemptions_count` to `head_spouse_count` -Illinois: Neutralize dependent exemptions -Indiana: Change the `tax_unit_size` to `head_spouse_count` -Iowa: Remove the dependent exemption structure from `ia_exemption_credit` -Kansas: Remove the dependents from the exemption count -Louisiana: Neutralize dependent exemptions -Maryland: Change the `tax_unit_size` to `head_spouse_count` -Massachusetts: Remove the dependent exemption structure from `ma_income_tax_exemption_threshold` -Michigan: Change the `tax_unit_size` to `head_spouse_count` -Minnesota: Neutralize dependent exemptions -Mississippi: Neutralize dependent exemptions -Montana: Neutralize the dependent exemptions person -Nebraska: Change the `tax_unit_size` to `head_spouse_count` -New Jersey: Neutralize dependent exemptions -New Mexico: Neutralize the deduction for certain dependents -New York: Neutralize dependent exemptions -North Carolina: Neutralize the child deduction -Ohio: Remove `is_tax_unit_dependent` from the exemption eligibility criteria -Oklahoma: Remove the dependents from the total exemptions -Rhode Island: Change the `exemptions_count` to `head_spouse_count` -South Carolina: Neutralize dependent exemptions -Utah: Neutralize the personal exemption amount -Vermont: Remove the dependents from the personal exemptions -Virginia: Only apply the personal exemptions to the head and spouse -West Virginia: Change the `tax_unit_size` to `head_spouse_count` -Wisconsin: Change the `tax_unit_size` to `head_spouse_count` -Arizona: Neutralize dependent exemptions -Arkansas: Neutralize dependent exemptions -Delaware: Change the `tax_unit_size` to `head_spouse_count` -Idaho: Neutralize dependent exemptions CTC -Iowa: Change the `tax_unit_size` to `head_spouse_count` -Kentucky: Change the `tax_unit_size` in family_size to `head_spouse_count` -Maine: Neutralize dependent exemptions -Nebraska: Change the `tax_unit_size` to `head_spouse_count` -Oklahoma: Remove CTC portion and update return +# Repeal of state dependent exemptions + +When you enable the reform, PolicyEngine makes these changes. + +- In Alabama, remove the dependent exemption. +- In Arizona, remove the dependent tax credit. +- In Arkansas, remove the dependent personal credit. +- In California, keep eligible personal, blind and senior credits and remove dependent credits. +- In Delaware, remove dependent personal credits on both joint and combined separate returns. Keep personal credits for filers who cannot be claimed on another return, subject to the credit limits. +- In Georgia, keep the personal exemption by filing status when it applies. +- In Hawaii, keep regular and aged exemptions for filers who cannot be claimed on another return. +- In Idaho, remove the child tax credit. +- In Illinois, remove the dependent exemption. +- In Indiana, keep each filer's base exemption and remove the base exemption for dependents and the additional exemption for qualifying children. +- In Iowa, count filers and the head-of-household, age and blindness additions for the exemption credit. +- In Kansas, keep the filing-status, head-of-household and veteran amounts when they apply. For years before the filing-status amounts apply, count filers who cannot be claimed on another return for the consolidated exemption. +- In Kentucky, count filers toward the family size credit threshold. +- In Louisiana, remove the dependent exemption. +- In Maine, remove the dependent exemption credit. +- In Maryland, use the filing-status count for personal exemptions, including filers who can be claimed on another return. +- In Massachusetts, exclude dependents from the no-tax-status threshold and remove their exemptions from Part B taxable income. +- In Michigan, remove dependent personal exemptions, including those a claimable filer can take under the filing exception. Keep the claimable-filer allowance and the stillbirth, disability and disabled veteran exemptions where they apply. +- In Minnesota, remove the dependent exemptions. +- In Mississippi, remove the dependent exemption. +- In Montana, remove the per-person dependent exemption. +- In Nebraska, use the filing-status count for the exemption credit, including filers who can be claimed on another return. +- In New Jersey, remove the dependent exemption. +- In New Mexico, remove the deduction for certain dependents. +- In New York, remove the child dependent exemptions. +- In North Carolina, remove the child deduction. +- In Ohio, limit the personal exemption to filers who cannot be claimed on another return. +- In Oklahoma, keep the regular exemptions for filers who cannot be claimed on another return and retain the age and blindness additions. Use the child care share for the combined child care and child tax credit. +- In Rhode Island, apply the income reduction to exemptions for filers who cannot be claimed on another return. +- In South Carolina, remove the dependent exemption. +- In Utah, remove the dependent exemption amount from the taxpayer credit calculation. +- In Vermont, count the head and, on a joint return, the spouse when they cannot be claimed on another return. +- In Virginia, keep the regular personal exemption for filers who cannot be claimed on another return. +- In West Virginia, give each claimable filer the $500 base amount and each other filer the regular amount. Apply the $500 fallback when the unit has no eligible or claimable filer. +- In Wisconsin, keep the base exemption for filers who cannot be claimed on another return. diff --git a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py index 94b10442a0f..07396c62e65 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py +++ b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py @@ -447,7 +447,7 @@ def formula(tax_unit, period, parameters): ) return own_exemptions * p.exemption.base - class de_personal_credit(Variable): + class de_personal_credit_potential(Variable): value_type = float entity = TaxUnit label = "Delaware personal credit" @@ -458,8 +458,10 @@ class de_personal_credit(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states.de.tax.income.credits - head_spouse_count = tax_unit("head_spouse_count", period) - return p.personal_credits.personal * head_spouse_count + own_exemptions = tax_unit( + "head_spouse_count_not_dependent_elsewhere", period + ) + return p.personal_credits.personal * own_exemptions class ky_family_size_tax_credit_threshold(Variable): value_type = float @@ -530,6 +532,10 @@ def apply(self): self.neutralize_variable("ar_personal_credit_dependent") self.neutralize_variable("id_ctc") self.neutralize_variable("me_dependent_exemption_credit") + self.neutralize_variable("de_dependent_personal_credit_units") + self.neutralize_variable("mi_dependent_exemptions") + self.neutralize_variable("ma_part_b_dependent_exemption") + self.neutralize_variable("in_additional_exemptions") self.update_variable(hi_regular_exemptions) self.update_variable(md_total_personal_exemptions) self.update_variable(mi_personal_exemptions) @@ -547,7 +553,7 @@ def apply(self): self.update_variable(ma_income_tax_exemption_threshold) self.update_variable(wi_base_exemption) self.update_variable(ia_exemption_credit) - self.update_variable(de_personal_credit) + self.update_variable(de_personal_credit_potential) self.update_variable(ky_family_size_tax_credit_threshold) self.update_variable(ok_child_care_child_tax_credit) diff --git a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml index 94c5ac00b47..f6c8489633c 100644 --- a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml +++ b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml @@ -1003,3 +1003,351 @@ tax_units: {tax_unit: {members: [person_b, person_a, child], filing_status: JOINT}} households: {household: {members: [person_b, person_a, child], state_name: KS}} output: {ks_exemptions: 2_250} + +- name: DE excludes a claimable single filer from the personal credit + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 22 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + is_tax_unit_head: true + tax_units: + unit: {members: [head]} + households: + house: {members: [head], state_code: DE} + output: + de_personal_credit: 0 + +- name: DE allows one personal credit when the spouse can be claimed + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 40 + employment_income: 60_000 + is_tax_unit_head: true + spouse: + age: 40 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1]} + households: + house: {members: [head, spouse, child1], state_code: DE} + output: + de_personal_credit: 110 + +- name: DE allows one personal credit when the head can be claimed + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 40 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + is_tax_unit_head: true + spouse: + age: 40 + employment_income: 60_000 + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1]} + households: + house: {members: [head, spouse, child1], state_code: DE} + output: + de_personal_credit: 110 + +- name: DE caps the personal credit at the tax the filer owes + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 30 + employment_income: 2_000 + is_tax_unit_head: true + tax_units: + unit: {members: [head]} + households: + house: {members: [head], state_code: DE} + output: + de_personal_credit_potential: 110 + de_personal_credit: 0 + +- name: DE Filing Status 4 credits the two filers and excludes their children + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 40 + employment_income: 60_000 + is_tax_unit_head: true + spouse: + age: 40 + employment_income: 40_000 + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + child2: + age: 8 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1, child2]} + households: + house: {members: [head, spouse, child1, child2], state_code: DE} + output: + de_files_separately: true + de_personal_credit_indv: [110, 110, 0, 0] + de_income_tax: 4_196.25 + +- name: DE gives the child care credit to the spouse with enough tax after personal credits + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 60 + employment_income: 18_000 + is_tax_unit_head: true + spouse: + age: 40 + employment_income: 18_000 + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + child2: + age: 8 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1, child2], cdcc: 400, eitc: 0} + households: + house: {members: [head, spouse, child1, child2], state_code: DE} + output: + de_files_separately: true + de_personal_credit_indv: [110, 110, 0, 0] + de_cdcc_indv: [0, 200, 0, 0] + de_income_tax: 448 + +- name: MI keeps the claimable filer allowance and drops the dependent exemption under the filing exception + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 28 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + dependent_claimant_filing_exception: true + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1]} + households: + house: {members: [head, child1], state_code: MI} + output: + mi_exemptions: 1_500 + +- name: MI keeps the claimable filer allowance when the filing exception does not apply + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 28 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1]} + households: + house: {members: [head, child1], state_code: MI} + output: + mi_exemptions: 1_500 + +- name: MI keeps the claimable filer allowance and disabled veteran exemption + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 28 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + dependent_claimant_filing_exception: true + is_service_connected_disabled_veteran: true + is_fully_disabled_service_connected_veteran: false + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1]} + households: + house: {members: [head, child1], state_code: MI} + output: + mi_exemptions: 2_000 + +- name: MA omits the dependent exemption from Part B income + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 30 + employment_income: 40_000 + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1], filing_status: HEAD_OF_HOUSEHOLD} + households: + house: {members: [head, child1], state_code: MA} + output: + ma_part_b_taxable_income_exemption: 6_800 + +- name: MA deducts the dependent exemption from Part B income with the repeal off + period: 2025 + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: false + people: + head: + age: 30 + employment_income: 40_000 + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1], filing_status: HEAD_OF_HOUSEHOLD} + households: + house: {members: [head, child1], state_code: MA} + output: + ma_part_b_taxable_income_exemption: 7_800 + +- name: IN removes the additional exemption for a qualifying child + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 30 + employment_income: 40_000 + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1]} + households: + house: {members: [head, child1], state_code: IN} + output: + in_additional_exemptions: 0 + +- name: IN keeps the additional exemption for a qualifying child with the repeal off + period: 2025 + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: false + people: + head: + age: 30 + employment_income: 40_000 + is_tax_unit_head: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, child1]} + households: + house: {members: [head, child1], state_code: IN} + output: + in_additional_exemptions: 1_500 + +- name: VT keeps one personal exemption when the spouse can be claimed + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 40 + employment_income: 60_000 + is_tax_unit_head: true + spouse: + age: 40 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1]} + households: + house: {members: [head, spouse, child1], state_code: VT} + output: + vt_personal_exemptions: 5_300 + +- name: VT keeps one personal exemption when the head can be claimed + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 40 + employment_income: 40_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + is_tax_unit_head: true + spouse: + age: 40 + employment_income: 60_000 + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1]} + households: + house: {members: [head, spouse, child1], state_code: VT} + output: + vt_personal_exemptions: 5_300 diff --git a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py new file mode 100644 index 00000000000..31191c1499e --- /dev/null +++ b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py @@ -0,0 +1,23 @@ +from policyengine_us.model_api import * + + +class de_dependent_personal_credit_units(Variable): + value_type = int + entity = TaxUnit + label = "Delaware dependent personal credit units for combined separate filing" + unit = USD + definition_period = YEAR + reference = ( + "https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8", + "https://delcode.delaware.gov/title30/c011/sc02/index.html#1110", + ) + documentation = ( + "Spouses who file a Delaware combined separate return can split these " + "personal credits for dependents between their columns." + ) + defined_for = StateCode.DE + + def formula(tax_unit, period, parameters): + total_units = tax_unit("exemptions_count", period) + own_units = tax_unit("head_spouse_count_not_dependent_elsewhere", period) + return max_(total_units - own_units, 0) diff --git a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py index e8e3ece0bbc..53d88650057 100644 --- a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py +++ b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py @@ -34,8 +34,7 @@ def formula(person, period, parameters): spouse_own = where( person.tax_unit("spouse_is_dependent_elsewhere", period), 0, credit_per ) - own_units = person.tax_unit("head_spouse_count_not_dependent_elsewhere", period) - dep_units = max_(person.tax_unit("exemptions_count", period) - own_units, 0) + dep_units = person.tax_unit("de_dependent_personal_credit_units", period) head_dep, _, _ = de_combined_separate_credit_choices( person.tax_unit, period, parameters ) diff --git a/policyengine_us/variables/gov/states/de/tax/income/de_combined_separate_credits.py b/policyengine_us/variables/gov/states/de/tax/income/de_combined_separate_credits.py index d986015006d..fe27e168951 100644 --- a/policyengine_us/variables/gov/states/de/tax/income/de_combined_separate_credits.py +++ b/policyengine_us/variables/gov/states/de/tax/income/de_combined_separate_credits.py @@ -49,8 +49,7 @@ def column(values): eitc = tax_unit("de_non_refundable_eitc_potential", period) head_own = where(tax_unit("head_is_dependent_elsewhere", period), 0, credit_per) spouse_own = where(tax_unit("spouse_is_dependent_elsewhere", period), 0, credit_per) - own_units = tax_unit("head_spouse_count_not_dependent_elsewhere", period) - dep_units = max_(tax_unit("exemptions_count", period) - own_units, 0) + dep_units = tax_unit("de_dependent_personal_credit_units", period) # Max (d1684) retains the CDCC tie election (rulespec-us#1607) and selects # the statutory EITC rule: 1117(b) and PIT-RSS Schedule II line 12 compare diff --git a/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_dependent_exemption.py b/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_dependent_exemption.py new file mode 100644 index 00000000000..e2423c42869 --- /dev/null +++ b/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_dependent_exemption.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class ma_part_b_dependent_exemption(Variable): + value_type = float + entity = TaxUnit + label = "MA Part B dependent exemption" + unit = USD + definition_period = YEAR + documentation = "Calculate the Part B exemption for the tax unit's dependents." + reference = ( + "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleIX/Chapter62/Section3", + "https://www.mass.gov/info-details/personal-income-tax-exemptions", + ) + defined_for = StateCode.MA + + def formula(tax_unit, period, parameters): + tax = parameters(period).gov.states.ma.tax.income + count_dependents = tax_unit("tax_unit_dependents", period) + return tax.exemptions.dependent * count_dependents diff --git a/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_taxable_income_exemption.py b/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_taxable_income_exemption.py index cd25881d475..dc3626c94ce 100644 --- a/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_taxable_income_exemption.py +++ b/policyengine_us/variables/gov/states/ma/tax/income/taxable_income/ma_part_b_taxable_income_exemption.py @@ -30,8 +30,7 @@ def formula(tax_unit, period, parameters): count_aged = tax_unit.sum(~dependent & (age >= tax.exemptions.aged.age)) aged_exemption = tax.exemptions.aged.amount * count_aged # (3): Dependent exemptions. - count_dependents = tax_unit("tax_unit_dependents", period) - dependent_exemption = tax.exemptions.dependent * count_dependents + dependent_exemption = tax_unit("ma_part_b_dependent_exemption", period) # (4): Medical expense deduction for itemizers. itemizes = tax_unit("tax_unit_itemizes", period) federal_medical_expense_deduction = tax_unit( diff --git a/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_dependent_exemptions.py b/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_dependent_exemptions.py new file mode 100644 index 00000000000..3ebf006f1a5 --- /dev/null +++ b/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_dependent_exemptions.py @@ -0,0 +1,28 @@ +from policyengine_us.model_api import * + + +class mi_dependent_exemptions(Variable): + value_type = float + entity = TaxUnit + label = "Michigan dependent exemptions" + defined_for = StateCode.MI + unit = USD + definition_period = YEAR + documentation = ( + "Calculate the personal exemption amount for dependents the tax unit can claim." + ) + reference = ( + "https://www.legislature.mi.gov/Laws/MCL?objectName=mcl-206-30", + "https://www.legislature.mi.gov/Publications/TaxpayerGuide.pdf", + "https://www.michigan.gov/taxes/-/media/Project/Websites/taxes/Forms/IIT/TY2025/MI-1040-Book.pdf#page=10", + "https://www.irs.gov/pub/irs-prior/p501--2025.pdf#page=11", + ) + + def formula(tax_unit, period, parameters): + p = parameters(period).gov.states.mi.tax.income.exemptions + filers = add(tax_unit, period, ["is_tax_unit_head_or_spouse"]) + dependent_taxpayer = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + own_dependents = max_(tax_unit("tax_unit_size", period) - filers, 0) + return where(dependent_taxpayer, 0, own_dependents) * p.personal diff --git a/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_exemptions.py b/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_exemptions.py index 74b9a5bd459..22352025561 100644 --- a/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_exemptions.py +++ b/policyengine_us/variables/gov/states/mi/tax/income/exemptions/mi_exemptions.py @@ -56,11 +56,7 @@ def formula(tax_unit, period, parameters): ) * p.personal dependent_filer_exemptions = dependent_filers * p.dependent_on_other_return - dependent_taxpayer = tax_unit( - "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period - ) - own_dependents = max_(tax_unit("tax_unit_size", period) - filers, 0) - dependent_exemptions = where(dependent_taxpayer, 0, own_dependents) * p.personal + dependent_exemptions = tax_unit("mi_dependent_exemptions", period) # Total exemptions return ( From a75574d8fe1c8738ccb38b500a873ff45128fffa Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 00:09:33 -0500 Subject: [PATCH 2/7] Compare the repeal with baseline returns without dependents Reuse the reform system to check Delaware credits and tax and Michigan, Massachusetts and Indiana exemptions. Co-Authored-By: GPT-6.2 Sol --- ...claimable_filer_hi_va_repeal_invariants.py | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/policyengine_us/tests/core/test_claimable_filer_hi_va_repeal_invariants.py b/policyengine_us/tests/core/test_claimable_filer_hi_va_repeal_invariants.py index 0df4065abad..54cca9a6b74 100644 --- a/policyengine_us/tests/core/test_claimable_filer_hi_va_repeal_invariants.py +++ b/policyengine_us/tests/core/test_claimable_filer_hi_va_repeal_invariants.py @@ -19,6 +19,9 @@ baseline. 3. No claimable filer gets a Virginia personal exemption under the repeal, and no dependent does. + +We also compare Delaware credits and tax and Michigan, Massachusetts and +Indiana exemptions against the baseline for the same filers without dependents. """ from itertools import product @@ -146,6 +149,8 @@ def _situation(units, year, with_dependents=True): ("families", "family"), ): groups[group][f"{prefix}_{i}"] = {"members": members} + for name, value in unit.get("tax_unit_inputs", {}).items(): + groups["tax_units"][f"tax_unit_{i}"][name] = {year: value} groups["households"][f"household_{i}"] = { "members": members, "state_code": {year: unit["state"]}, @@ -223,3 +228,89 @@ def test_hi_va_repeal_grid(year, repeal_system): @given(year=st.sampled_from(YEARS), units=st.lists(returns(), min_size=6, max_size=12)) def test_hi_va_repeal_generated_returns(year, units, repeal_system): check_repeal(units, year, repeal_system) + + +def _four_state_grid(): + adult = {"age": 40, "employment_income": 80_000} + older_adult = {"age": 70, "employment_income": 40_000, "is_blind": True} + low_wage_adult = {"age": 40, "employment_income": 1_000} + veteran = {**adult, "is_service_connected_disabled_veteran": True} + children = [{"age": 5}, {"age": 8}] + stillbirth = {"tax_unit_stillborn_children": 1} + returns = [ + ("DE", [adult], {}), + ("DE", [adult, older_adult], {}), + ("DE", [adult, low_wage_adult], {}), + ("MI", [veteran], stillbirth), + ("MI", [older_adult, veteran], stillbirth), + # Hold the Massachusetts filing status fixed when removing dependents. + ("MA", [adult], {"ma_filing_status": "HEAD_OF_HOUSEHOLD"}), + ("MA", [adult, older_adult], {"ma_filing_status": "JOINT"}), + ("IN", [adult], {}), + ("IN", [adult, older_adult], {}), + ] + units = [] + for state, filers, tax_unit_inputs in returns: + for flags in product(CLAIM_STATES.values(), repeat=len(filers)): + claimable, claimed, exception = zip(*flags) + units.append( + { + "state": state, + "adults": filers, + "dependents": children, + "claimable": claimable, + "claimed": claimed, + "exception": exception, + "tax_unit_inputs": tax_unit_inputs, + } + ) + return units + + +def test_four_state_repeal_matches_baseline_without_dependents(repeal_system): + year = 2025 + units = _four_state_grid() + repeal = Simulation( + situation=_situation(units, year), tax_benefit_system=repeal_system + ) + baseline = Simulation(situation=_situation(units, year, with_dependents=False)) + states = np.array([unit["state"] for unit in units]) + tax_unit_outputs = { + "DE": ("de_personal_credit_potential", "de_personal_credit", "de_income_tax"), + "MI": ("mi_personal_exemptions", "mi_exemptions"), + "MA": ("ma_part_b_taxable_income_exemption",), + "IN": ("in_additional_exemptions", "in_exemptions"), + } + for state, outputs in tax_unit_outputs.items(): + own_state = states == state + assert own_state.any(), state + for name in outputs: + np.testing.assert_allclose( + _calc(repeal, name, year)[own_state], + _calc(baseline, name, year)[own_state], + atol=TOLERANCE, + rtol=0, + equal_nan=False, + err_msg=name, + ) + + # The two situations retain the filers in the same order. + de_repeal = ( + repeal.calculate("state_code", year, map_to="person", decode_enums=True) == "DE" + ) + de_baseline = ( + baseline.calculate("state_code", year, map_to="person", decode_enums=True) + == "DE" + ) + assert de_repeal.any() and de_baseline.any() + filer = _calc(repeal, "is_tax_unit_head_or_spouse", year) > 0 + credit = _calc(repeal, "de_personal_credit_indv", year) + np.testing.assert_allclose( + credit[de_repeal & filer], + _calc(baseline, "de_personal_credit_indv", year)[de_baseline], + atol=TOLERANCE, + rtol=0, + equal_nan=False, + err_msg="de_personal_credit_indv", + ) + assert not credit[de_repeal & ~filer].any() From a7c1615a231b712c36257ef87ac6f224aef40d06 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 00:09:34 -0500 Subject: [PATCH 3/7] Record the Delaware personal credit claimability readings Follow federal exemption entitlement under the Delaware statute and record the alternative reading of the return instructions. Co-Authored-By: GPT-6.2 Sol --- source_conflicts/candidates.yaml | 33 +++++++++++++++++++ .../sources/de-code-30-1110-b-1.txt | 4 +++ .../sources/de-pit-res-2025-line-27a.txt | 5 +++ 3 files changed, 42 insertions(+) create mode 100644 source_conflicts/sources/de-code-30-1110-b-1.txt create mode 100644 source_conflicts/sources/de-pit-res-2025-line-27a.txt diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 4d499b9986a..8482e1d8c92 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -2782,6 +2782,39 @@ candidates: note: 'PE-US follows the statute: a filer whose federal AGI equals the limit keeps the subtraction, and the limit''s comment reads the statute as barring only AGI "greater than" the limit (de_529_plan_subtraction.py, de_529_plan_subtraction_joint.py, plan_529/agi_limit.yaml). Verify instruction coverage from 2022 onward.' +- id: us-de:personal-credit-claimable-filer + program: income-tax + years: + from: 2025 + to: 2025 + type: tax + question: Does Delaware deny a personal credit when another taxpayer can claim the filer or when that taxpayer lists + the filer as a dependent? + sources: + - kind: statute + citation: 30 Del. C. § 1110(b)(1) + url: https://delcode.delaware.gov/title30/c011/sc02/index.html#1110 + - kind: statute + citation: 26 U.S.C. § 151(d)(2) and (d)(5)(B) + url: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/pdf/USCODE-2024-title26-subtitleA-chap1-subchapB-partV-sec151.pdf + - kind: instructions + citation: Delaware 2025 PIT-RES instructions, Line 27a + url: https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8 + readings: + statute: Apply the federal personal exemption eligibility test and deny the credit when another taxpayer can claim + the filer. + other: Apply the instructions' listing test and deny the credit when another taxpayer lists the filer. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_potential.py + - policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py + - policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10134 + state: unreviewed + note: The instructions expressly address a filer listed on another return. Applying the listing test to an unlisted + filer implies that they can take the credit. The baseline and the contributed repeal use federal eligibility. - id: us-de:eitc-combined-separate-spouse-routing program: income-tax years: diff --git a/source_conflicts/sources/de-code-30-1110-b-1.txt b/source_conflicts/sources/de-code-30-1110-b-1.txt new file mode 100644 index 00000000000..0e67c0ae551 --- /dev/null +++ b/source_conflicts/sources/de-code-30-1110-b-1.txt @@ -0,0 +1,4 @@ +Source: https://delcode.delaware.gov/title30/c011/sc02/index.html#1110 +Extraction: HTML text, 30 Del. C. § 1110(b)(1), whitespace normalized. + +$110 for each personal exemption to which such individual is entitled for the taxable year for federal income tax purposes; diff --git a/source_conflicts/sources/de-pit-res-2025-line-27a.txt b/source_conflicts/sources/de-pit-res-2025-line-27a.txt new file mode 100644 index 00000000000..f66610a495b --- /dev/null +++ b/source_conflicts/sources/de-pit-res-2025-line-27a.txt @@ -0,0 +1,5 @@ +Source: https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8 +Extraction: pdftotext, PDF page 8, Line 27a note, line breaks joined. + +You are not entitled to a Delaware Personal Credit if you are listed +as a dependent on another individual’s Federal return. From 50eb28ba1b3aceff5002d7aef1f7ad6312a043ef Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 03:13:01 +0000 Subject: [PATCH 4/7] Test Delaware care-credit routing and label credit units Name the tied case for its equal tax result. Add a case where only the spouse can use the full credit, and label the dependent personal credit count in credits. Co-Authored-By: GPT-6.2 Sol --- .../repeal_state_dependent_exemptions.yaml | 32 ++++++++++++++++++- .../de_dependent_personal_credit_units.py | 2 +- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml index f6c8489633c..89d0b2e44b3 100644 --- a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml +++ b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml @@ -1122,7 +1122,7 @@ de_personal_credit_indv: [110, 110, 0, 0] de_income_tax: 4_196.25 -- name: DE gives the child care credit to the spouse with enough tax after personal credits +- name: DE assigns the child care credit to the spouse when either column can use it period: 2025 reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions input: @@ -1152,6 +1152,36 @@ de_cdcc_indv: [0, 200, 0, 0] de_income_tax: 448 +- name: DE assigns the child care credit to the spouse when only the spouse's column can use all of it + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: + age: 60 + employment_income: 12_500 + is_tax_unit_head: true + spouse: + age: 59 + employment_income: 12_500 + is_tax_unit_spouse: true + child1: + age: 5 + is_tax_unit_dependent: true + child2: + age: 8 + is_tax_unit_dependent: true + tax_units: + unit: {members: [head, spouse, child1, child2], cdcc: 200, eitc: 0} + households: + house: {members: [head, spouse, child1, child2], state_code: DE} + output: + de_files_separately: true + de_personal_credit_indv: [110, 110, 0, 0] + de_cdcc_indv: [0, 100, 0, 0] + de_income_tax: 33.5 + - name: MI keeps the claimable filer allowance and drops the dependent exemption under the filing exception period: 2025 reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions diff --git a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py index 31191c1499e..7cc80ee6482 100644 --- a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py +++ b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_dependent_personal_credit_units.py @@ -5,7 +5,7 @@ class de_dependent_personal_credit_units(Variable): value_type = int entity = TaxUnit label = "Delaware dependent personal credit units for combined separate filing" - unit = USD + unit = "credit" definition_period = YEAR reference = ( "https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8", From 833da57794c9694d0ecd96d1415a41797d1a53d6 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 03:13:01 +0000 Subject: [PATCH 5/7] =?UTF-8?q?Document=20Delaware=E2=80=99s=20claimable-f?= =?UTF-8?q?iler=20credit=20readings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarify that the readings cover the filer’s own credit, cite the 2021 through 2025 instructions, and link PR #11289. File the verified passages with the Delaware captures. Co-Authored-By: GPT-6.2 Sol --- source_conflicts/candidates.yaml | 31 ++++++++++++++----- .../30-del-c-1110-b-1.txt} | 2 +- .../pit-res-instructions-2025-line-27a.txt} | 5 ++- 3 files changed, 26 insertions(+), 12 deletions(-) rename source_conflicts/sources/{de-code-30-1110-b-1.txt => us-de/30-del-c-1110-b-1.txt} (66%) rename source_conflicts/sources/{de-pit-res-2025-line-27a.txt => us-de/pit-res-instructions-2025-line-27a.txt} (50%) diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 8482e1d8c92..d625b0e91cc 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -2785,11 +2785,11 @@ candidates: - id: us-de:personal-credit-claimable-filer program: income-tax years: - from: 2025 + from: 2021 to: 2025 type: tax - question: Does Delaware deny a personal credit when another taxpayer can claim the filer or when that taxpayer lists - the filer as a dependent? + question: Does Delaware deny the filer's own personal credit when another taxpayer can claim the filer or when that + taxpayer lists the filer as a dependent? sources: - kind: statute citation: 30 Del. C. § 1110(b)(1) @@ -2797,13 +2797,26 @@ candidates: - kind: statute citation: 26 U.S.C. § 151(d)(2) and (d)(5)(B) url: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/pdf/USCODE-2024-title26-subtitleA-chap1-subchapB-partV-sec151.pdf + - kind: instructions + citation: Delaware 2021 PIT-RES instructions, Line 26a + url: https://revenuefiles.delaware.gov/2021/PIT-RES_TY21_2021-01_Instructions.pdf#page=8 + - kind: instructions + citation: Delaware 2022 PIT-RES instructions, Line 26a + url: https://revenuefiles.delaware.gov/2022/PIT-RES_TY22_2022-02_Instructions.pdf#page=8 + - kind: instructions + citation: Delaware 2023 PIT-RES instructions, Line 26a + url: https://revenuefiles.delaware.gov/2023/PIT-RES_TY23_2023-01_Instructions.pdf#page=8 + - kind: instructions + citation: Delaware 2024 PIT-RES instructions, Line 27a + url: https://revenuefiles.delaware.gov/2024/PIT_2024_Forms/PIT_Instructions/PIT-RES_TY24_2024-01_Instructions.pdf#page=8 - kind: instructions citation: Delaware 2025 PIT-RES instructions, Line 27a url: https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8 readings: - statute: Apply the federal personal exemption eligibility test and deny the credit when another taxpayer can claim - the filer. - other: Apply the instructions' listing test and deny the credit when another taxpayer lists the filer. + statute: Apply the federal personal exemption eligibility test and deny the filer's own personal credit when another + taxpayer can claim the filer. + other: Apply the instructions' listing test and deny the filer's own personal credit when another taxpayer lists the + filer. pe_us: follows: statute code: @@ -2811,10 +2824,12 @@ candidates: - policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py - policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py prs: - - https://github.com/PolicyEngine/policyengine-us/pull/10134 + - https://github.com/PolicyEngine/policyengine-us/pull/11289 state: unreviewed note: The instructions expressly address a filer listed on another return. Applying the listing test to an unlisted - filer implies that they can take the credit. The baseline and the contributed repeal use federal eligibility. + filer implies that they can take the credit. The baseline and the contributed repeal use federal eligibility. The + years give the instruction editions checked, 2021 to 2025; the statute's entitlement test has no end year. Captures + of § 1110(b)(1) and the 2025 Line 27a note are in source_conflicts/sources/us-de/. - id: us-de:eitc-combined-separate-spouse-routing program: income-tax years: diff --git a/source_conflicts/sources/de-code-30-1110-b-1.txt b/source_conflicts/sources/us-de/30-del-c-1110-b-1.txt similarity index 66% rename from source_conflicts/sources/de-code-30-1110-b-1.txt rename to source_conflicts/sources/us-de/30-del-c-1110-b-1.txt index 0e67c0ae551..91f40f73f36 100644 --- a/source_conflicts/sources/de-code-30-1110-b-1.txt +++ b/source_conflicts/sources/us-de/30-del-c-1110-b-1.txt @@ -1,4 +1,4 @@ Source: https://delcode.delaware.gov/title30/c011/sc02/index.html#1110 -Extraction: HTML text, 30 Del. C. § 1110(b)(1), whitespace normalized. +30 Del. C. § 1110(b)(1), fetched 2026-11-29. Text extracted from the HTML, whitespace normalized. $110 for each personal exemption to which such individual is entitled for the taxable year for federal income tax purposes; diff --git a/source_conflicts/sources/de-pit-res-2025-line-27a.txt b/source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt similarity index 50% rename from source_conflicts/sources/de-pit-res-2025-line-27a.txt rename to source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt index f66610a495b..e4c36ea6044 100644 --- a/source_conflicts/sources/de-pit-res-2025-line-27a.txt +++ b/source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt @@ -1,5 +1,4 @@ Source: https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8 -Extraction: pdftotext, PDF page 8, Line 27a note, line breaks joined. +Delaware 2025 PIT-RES instructions, PDF page 8, Line 27a note, fetched 2026-11-29. Text extracted with pdftotext, line breaks joined. -You are not entitled to a Delaware Personal Credit if you are listed -as a dependent on another individual’s Federal return. +You are not entitled to a Delaware Personal Credit if you are listed as a dependent on another individual’s Federal return. From 6bbab7796e637d9b3e2e3085cbde195e0daeeefc Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 17:13:20 +0000 Subject: [PATCH 6/7] Honor repeal start years and remove Indiana adoption exemptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the four states’ repeal formulas in active years and preserve the general repeal when the Massachusetts exemption reform is also installed. Record hashes for the Delaware source captures. Co-Authored-By: GPT-6.2 Sol --- ...repeal-dep-exemptions-de-mi-ma-in.fixed.md | 2 +- .../state_dependent_exemptions/README.md | 2 +- .../repeal_state_dependent_exemptions.py | 68 ++++++-- .../ma_dependent_exemption_reform.py | 13 +- .../repeal_state_dependent_exemptions.yaml | 165 ++++++++++++++++++ .../repeal_timing.py | 21 +++ .../sources/us-de/30-del-c-1110-b-1.txt | 3 +- .../pit-res-instructions-2025-line-27a.txt | 3 +- 8 files changed, 254 insertions(+), 23 deletions(-) create mode 100644 policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_timing.py diff --git a/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md b/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md index b16c072ceae..2e33c0f2461 100644 --- a/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md +++ b/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md @@ -1 +1 @@ -Under the contributed repeal, remove Delaware's dependent personal credits, Michigan's filing-exception dependent exemptions, Massachusetts's Part B dependent exemption and Indiana's qualifying-child exemption. +Removed Delaware's dependent personal credits, Michigan's filing-exception dependent exemptions, Massachusetts's Part B dependent exemption and Indiana's qualifying-child and adoption exemptions in years when the contributed repeal applies. diff --git a/policyengine_us/reforms/state_dependent_exemptions/README.md b/policyengine_us/reforms/state_dependent_exemptions/README.md index b9d3bff3d43..d85fad8811e 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/README.md +++ b/policyengine_us/reforms/state_dependent_exemptions/README.md @@ -11,7 +11,7 @@ When you enable the reform, PolicyEngine makes these changes. - In Hawaii, keep regular and aged exemptions for filers who cannot be claimed on another return. - In Idaho, remove the child tax credit. - In Illinois, remove the dependent exemption. -- In Indiana, keep each filer's base exemption and remove the base exemption for dependents and the additional exemption for qualifying children. +- In Indiana, keep each filer's base exemption and remove the base exemption for dependents, the additional exemption for qualifying children and the adoption exemption. - In Iowa, count filers and the head-of-household, age and blindness additions for the exemption credit. - In Kansas, keep the filing-status, head-of-household and veteran amounts when they apply. For years before the filing-status amounts apply, count filers who cannot be claimed on another return for the consolidated exemption. - In Kentucky, count filers toward the family size credit threshold. diff --git a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py index 07396c62e65..3f23101ab12 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py +++ b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py @@ -5,7 +5,20 @@ ) -def create_repeal_state_dependent_exemptions() -> Reform: +def create_repeal_state_dependent_exemptions(*, activate=False) -> Reform: + def repeal_in_effect(parameters, period): + return parameters( + period + ).gov.contrib.repeal_state_dependent_exemptions.in_effect + + def repeal_dependent_amount(variable): + def formula(tax_unit, period, parameters): + if repeal_in_effect(parameters, period): + return 0 + return variable.get_formula(period)(tax_unit, period, parameters) + + return type(variable.name, (Variable,), {"formula": formula}) + class hi_regular_exemptions(Variable): value_type = float entity = TaxUnit @@ -68,12 +81,15 @@ class mi_personal_exemptions(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states.mi.tax.income.exemptions - - # Personal Exemptions & Stillborn Exemptions + count = ( + "head_spouse_count" + if repeal_in_effect(parameters, period) + else "tax_unit_size" + ) exemptions = add( tax_unit, period, - ["head_spouse_count", "tax_unit_stillborn_children"], + [count, "tax_unit_stillborn_children"], ) return exemptions * p.personal @@ -335,7 +351,12 @@ class in_base_exemptions(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states["in"].tax.income.exemptions - return tax_unit("head_spouse_count", period) * p.base.amount + count = ( + "head_spouse_count" + if repeal_in_effect(parameters, period) + else "tax_unit_size" + ) + return tax_unit(count, period) * p.base.amount class ia_exemption_credit(Variable): value_type = float @@ -421,7 +442,16 @@ def formula(tax_unit, period, parameters): exempt_status.personal_exemption_added[filing_status] * tax.exemptions.personal[filing_status] ) - return exempt_status.base[filing_status] + personal_exemptions_added + threshold = exempt_status.base[filing_status] + personal_exemptions_added + if repeal_in_effect(parameters, period): + return threshold + dependents = tax_unit("tax_unit_dependents", period) + return ( + threshold + + exempt_status.dependent_exemption_added[filing_status] + * dependents + * tax.exemptions.dependent + ) class wi_base_exemption(Variable): value_type = float @@ -458,10 +488,12 @@ class de_personal_credit_potential(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states.de.tax.income.credits - own_exemptions = tax_unit( - "head_spouse_count_not_dependent_elsewhere", period + count = ( + "head_spouse_count_not_dependent_elsewhere" + if repeal_in_effect(parameters, period) + else "exemptions_count" ) - return p.personal_credits.personal * own_exemptions + return p.personal_credits.personal * tax_unit(count, period) class ky_family_size_tax_credit_threshold(Variable): value_type = float @@ -516,6 +548,10 @@ def formula(tax_unit, period, parameters): class reform(Reform): def apply(self): + if activate: + self.parameters.gov.contrib.repeal_state_dependent_exemptions.in_effect.update( + value=True + ) self.neutralize_variable("al_dependent_exemption") self.neutralize_variable("il_dependent_exemption") self.neutralize_variable("la_dependents_exemption") @@ -532,10 +568,14 @@ def apply(self): self.neutralize_variable("ar_personal_credit_dependent") self.neutralize_variable("id_ctc") self.neutralize_variable("me_dependent_exemption_credit") - self.neutralize_variable("de_dependent_personal_credit_units") - self.neutralize_variable("mi_dependent_exemptions") - self.neutralize_variable("ma_part_b_dependent_exemption") - self.neutralize_variable("in_additional_exemptions") + for name in ( + "de_dependent_personal_credit_units", + "mi_dependent_exemptions", + "ma_part_b_dependent_exemption", + "in_additional_exemptions", + "in_adoption_exemption", + ): + self.update_variable(repeal_dependent_amount(self.get_variable(name))) self.update_variable(hi_regular_exemptions) self.update_variable(md_total_personal_exemptions) self.update_variable(mi_personal_exemptions) @@ -564,7 +604,7 @@ def create_repeal_state_dependent_exemptions_reform( parameters, period, bypass: bool = False ): if bypass: - return create_repeal_state_dependent_exemptions() + return create_repeal_state_dependent_exemptions(activate=True) p = parameters.gov.contrib.repeal_state_dependent_exemptions diff --git a/policyengine_us/reforms/states/ma/dependent_exemption/ma_dependent_exemption_reform.py b/policyengine_us/reforms/states/ma/dependent_exemption/ma_dependent_exemption_reform.py index 70b61302732..e745bd38008 100644 --- a/policyengine_us/reforms/states/ma/dependent_exemption/ma_dependent_exemption_reform.py +++ b/policyengine_us/reforms/states/ma/dependent_exemption/ma_dependent_exemption_reform.py @@ -13,8 +13,9 @@ class ma_part_b_taxable_income_exemption(Variable): defined_for = StateCode.MA def formula(tax_unit, period, parameters): - tax = parameters(period).gov.states.ma.tax.income - pc = parameters(period).gov.contrib.states.ma.dependent_exemption + gov = parameters(period).gov + tax = gov.states.ma.tax.income + pc = gov.contrib.states.ma.dependent_exemption person = tax_unit.members filing_status = tax_unit("ma_filing_status", period) # (B)(b): Exemptions. @@ -37,7 +38,10 @@ def formula(tax_unit, period, parameters): # is installed for the whole simulation whenever it activates in # any year of the lookahead window, so this per-period gate prevents # the reform amount leaking into pre-activation years. - if pc.in_effect: + if ( + pc.in_effect + and not gov.contrib.repeal_state_dependent_exemptions.in_effect + ): if pc.age_limit.in_effect: young = dependent & (age < pc.age_limit.threshold) else: @@ -52,8 +56,7 @@ def formula(tax_unit, period, parameters): reform_amount * count_young + tax.exemptions.dependent * count_older ) else: - count_dependents = tax_unit("tax_unit_dependents", period) - dependent_exemption = tax.exemptions.dependent * count_dependents + dependent_exemption = tax_unit("ma_part_b_dependent_exemption", period) # (4): Medical expense deduction for itemizers. itemizes = tax_unit("tax_unit_itemizes", period) federal_medical_expense_deduction = tax_unit( diff --git a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml index 89d0b2e44b3..61aecf81001 100644 --- a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml +++ b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml @@ -1381,3 +1381,168 @@ house: {members: [head, spouse, child1], state_code: VT} output: vt_personal_exemptions: 5_300 + +- name: MA keeps its dependent exemption up to the repeal start + period: 2025 + reforms: &starts_2026 policyengine_us.tests.policy.contrib.state_dependent_exemptions.repeal_timing.Starts2026 + input: &ma_future + people: + filer: {age: {2025: 35, 2026: 36}, employment_income: {2025: 40_000, 2026: 40_000}} + child: {age: {2025: 5, 2026: 6}} + tax_units: + unit: {members: [filer, child], filing_status: {2025: HEAD_OF_HOUSEHOLD, 2026: HEAD_OF_HOUSEHOLD}} + households: + home: {members: [filer, child], state_code: {2025: MA, 2026: MA}} + output: + # $6,800 personal plus $1,000 for the child in 2025 and $0 in 2026. + ma_part_b_taxable_income_exemption: {2025: 7_800, 2026: 6_800} + # $7,600 base plus $6,800 personal plus the same dependent amount. + ma_income_tax_exemption_threshold: {2025: 15_400, 2026: 14_400} + +- name: IN keeps its qualifying-child exemption up to the repeal start + period: 2025 + reforms: *starts_2026 + input: + <<: *ma_future + tax_units: {unit: {members: [filer, child]}} + households: + home: {members: [filer, child], state_code: {2025: IN, 2026: IN}} + output: + # In 2025, the child adds $1,000 to the base and another $1,500. + # In 2026, only the filer's $1,000 base exemption remains. + in_additional_exemptions: {2025: 1_500, 2026: 0} + in_exemptions: {2025: 3_500, 2026: 1_000} + +- name: MA repeal applies before and after the separate MA reform starts + period: 2025 + reforms: policyengine_us.tests.policy.contrib.state_dependent_exemptions.repeal_timing.RepealNowMassachusettsLater + input: *ma_future + output: + # $6,800 personal plus $0 for the child in both years. The general + # repeal also removes the $2,000 amount the MA reform sets from 2026. + ma_part_b_taxable_income_exemption: {2025: 6_800, 2026: 6_800} + +- name: DE and MI keep their dependent amounts up to the repeal start + period: 2025 + reforms: *starts_2026 + input: + people: + a: {age: {2025: 40, 2026: 41}, employment_income: {2025: 60_000, 2026: 60_000}} + b: {age: {2025: 40, 2026: 41}, employment_income: {2025: 40_000, 2026: 40_000}} + c: {age: {2025: 5, 2026: 6}} + d: + age: {2025: 28, 2026: 29} + employment_income: {2025: 40_000, 2026: 40_000} + claimable_as_dependent_on_another_return: {2025: true, 2026: true} + dependent_claimant_filing_exception: {2025: true, 2026: true} + e: {age: {2025: 5, 2026: 6}} + f: {age: {2025: 35, 2026: 36}, employment_income: {2025: 40_000, 2026: 40_000}} + g: {age: {2025: 5, 2026: 6}} + tax_units: + de_unit: {members: [a, b, c]} + mi_claimable: {members: [d, e]} + mi_regular: {members: [f, g]} + households: + de_home: {members: [a, b, c], state_code: {2025: DE, 2026: DE}} + mi_claimable_home: {members: [d, e], state_code: {2025: MI, 2026: MI}} + mi_regular_home: {members: [f, g], state_code: {2025: MI, 2026: MI}} + output: + tax_units: + de_unit: + # $110 each for two filers and one child in 2025, then two filers in 2026. + de_dependent_personal_credit_units: {2025: 1, 2026: 0} + de_personal_credit_potential: {2025: 330, 2026: 220} + mi_claimable: + # $1,500 filer allowance plus $5,800 for the child in 2025 and $0 in 2026. + mi_dependent_exemptions: {2025: 5_800, 2026: 0} + mi_exemptions: {2025: 7_300, 2026: 1_500} + mi_regular: + # Two $5,800 exemptions in 2025 and one $5,900 exemption in 2026. + mi_exemptions: {2025: 11_600, 2026: 5_900} + +- name: IN repeal removes the exemption for an adopted dependent + period: 2025 + reforms: &repeal_active policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + parent: {age: 35, employment_income: 40_000, is_tax_unit_head: true} + child: {age: 5, is_tax_unit_dependent: true, adopted_this_year: true} + tax_units: {unit: {members: [parent, child]}} + households: {home: {members: [parent, child], state_code: IN}} + output: + # $1,000 for the filer plus $0 in base, additional and adoption exemptions for the child. + in_exemptions: 1_000 + in_adoption_exemption: 0 + # $40,000 wages less $1,000 in exemptions. + in_agi: 39_000 + +- name: DE Status 4 uses the higher remaining-tax column for nonrefundable EITC + period: 2025 + reforms: *repeal_active + input: &de_care_eitc + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + a: {age: 60, employment_income: 18_000} + b: {age: 59, employment_income: 18_000} + c: {age: 5} + d: {age: 8} + tax_units: {unit: {members: [a, b, c, d], cdcc: 400, eitc: 1_000}} + households: {home: {members: [a, b, c, d], state_code: DE}} + output: + de_files_separately: true + # 20% of $1,000 is $200, more than $45 refundable. After credits + # other than EITC, the two columns owe $269 and $179. Apply the $200 + # credit to $269, for ($269 - $200) + $179 = $248. + de_non_refundable_eitc_potential: 200 + de_income_tax: 248 + +- name: DE care example elects pooled filing with calculated federal EITC + period: 2025 + reforms: *repeal_active + absolute_error_margin: 0.01 + input: + <<: *de_care_eitc + tax_units: {unit: {members: [a, b, c, d], cdcc: 400}} + output: + # $7,152 maximum less 21.06% of ($36,000 - $30,470). + eitc: 5_987.38 + de_files_separately: false + # 20% of $5,987.38 is $1,197.48, enough to offset the pooled balance. + de_income_tax: 0 + +- name: DE applies the personal credit up to the remaining tax + period: 2025 + reforms: *repeal_active + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + a: {age: 35} + b: {age: 35} + tax_units: + exact: {members: [a], de_income_tax_before_non_refundable_credits_unit: 110} + below: {members: [b], de_income_tax_before_non_refundable_credits_unit: 75} + households: + exact_home: {members: [a], state_code: DE} + below_home: {members: [b], state_code: DE} + output: + # Each filer qualifies for $110. The liability cap gives + # min($110, $110) = $110 and min($110, $75) = $75. + de_personal_credit_potential: [110, 110] + de_personal_credit: [110, 75] + +- name: MI repeal retains the stillbirth and blind dependent exemptions + period: 2025 + reforms: *repeal_active + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + filer: {age: 35, employment_income: 40_000} + child: {age: 5, is_blind: true} + tax_units: + unit: {members: [filer, child], tax_unit_stillborn_children: 1} + households: + home: {members: [filer, child], state_code: MI} + output: + # $5,800 for the filer + $5,800 for a stillbirth + $3,400 for blindness. + mi_exemptions: 15_000 diff --git a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_timing.py b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_timing.py new file mode 100644 index 00000000000..f2f06b6fdf8 --- /dev/null +++ b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_timing.py @@ -0,0 +1,21 @@ +from policyengine_core.reforms import Reform +from policyengine_us.reforms import create_structural_reforms_from_parameters + + +class Starts2026(Reform): + def apply(self): + self.parameters.gov.contrib.repeal_state_dependent_exemptions.in_effect.update( + start="2026-01-01", value=True + ) + create_structural_reforms_from_parameters(self.parameters, "2025").apply(self) + + +class RepealNowMassachusettsLater(Reform): + def apply(self): + self.parameters.gov.contrib.repeal_state_dependent_exemptions.in_effect.update( + start="2025-01-01", value=True + ) + ma = self.parameters.gov.contrib.states.ma.dependent_exemption + ma.in_effect.update(start="2026-01-01", value=True) + ma.amount.update(start="2026-01-01", value=2_000) + create_structural_reforms_from_parameters(self.parameters, "2025").apply(self) diff --git a/source_conflicts/sources/us-de/30-del-c-1110-b-1.txt b/source_conflicts/sources/us-de/30-del-c-1110-b-1.txt index 91f40f73f36..ff58c0fb82e 100644 --- a/source_conflicts/sources/us-de/30-del-c-1110-b-1.txt +++ b/source_conflicts/sources/us-de/30-del-c-1110-b-1.txt @@ -1,4 +1,5 @@ Source: https://delcode.delaware.gov/title30/c011/sc02/index.html#1110 -30 Del. C. § 1110(b)(1), fetched 2026-11-29. Text extracted from the HTML, whitespace normalized. +30 Del. C. § 1110(b)(1), fetched 2026-11-30. Text extracted from the HTML, whitespace normalized. +HTML SHA256: 7a336a49f12f9deb685a088634974c34df460487e553b6c4f4f84ed0a3bd62f5 $110 for each personal exemption to which such individual is entitled for the taxable year for federal income tax purposes; diff --git a/source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt b/source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt index e4c36ea6044..30c7f35dc20 100644 --- a/source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt +++ b/source_conflicts/sources/us-de/pit-res-instructions-2025-line-27a.txt @@ -1,4 +1,5 @@ Source: https://revenuefiles.delaware.gov/2025/PITForms_Instructions/Instructions/PIT-RES_Instructions_2025-01.pdf#page=8 -Delaware 2025 PIT-RES instructions, PDF page 8, Line 27a note, fetched 2026-11-29. Text extracted with pdftotext, line breaks joined. +Delaware 2025 PIT-RES instructions, PDF page 8, Line 27a note, fetched 2026-11-30. Text extracted with pdftotext, line breaks joined. +PDF SHA256: b8b1dc59b9ce12b406e12a21533de0b72e5adde33f4a672859914660b08768b8 You are not entitled to a Delaware Personal Credit if you are listed as a dependent on another individual’s Federal return. From 61fa7e69ff9f837eaa9ecd0d33d448f4066ea18f Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 1 Dec 2026 06:04:46 +0000 Subject: [PATCH 7/7] Report Delaware EITC for the selected filing status Co-Authored-By: GPT-6.2 Sol --- ...repeal-dep-exemptions-de-mi-ma-in.fixed.md | 2 +- .../repeal_state_dependent_exemptions.yaml | 39 +++++++++++++++++-- .../de/tax/income/credits/eitc/de_eitc.py | 8 +++- ..._tax_before_refundable_credits_separate.py | 34 ++++++++-------- 4 files changed, 60 insertions(+), 23 deletions(-) diff --git a/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md b/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md index 2e33c0f2461..b78c553af50 100644 --- a/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md +++ b/changelog.d/repeal-dep-exemptions-de-mi-ma-in.fixed.md @@ -1 +1 @@ -Removed Delaware's dependent personal credits, Michigan's filing-exception dependent exemptions, Massachusetts's Part B dependent exemption and Indiana's qualifying-child and adoption exemptions in years when the contributed repeal applies. +Removed Delaware's dependent personal credits, Michigan's filing-exception dependent exemptions, Massachusetts's Part B dependent exemption and Indiana's qualifying-child and adoption exemptions in years when the contributed repeal applies and corrected Delaware EITC reporting to use the credit applied on the selected return. diff --git a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml index 61aecf81001..cd45df5f9e0 100644 --- a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml +++ b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml @@ -1125,7 +1125,7 @@ - name: DE assigns the child care credit to the spouse when either column can use it period: 2025 reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions - input: + input: &de_care_table gov.contrib.repeal_state_dependent_exemptions.in_effect: true people: head: @@ -1149,6 +1149,9 @@ output: de_files_separately: true de_personal_credit_indv: [110, 110, 0, 0] + # Each column owes $489 before credits. The head owes $489 - $220, + # and the spouse owes $489 - $110 - (50% of $400). With federal EITC + # set to zero, Delaware tax is $269 + $179 = $448. de_cdcc_indv: [0, 200, 0, 0] de_income_tax: 448 @@ -1480,7 +1483,7 @@ - name: DE Status 4 uses the higher remaining-tax column for nonrefundable EITC period: 2025 reforms: *repeal_active - input: &de_care_eitc + input: gov.contrib.repeal_state_dependent_exemptions.in_effect: true people: a: {age: 60, employment_income: 18_000} @@ -1502,8 +1505,8 @@ reforms: *repeal_active absolute_error_margin: 0.01 input: - <<: *de_care_eitc - tax_units: {unit: {members: [a, b, c, d], cdcc: 400}} + <<: *de_care_table + tax_units: {unit: {members: [head, spouse, child1, child2], cdcc: 400}} output: # $7,152 maximum less 21.06% of ($36,000 - $30,470). eitc: 5_987.38 @@ -1546,3 +1549,31 @@ output: # $5,800 for the filer + $5,800 for a stillbirth + $3,400 for blindness. mi_exemptions: 15_000 + +- name: DE reports the selected Status 4 column's capped EITC + period: 2025 + reforms: *repeal_active + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + head: {age: 60, employment_income: 15_000} + spouse: {age: 59, employment_income: 15_000} + child1: {age: 5} + child2: {age: 8} + tax_units: + unit: {members: [head, spouse, child1, child2], cdcc: 200, eitc: 1_500} + households: + home: {members: [head, spouse, child1, child2], state_code: DE} + output: + de_files_separately: true + de_cdcc_indv: [100, 0, 0, 0] + # After the standard deduction, each column has $11,750 taxable and + # owes $345 before credits. Apply $110 per filer, $110 for the head's + # age and $100 in care credit (50% of $200) to the head: + # $345 - $110 - $110 - $100 = $25. The spouse owes $345 - $110 = $235. + de_income_tax_after_non_refundable_credits_indv: [25, 235, 0, 0] + de_non_refundable_eitc_potential: 300 + # Cap 20% of $1,500 at the spouse's $235. The head still owes $25. + de_income_tax: 25 + de_eitc: 235 + taxsim_state_eitc: 235 diff --git a/policyengine_us/variables/gov/states/de/tax/income/credits/eitc/de_eitc.py b/policyengine_us/variables/gov/states/de/tax/income/credits/eitc/de_eitc.py index 8d92e5b283c..d5b18cf9a22 100644 --- a/policyengine_us/variables/gov/states/de/tax/income/credits/eitc/de_eitc.py +++ b/policyengine_us/variables/gov/states/de/tax/income/credits/eitc/de_eitc.py @@ -1,4 +1,7 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.states.de.tax.income.de_income_tax_before_refundable_credits_separate import ( + de_combined_separate_eitc_and_tax, +) class de_eitc(Variable): @@ -15,6 +18,9 @@ class de_eitc(Variable): def formula(tax_unit, period, parameters): refundable_eitc = tax_unit("de_refundable_eitc", period) - non_refundable_eitc = tax_unit("de_non_refundable_eitc", period) + pooled_eitc = tax_unit("de_non_refundable_eitc", period) + separate_eitc, _ = de_combined_separate_eitc_and_tax(tax_unit, period) + files_separately = tax_unit("de_files_separately", period) + non_refundable_eitc = where(files_separately, separate_eitc, pooled_eitc) claims_refundable = tax_unit("de_claims_refundable_eitc", period) return where(claims_refundable, refundable_eitc, non_refundable_eitc) diff --git a/policyengine_us/variables/gov/states/de/tax/income/de_income_tax_before_refundable_credits_separate.py b/policyengine_us/variables/gov/states/de/tax/income/de_income_tax_before_refundable_credits_separate.py index 9544671f981..77666f03164 100644 --- a/policyengine_us/variables/gov/states/de/tax/income/de_income_tax_before_refundable_credits_separate.py +++ b/policyengine_us/variables/gov/states/de/tax/income/de_income_tax_before_refundable_credits_separate.py @@ -17,24 +17,24 @@ class de_income_tax_before_refundable_credits_separate(Variable): defined_for = StateCode.DE def formula(tax_unit, period, parameters): - # Combined separate (FS4) path: per-column non-refundable credits are - # already applied in de_income_tax_after_non_refundable_credits_indv - # (PIT-RES Line 33). This step applies Line 34 (non-refundable EITC) - # to the column with greater remaining tax, capped at that column's tax. - members = tax_unit.members - is_head = members("is_tax_unit_head", period) - is_spouse = members("is_tax_unit_spouse", period) + _, remaining_tax = de_combined_separate_eitc_and_tax(tax_unit, period) + return remaining_tax - line33 = members("de_income_tax_after_non_refundable_credits_indv", period) - head_line33 = tax_unit.sum(is_head * line33) - spouse_line33 = tax_unit.sum(is_spouse * line33) - # Apply the same remaining-tax comparison used to score each candidate - # allocation. Either recipient gives the same tax on an exact tie. - head_higher = head_line33 >= spouse_line33 +def de_combined_separate_eitc_and_tax(tax_unit, period): + """Return the applied nonrefundable EITC and the remaining Status 4 tax.""" + members = tax_unit.members + is_head = members("is_tax_unit_head", period) + is_spouse = members("is_tax_unit_spouse", period) - eitc = tax_unit("de_non_refundable_eitc_potential", period) - head_eitc = where(head_higher, min_(eitc, head_line33), 0) - spouse_eitc = where(~head_higher, min_(eitc, spouse_line33), 0) + line33 = members("de_income_tax_after_non_refundable_credits_indv", period) + head_line33 = tax_unit.sum(is_head * line33) + spouse_line33 = tax_unit.sum(is_spouse * line33) + higher_tax = max_(head_line33, spouse_line33) + lower_tax = min_(head_line33, spouse_line33) - return max_(head_line33 - head_eitc, 0) + max_(spouse_line33 - spouse_eitc, 0) + # PIT-RSS lines 12 and 17 cap the credit at the higher Line 33 balance. + potential_eitc = tax_unit("de_non_refundable_eitc_potential", period) + applied_eitc = min_(potential_eitc, higher_tax) + remaining_tax = max_(higher_tax - applied_eitc, 0) + max_(lower_tax, 0) + return applied_eitc, remaining_tax