diff --git a/changelog.d/fix-mt-separate-filing-allocations.fixed.md b/changelog.d/fix-mt-separate-filing-allocations.fixed.md new file mode 100644 index 00000000000..fecba2684f2 --- /dev/null +++ b/changelog.d/fix-mt-separate-filing-allocations.fixed.md @@ -0,0 +1 @@ +Montana's child and dependent care expense deduction and the charitable deduction used to test federal itemization now divide a couple's amount between spouses filing separately on the same form with the itemized-deduction spouse allocation rate parameter, as the actual itemized deduction already does, rather than a hard-coded half. diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.yaml index 4cdfcd2395d..75f718aa72a 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.yaml @@ -749,3 +749,35 @@ # is not filing, you cannot qualify for this deduction." mt_child_dependent_care_expense_deduction: [0, 0] mt_child_dependent_care_expense_deduction_joint: 0 + +- name: Case 29, reforming the spouse allocation rate changes each column but not the joint deduction + period: 2022 + absolute_error_margin: 0.01 + input: + gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate: 0.25 + people: + person1: + is_tax_unit_head: true + mt_agi_indiv: 9_000 + person2: + is_tax_unit_spouse: true + mt_agi_indiv: 9_000 + person3: + age: 10 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [person1, person2, person3] + tax_unit_childcare_expenses: 2_400 + mt_agi_joint: 18_000 + households: + household: + members: [person1, person2, person3] + state_code: MT + output: + # At combined AGI 18_000 the full 2_400 expense is deductible. + # Reforming the allocation rate gives each column 2_400 * 0.25 = 600; + # the joint return still claims the full deduction. + # Columns sum to the joint amount only at the default allocation rate of 0.5. + mt_child_dependent_care_expense_deduction: [600, 600, 0] + mt_child_dependent_care_expense_deduction_joint: 2_400 diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.yaml index 291bb803808..164292cde5f 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.yaml @@ -115,3 +115,222 @@ # (2023 Form 2 instructions, p. 13), so the joint federal amount is used. deductible_mortgage_interest: [22_500, 7_500] mt_itemized_deductions_for_federal_itemization_indiv: [22_500, 7_500] + +- name: Charitable allocation agrees across separate paths at default half share + period: 2022 + absolute_error_margin: 0.01 + input: + people: + head: + age: 30 + is_tax_unit_head: true + employment_income: 2_000 + spouse: + age: 30 + is_tax_unit_spouse: true + employment_income: 2_000 + dependent: + age: 10 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [head, spouse, dependent] + households: + household: + members: [head, spouse, dependent] + state_code: MT + axes: + - - name: charitable_cash_donations + count: 3 + min: 0 + max: 800 + index: 0 + output: + # Donations of 0, 400 and 800 are below the charitable AGI cap. + # Income is below both federal taxable income and MT withholding thresholds, + # so the aggregates contain only charity; the two separate paths must agree. + charitable_deduction: [0, 400, 800] + mt_federal_income_tax_deduction_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + mt_federal_income_tax_deduction_for_federal_itemization_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + # Each spouse receives 0.5 times charity; dependents receive zero. + mt_itemized_deductions_indiv: [0, 0, 0, 200, 200, 0, 400, 400, 0] + mt_itemized_deductions_for_federal_itemization_indiv: [0, 0, 0, 200, 200, 0, 400, 400, 0] + # Joint charity remains intact regardless of the separate allocation rate. + mt_itemized_deductions_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + mt_itemized_deductions_for_federal_itemization_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + +- name: Charitable allocation agrees across separate paths at reformed share 0 + period: 2022 + absolute_error_margin: 0.01 + input: + gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate: 0 + people: + head: + age: 30 + is_tax_unit_head: true + employment_income: 2_000 + spouse: + age: 30 + is_tax_unit_spouse: true + employment_income: 2_000 + dependent: + age: 10 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [head, spouse, dependent] + households: + household: + members: [head, spouse, dependent] + state_code: MT + axes: + - - name: charitable_cash_donations + count: 3 + min: 0 + max: 800 + index: 0 + output: + # Donations of 0, 400 and 800 are below the charitable AGI cap. + # Income is below both federal taxable income and MT withholding thresholds, + # so the aggregates contain only charity; the two separate paths must agree. + charitable_deduction: [0, 400, 800] + mt_federal_income_tax_deduction_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + mt_federal_income_tax_deduction_for_federal_itemization_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + # Each spouse receives 0 times charity; dependents receive zero. + mt_itemized_deductions_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + mt_itemized_deductions_for_federal_itemization_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + # Joint charity remains intact regardless of the separate allocation rate. + mt_itemized_deductions_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + mt_itemized_deductions_for_federal_itemization_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + +- name: Charitable allocation agrees across separate paths at reformed share 0.25 + period: 2022 + absolute_error_margin: 0.01 + input: + gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate: 0.25 + people: + head: + age: 30 + is_tax_unit_head: true + employment_income: 2_000 + spouse: + age: 30 + is_tax_unit_spouse: true + employment_income: 2_000 + dependent: + age: 10 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [head, spouse, dependent] + households: + household: + members: [head, spouse, dependent] + state_code: MT + axes: + - - name: charitable_cash_donations + count: 3 + min: 0 + max: 800 + index: 0 + output: + # Donations of 0, 400 and 800 are below the charitable AGI cap. + # Income is below both federal taxable income and MT withholding thresholds, + # so the aggregates contain only charity; the two separate paths must agree. + charitable_deduction: [0, 400, 800] + mt_federal_income_tax_deduction_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + mt_federal_income_tax_deduction_for_federal_itemization_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + # Each spouse receives 0.25 times charity; dependents receive zero. + mt_itemized_deductions_indiv: [0, 0, 0, 100, 100, 0, 200, 200, 0] + mt_itemized_deductions_for_federal_itemization_indiv: [0, 0, 0, 100, 100, 0, 200, 200, 0] + # Joint charity remains intact regardless of the separate allocation rate. + mt_itemized_deductions_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + mt_itemized_deductions_for_federal_itemization_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + +- name: Charitable allocation agrees across separate paths at reformed share 0.75 + period: 2022 + absolute_error_margin: 0.01 + input: + gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate: 0.75 + people: + head: + age: 30 + is_tax_unit_head: true + employment_income: 2_000 + spouse: + age: 30 + is_tax_unit_spouse: true + employment_income: 2_000 + dependent: + age: 10 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [head, spouse, dependent] + households: + household: + members: [head, spouse, dependent] + state_code: MT + axes: + - - name: charitable_cash_donations + count: 3 + min: 0 + max: 800 + index: 0 + output: + # Donations of 0, 400 and 800 are below the charitable AGI cap. + # Income is below both federal taxable income and MT withholding thresholds, + # so the aggregates contain only charity; the two separate paths must agree. + charitable_deduction: [0, 400, 800] + mt_federal_income_tax_deduction_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + mt_federal_income_tax_deduction_for_federal_itemization_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + # Each spouse receives 0.75 times charity; dependents receive zero. + mt_itemized_deductions_indiv: [0, 0, 0, 300, 300, 0, 600, 600, 0] + mt_itemized_deductions_for_federal_itemization_indiv: [0, 0, 0, 300, 300, 0, 600, 600, 0] + # Joint charity remains intact regardless of the separate allocation rate. + mt_itemized_deductions_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + mt_itemized_deductions_for_federal_itemization_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + +- name: Charitable allocation agrees across separate paths at reformed share 1 + period: 2022 + absolute_error_margin: 0.01 + input: + gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate: 1 + people: + head: + age: 30 + is_tax_unit_head: true + employment_income: 2_000 + spouse: + age: 30 + is_tax_unit_spouse: true + employment_income: 2_000 + dependent: + age: 10 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [head, spouse, dependent] + households: + household: + members: [head, spouse, dependent] + state_code: MT + axes: + - - name: charitable_cash_donations + count: 3 + min: 0 + max: 800 + index: 0 + output: + # Donations of 0, 400 and 800 are below the charitable AGI cap. + # Income is below both federal taxable income and MT withholding thresholds, + # so the aggregates contain only charity; the two separate paths must agree. + charitable_deduction: [0, 400, 800] + mt_federal_income_tax_deduction_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + mt_federal_income_tax_deduction_for_federal_itemization_indiv: [0, 0, 0, 0, 0, 0, 0, 0, 0] + # Each spouse receives 1 times charity; dependents receive zero. + mt_itemized_deductions_indiv: [0, 0, 0, 400, 400, 0, 800, 800, 0] + mt_itemized_deductions_for_federal_itemization_indiv: [0, 0, 0, 400, 400, 0, 800, 800, 0] + # Joint charity remains intact regardless of the separate allocation rate. + mt_itemized_deductions_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] + mt_itemized_deductions_for_federal_itemization_joint: [0, 0, 0, 400, 0, 0, 800, 0, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction_indiv.yaml index a6633222517..29ec6cddef8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction_indiv.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction_indiv.yaml @@ -103,6 +103,32 @@ mt_federal_income_tax_deduction_share: [1, 0, 0] mt_federal_income_tax_deduction_indiv: [2_000, 0, 0] +- name: A spouse's negative federal AGI cannot produce a negative tax share + period: 2022 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 60_000 + person2: + age: 40 + self_employment_income: -20_000 + tax_units: + tax_unit: + members: [person1, person2] + state_filing_status_if_married_filing_separately_on_same_return: SEPARATE + households: + household: + members: [person1, person2] + state_code: MT + output: + # The spouse's federal AGI is negative. Only positive AGI draws a + # share of the couple's 1_410 federal income tax. + income_tax_before_refundable_credits: 1_410 + mt_federal_income_tax_deduction_share: [1, 0] + mt_federal_income_tax_deduction_indiv: [1_410, 0] + - name: No positive filer income retains main's zero federal tax allocation period: 2022 absolute_error_margin: 0.01 diff --git a/policyengine_us/variables/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.py b/policyengine_us/variables/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.py index 229fe2db8e6..2344514ab59 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/deductions/cdcc/mt_child_dependent_care_expense_deduction.py @@ -42,7 +42,8 @@ def formula(person, period, parameters): # line 7 in their column; an unmarried filer enters all of it. married = person.tax_unit("tax_unit_married", period) head = person("is_tax_unit_head", period) - share = where(married, head_or_spouse * 0.5, head * 1.0) + p_itemized = parameters(period).gov.states.mt.tax.income.deductions.itemized + share = where(married, head_or_spouse * p_itemized.spouse_allocation_rate, head) # Married couples must file a joint return or file separately on the # same form (MCA 15-30-2131(1)(c)(vi)(A)); a spouse filing on a # separate form cannot take the deduction. diff --git a/policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.py b/policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.py index 8bda67333ca..20150ae2602 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.py @@ -21,10 +21,12 @@ class mt_itemized_deductions_for_federal_itemization_indiv(Variable): defined_for = "mt_married_filing_separately_on_same_return_eligible" def formula(person, period, parameters): - p = parameters(period).gov.irs.deductions + p = parameters(period).gov.states.mt.tax.income.deductions.itemized # Since we only compute the federal charitable deduction at the tax unit level, # we will split the value between each spouse - charitable_deduction = person.tax_unit("charitable_deduction", period) * 0.5 + charitable_deduction = ( + person.tax_unit("charitable_deduction", period) * p.spouse_allocation_rate + ) head_or_spouse = person("is_tax_unit_head_or_spouse", period) # The interest deduction is the sum of mortagage and investment interest expenses investment_interest = person("investment_interest_expense", period)