From f5e207729c2e09880fd57034dff6486f5cbe8839 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Mon, 13 Jul 2026 10:35:56 -0400 Subject: [PATCH] Apply KY personal credits per column under combined-separate election (#9010) Under filing status 2 (married filing separately on a combined return), ky_personal_tax_credits_potential pooled each spouse's Schedule ITC Section B personal credits at the tax-unit level and capped against unit-level tax, letting a low-income spouse's credit offset the other spouse's tax. Form 740 lines 16-18 compute the credit per column with a per-column zero floor. Now caps each person's ky_personal_tax_credits_indiv at their own ky_income_tax_before_non_refundable_credits_indiv before summing. Co-Authored-By: Claude Opus 4.8 --- ...-personal-credits-per-column-9010.fixed.md | 1 + .../personal/ky_personal_tax_credits.yaml | 32 ++++++++++++++++++- .../gov/states/ky/tax/income/integration.yaml | 26 +++++++++++++++ .../ky_personal_tax_credits_potential.py | 10 ++++-- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 changelog.d/ky-personal-credits-per-column-9010.fixed.md diff --git a/changelog.d/ky-personal-credits-per-column-9010.fixed.md b/changelog.d/ky-personal-credits-per-column-9010.fixed.md new file mode 100644 index 00000000000..2de334adf52 --- /dev/null +++ b/changelog.d/ky-personal-credits-per-column-9010.fixed.md @@ -0,0 +1 @@ +Applied Kentucky personal tax credits per column under the combined-separate filing election, flooring each spouse's credit at their own column tax. diff --git a/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits.yaml index a7ae3f8e139..459db048e00 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits.yaml @@ -1,13 +1,15 @@ -- name: separate +- name: separate with ample column tax sums each spouse's own credits period: 2022 input: people: person1: ky_personal_tax_credits_indiv: 40 ky_personal_tax_credits_joint: 40 + ky_income_tax_before_non_refundable_credits_indiv: 1000000 person2: ky_personal_tax_credits_indiv: 100 ky_personal_tax_credits_joint: 50 + ky_income_tax_before_non_refundable_credits_indiv: 1000000 tax_units: tax_unit: members: @@ -23,6 +25,34 @@ state_code: KY output: ky_personal_tax_credits: 140 +- name: separate floors each spouse's credit at their own column tax + period: 2022 + input: + people: + person1: + ky_personal_tax_credits_indiv: 40 + ky_personal_tax_credits_joint: 40 + ky_income_tax_before_non_refundable_credits_indiv: 20 + person2: + ky_personal_tax_credits_indiv: 100 + ky_personal_tax_credits_joint: 50 + ky_income_tax_before_non_refundable_credits_indiv: 0 + tax_units: + tax_unit: + members: + - person1 + - person2 + ky_files_separately: true + ky_income_tax_before_non_refundable_credits_unit: 1000000 + households: + household: + members: + - person1 + - person2 + state_code: KY + output: + # Person1: min(40, 20) = 20; Person2: min(100, 0) = 0; total = 20 + ky_personal_tax_credits: 20 - name: separate period: 2022 input: diff --git a/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/integration.yaml index f985c8fb41e..b631b8724b7 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/integration.yaml @@ -426,3 +426,29 @@ state_code: KY output: ky_cdcc: 200 + +- name: KY combined-separate election floors the elderly spouse personal credit per column (taxsim 1076) + period: 2025 + absolute_error_margin: 1 + input: + people: + head: + age: 58 + employment_income: 36_269.69 + taxable_interest_income: 837.70 + spouse: + age: 66 + employment_income: 1_651.30 + taxable_interest_income: 837.70 + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_code: KY + output: + ky_files_separately: true + # 66-year-old spouse's $40 over-65 credit dies in her near-zero column + # rather than pooling into the head's column. + ky_income_tax: 1_353.50 diff --git a/policyengine_us/variables/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits_potential.py b/policyengine_us/variables/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits_potential.py index 5e4bec2077e..0c330bb2a9d 100644 --- a/policyengine_us/variables/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits_potential.py +++ b/policyengine_us/variables/gov/states/ky/tax/income/credits/personal/ky_personal_tax_credits_potential.py @@ -13,10 +13,16 @@ class ky_personal_tax_credits_potential(Variable): def formula(tax_unit, period, parameters): ky_files_separately = tax_unit("ky_files_separately", period) person = tax_unit.members - ky_personal_tax_credits_indiv = person("ky_personal_tax_credits_indiv", period) + # Under the combined-separate election, each spouse's personal credits + # offset only their own column's tax and floor at zero (Form 740 lines + # 16-18), so cap each person's credit at their own pre-credit tax + # before summing rather than pooling across columns. + indiv_credits = person("ky_personal_tax_credits_indiv", period) + indiv_tax = person("ky_income_tax_before_non_refundable_credits_indiv", period) + capped_indiv_credits = min_(indiv_credits, indiv_tax) ky_personal_tax_credits_joint = person("ky_personal_tax_credits_joint", period) return where( ky_files_separately, - tax_unit.sum(ky_personal_tax_credits_indiv), + tax_unit.sum(capped_indiv_credits), tax_unit.sum(ky_personal_tax_credits_joint), )