From 85f4f70ec5423127d4ae0bfb579db01f2a0753ad Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Fri, 16 Oct 2026 16:07:36 -0400 Subject: [PATCH 1/3] Subtract Massachusetts TAFDC dependent care deduction once per unit ma_tafdc_partially_disregarded_earned_income subtracted the unit's whole dependent care deduction from each member (half for each spouse on a joint return), and floored each result at zero. Two earners on separate returns deducted the cost twice, and a one-earner joint return lost half of it. 106 CMR 704.275(A) allows the unit's actual expenditure up to the maximum, after the 50% disregard. The deduction is now shared among members by their earnings after the 50% disregard, so it is subtracted once in total. Co-Authored-By: Claude Opus 5.5 --- ...9983-ma-tafdc-dependent-care-once.fixed.md | 1 + ...c_partially_disregarded_earned_income.yaml | 208 ++++++++++++++++++ ...fdc_partially_disregarded_earned_income.py | 31 ++- 3 files changed, 232 insertions(+), 8 deletions(-) create mode 100644 changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md diff --git a/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md b/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md new file mode 100644 index 00000000000..a39f3e91915 --- /dev/null +++ b/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md @@ -0,0 +1 @@ +Subtract the Massachusetts TAFDC dependent care deduction once from the unit's earnings after the 50% disregard (106 CMR 704.275(A)), sharing it among earners by their earnings, instead of subtracting it from each earner (or half of it from each spouse on a joint return). diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml index 0c856c677d3..162eaccf293 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml @@ -30,3 +30,211 @@ state_code: MA output: ma_tafdc_partially_disregarded_earned_income: 0 + +# 106 CMR 704.275(A): the dependent care deduction is made after the 50% +# disregard, and "the amount allowed for dependent care is the actual +# expenditure for dependent care ... or the maximum allowable deduction, +# whichever is less." The unit's deduction is subtracted once from the unit's +# earnings after the 50% disregard; each earner carries a share in proportion +# to their earnings after the disregard. +# In the cases below the child is age 1 and the unit works full time, so the +# maximum is $200 a month; care costs $3,000 a year ($250 a month), so the +# unit's deduction is $200 a month. + +- name: One earner on a joint return, the deduction is subtracted in full once + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 # $1,000/month + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + child: + age: 1 + tax_units: + tax_unit: + members: [parent1, parent2, child] + marital_units: + marital_unit: + members: [parent1, parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_deduction: 200 + # parent1: ($1,000 - $200 work expense) x 0.5 = $400; $400 - $200 = $200. + # Before, half of the $200 was assigned to parent2, who has no earnings, + # and was lost: $400 - $100 = $300. + ma_tafdc_partially_disregarded_earned_income: [200, 0, 0] + +- name: Two earners on separate returns, the deduction is subtracted once in total + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 8_400 # $700/month + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + employment_income_before_lsr: 8_400 # $700/month + weekly_hours_worked_before_lsr: 40 + child: + age: 1 + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_deduction: 200 + # Each: ($700 - $200) x 0.5 = $250; unit total $500 - $200 = $300, split + # $150 each (equal shares). Before, each earner had the full $200 + # subtracted: $50 each, $400 deducted for a $200 cost. + ma_tafdc_partially_disregarded_earned_income: [150, 150, 0] + +- name: Two earners with unequal earnings share the deduction by earnings + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 # $1,000/month + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + employment_income_before_lsr: 4_800 # $400/month + weekly_hours_worked_before_lsr: 40 + child: + age: 1 + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + # parent1: ($1,000 - $200) x 0.5 = $400; parent2: ($400 - $200) x 0.5 = $100. + # Unit: $500 - $200 = $300. Shares 400/500 and 100/500: + # parent1 $400 - $160 = $240; parent2 $100 - $40 = $60. + ma_tafdc_partially_disregarded_earned_income: [240, 60, 0] + +- name: Single parent with one child, unchanged + period: 2026-01 + input: + people: + parent: + age: 30 + employment_income_before_lsr: 12_000 # $1,000/month + weekly_hours_worked_before_lsr: 40 + child: + age: 1 + tax_units: + tax_unit: + members: [parent, child] + spm_units: + spm_unit: + members: [parent, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent, child] + state_code: MA + output: + # ($1,000 - $200) x 0.5 = $400; $400 - $200 = $200. + ma_tafdc_partially_disregarded_earned_income: [200, 0] + +- name: One earner on a joint return, annual grant + period: 2026 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + child: + age: 1 + tax_units: + tax_unit: + members: [parent1, parent2, child] + marital_units: + marital_unit: + members: [parent1, parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + # $200 a month after the deductions, counted for the 6 months after the + # six-month 100% disregard: $200 x 6 = $1,200. + ma_tafdc_countable_earned_income: [1_200, 0, 0] + # Payment standard $901 x 12 = $10,812; ($901 - $1,200 / 12) x 12 = $9,612, + # plus the $500 clothing allowance for the child. + ma_tafdc: 10_112 + +- name: Two earners on separate returns, annual grant + period: 2026 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 8_400 + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + employment_income_before_lsr: 8_400 + weekly_hours_worked_before_lsr: 40 + child: + age: 1 + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + # $150 a month each for the 6 months after the 100% disregard: $900 each. + ma_tafdc_countable_earned_income: [900, 900, 0] + # ($901 - $1,800 / 12) x 12 = $9,012, plus the $500 clothing allowance. + ma_tafdc: 9_512 diff --git a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py index 2518a4ce3a1..804f3af303a 100644 --- a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py +++ b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py @@ -7,7 +7,10 @@ class ma_tafdc_partially_disregarded_earned_income(Variable): entity = Person label = "Massachusetts Temporary Assistance for Families with Dependent Children (TAFDC) partially disregarded earned income" definition_period = MONTH - reference = "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-281" + reference = ( + "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-281", + "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-275", # (A) + ) defined_for = StateCode.MA def formula(person, period, parameters): @@ -20,17 +23,29 @@ def formula(person, period, parameters): earned_income_after_work_related_deduction = max_( 0, gross_earned_income - work_related_deduction ) - filing_status = person.tax_unit("filing_status", period) - joint = filing_status == filing_status.possible_values.JOINT + earned_income_after_disregard = ( + earned_income_after_work_related_deduction * p.percentage + ) + # Per 106 CMR 704.275(A), the dependent care deduction is made after the + # 50% disregard and is the unit's actual expenditure up to the maximum, + # so it is subtracted once from the unit's earnings. It is allocated to + # each member in proportion to the member's share of the unit's + # earnings after the 50% disregard, so the members' amounts add up to + # the unit's earnings after the disregard less the deduction (not less + # than zero). dependent_care_deduction = person.spm_unit( "ma_tafdc_dependent_care_deduction", period ) - # Attributing the dependent care deduction equally to each spouse if filing jointly - applicable_dependent_care_deduction = where( - joint, dependent_care_deduction / 2, dependent_care_deduction + unit_earned_income_after_disregard = person.spm_unit.sum( + earned_income_after_disregard + ) + share = np.divide( + earned_income_after_disregard, + unit_earned_income_after_disregard, + out=np.zeros_like(earned_income_after_disregard, dtype=float), + where=unit_earned_income_after_disregard > 0, ) return max_( 0, - earned_income_after_work_related_deduction * p.percentage - - applicable_dependent_care_deduction, + earned_income_after_disregard - dependent_care_deduction * share, ) From ff8655ea34837ddc7bb638bb0fcb8570f8303d3f Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Tue, 27 Oct 2026 10:56:50 -0400 Subject: [PATCH 2/3] Test MA TAFDC dependent care shares with two children and the unit floor Add two cases from review: two earners with two children and care below the per-child cap (deduction $175 + $175, shares 400/500 and 100/500), and two $300 earners whose earnings after the disregard are below the deduction. Cite 106 CMR 704.500(A) Steps 2-4 for the order. Co-Authored-By: Claude Opus 5.5 --- ...c_partially_disregarded_earned_income.yaml | 80 ++++++++++++++++++- ...fdc_partially_disregarded_earned_income.py | 13 +-- 2 files changed, 85 insertions(+), 8 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml index 162eaccf293..f92317844e8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml @@ -37,9 +37,9 @@ # whichever is less." The unit's deduction is subtracted once from the unit's # earnings after the 50% disregard; each earner carries a share in proportion # to their earnings after the disregard. -# In the cases below the child is age 1 and the unit works full time, so the -# maximum is $200 a month; care costs $3,000 a year ($250 a month), so the -# unit's deduction is $200 a month. +# Unless a case says otherwise, the child is age 1 and the unit works full +# time, so the maximum is $200 a month; care costs $3,000 a year ($250 a +# month), so the unit's deduction is $200 a month. - name: One earner on a joint return, the deduction is subtracted in full once period: 2026-01 @@ -144,6 +144,80 @@ # parent1 $400 - $160 = $240; parent2 $100 - $40 = $60. ma_tafdc_partially_disregarded_earned_income: [240, 60, 0] +- name: Two earners with two children below the cap share the deduction by earnings + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 # $1,000/month + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + employment_income_before_lsr: 4_800 # $400/month + weekly_hours_worked_before_lsr: 40 + child1: + age: 1 + child2: + age: 5 + tax_units: + tax_unit1: + members: [parent1, child1, child2] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child1, child2] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 4_200 + households: + household: + members: [parent1, parent2, child1, child2] + state_code: MA + output: + # Care is $4,200 / 12 = $350 a month, $175 for each child. Child age 1: + # min($200, $175) = $175; child age 5: min($175, $175) = $175; total $350. + ma_tafdc_dependent_care_deduction: 350 + # parent1: ($1,000 - $200) x 0.5 = $400; parent2: ($400 - $200) x 0.5 = $100. + # Unit: $500 - $350 = $150. Shares 400/500 and 100/500: + # parent1 $400 - $280 = $120; parent2 $100 - $70 = $30. + # Before, each earner had the full $350 subtracted: $50 and $0. + ma_tafdc_partially_disregarded_earned_income: [120, 30, 0, 0] + +- name: Two earners whose earnings after the disregard are below the deduction + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 3_600 # $300/month + weekly_hours_worked_before_lsr: 40 + parent2: + age: 30 + employment_income_before_lsr: 3_600 # $300/month + weekly_hours_worked_before_lsr: 40 + child: + age: 1 + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_deduction: 200 + # Each: ($300 - $200) x 0.5 = $50; unit $100 is less than the $200 + # deduction, so each member's amount is max($50 - $100, 0) = $0. + ma_tafdc_partially_disregarded_earned_income: [0, 0, 0] + - name: Single parent with one child, unchanged period: 2026-01 input: diff --git a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py index 804f3af303a..11325ad07e4 100644 --- a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py +++ b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py @@ -10,6 +10,7 @@ class ma_tafdc_partially_disregarded_earned_income(Variable): reference = ( "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-281", "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-275", # (A) + "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-500", # (A) ) defined_for = StateCode.MA @@ -28,11 +29,13 @@ def formula(person, period, parameters): ) # Per 106 CMR 704.275(A), the dependent care deduction is made after the # 50% disregard and is the unit's actual expenditure up to the maximum, - # so it is subtracted once from the unit's earnings. It is allocated to - # each member in proportion to the member's share of the unit's - # earnings after the 50% disregard, so the members' amounts add up to - # the unit's earnings after the disregard less the deduction (not less - # than zero). + # so it is subtracted once from the unit's earnings. 106 CMR 704.500(A) + # Steps 2-4 apply the work expense and the 50% disregard to each + # member, then the dependent care deduction, then total the members' + # countable earned income. The deduction is allocated to each member in + # proportion to the member's share of the unit's earnings after the 50% + # disregard, so the members' amounts add up to the unit's earnings after + # the disregard less the deduction (not less than zero). dependent_care_deduction = person.spm_unit( "ma_tafdc_dependent_care_deduction", period ) From fc73aac3937a0f986669b78042ae9f5eb32d5785 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Tue, 27 Oct 2026 18:19:41 -0400 Subject: [PATCH 3/3] Take the MA TAFDC dependent care deduction from the payer's earnings 106 CMR 704.275(A) gives the deduction to the employed applicant or client for the expenditure on care, and DTA's BEACON help applies it "as a deduction for the client incurring the expense". No source lets an unused part reduce another earner's earnings. So the unit's deduction now comes off once, from the payer's earnings after the 50% disregard, instead of being shared among earners by their earnings. The care expense input does not record who pays, so a new input, ma_tafdc_dependent_care_payer, names the payer. By default it is the head or spouse with the highest gross earnings (the first one when earnings are equal). If more than one member is set as a payer, they share the deduction equally. Tests: the reviewer's case ($400 and $100 after the disregard, $200 deduction paid by the lower earner) gives $400 and $0. Co-Authored-By: Claude Opus 5.5 --- ...9983-ma-tafdc-dependent-care-once.fixed.md | 2 +- .../ma_tafdc_dependent_care_payer.yaml | 108 +++++++++++ ...c_partially_disregarded_earned_income.yaml | 170 +++++++++++++++--- .../ma_tafdc_dependent_care_payer.py | 26 +++ ...fdc_partially_disregarded_earned_income.py | 28 +-- 5 files changed, 294 insertions(+), 40 deletions(-) create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.yaml create mode 100644 policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.py diff --git a/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md b/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md index a39f3e91915..afa48002aaa 100644 --- a/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md +++ b/changelog.d/fix-9983-ma-tafdc-dependent-care-once.fixed.md @@ -1 +1 @@ -Subtract the Massachusetts TAFDC dependent care deduction once from the unit's earnings after the 50% disregard (106 CMR 704.275(A)), sharing it among earners by their earnings, instead of subtracting it from each earner (or half of it from each spouse on a joint return). +Subtract the Massachusetts TAFDC dependent care deduction once, after the 50% disregard, from the earnings of the member who pays for the care (106 CMR 704.275(A)), instead of from each earner (or half of it from each spouse on a joint return). A new input, `ma_tafdc_dependent_care_payer`, names the payer; by default it is the head or spouse with the highest gross earnings. diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.yaml new file mode 100644 index 00000000000..2b820568200 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.yaml @@ -0,0 +1,108 @@ +# Unless a case names the payer, the payer is the head or spouse with the +# highest gross earnings, and the first such member when earnings are equal. + +- name: One earner on a joint return pays + period: 2026 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 + parent2: + age: 30 + child: + age: 1 + tax_units: + tax_unit: + members: [parent1, parent2, child] + marital_units: + marital_unit: + members: [parent1, parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_payer: [true, false, false] + +- name: The higher earner pays, even when listed second + period: 2026 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 4_800 + parent2: + age: 30 + employment_income_before_lsr: 12_000 + child: + age: 1 + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_payer: [false, true, false] + +- name: Equal earners, the first one pays + period: 2026 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 8_400 + parent2: + age: 30 + employment_income_before_lsr: 8_400 + child: + age: 1 + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_payer: [true, false, false] + +- name: A dependent teen with higher earnings is not the payer + period: 2026 + input: + people: + parent: + age: 40 + employment_income_before_lsr: 6_000 + teen: + age: 16 + employment_income_before_lsr: 9_000 + child: + age: 1 + tax_units: + tax_unit: + members: [parent, teen, child] + spm_units: + spm_unit: + members: [parent, teen, child] + households: + household: + members: [parent, teen, child] + state_code: MA + output: + ma_tafdc_dependent_care_payer: [true, false, false] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml index f92317844e8..d540a9aa964 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.yaml @@ -31,12 +31,16 @@ output: ma_tafdc_partially_disregarded_earned_income: 0 -# 106 CMR 704.275(A): the dependent care deduction is made after the 50% -# disregard, and "the amount allowed for dependent care is the actual -# expenditure for dependent care ... or the maximum allowable deduction, -# whichever is less." The unit's deduction is subtracted once from the unit's -# earnings after the 50% disregard; each earner carries a share in proportion -# to their earnings after the disregard. +# 106 CMR 704.275(A): an employed applicant or client "may receive a deduction +# from income equal to the expenditure for the care of a dependent child", made +# after the 50% disregard, and "the amount allowed for dependent care is the +# actual expenditure for dependent care ... or the maximum allowable deduction, +# whichever is less." DTA's BEACON help uses it "as a deduction for the client +# incurring the expense". The unit's deduction is subtracted once, from the +# earnings of the member who pays (ma_tafdc_dependent_care_payer). A part above +# the payer's earnings does not reduce another member's earnings. Unless a case +# names the payer, the payer is the head or spouse with the highest gross +# earnings (the first such member when earnings are equal). # Unless a case says otherwise, the child is age 1 and the unit works full # time, so the maximum is $200 a month; care costs $3,000 a year ($250 a # month), so the unit's deduction is $200 a month. @@ -70,12 +74,13 @@ state_code: MA output: ma_tafdc_dependent_care_deduction: 200 + ma_tafdc_dependent_care_payer: [true, false, false] # parent1: ($1,000 - $200 work expense) x 0.5 = $400; $400 - $200 = $200. # Before, half of the $200 was assigned to parent2, who has no earnings, # and was lost: $400 - $100 = $300. ma_tafdc_partially_disregarded_earned_income: [200, 0, 0] -- name: Two earners on separate returns, the deduction is subtracted once in total +- name: Two equal earners on separate returns, the deduction is subtracted once from the payer period: 2026-01 input: people: @@ -105,12 +110,14 @@ state_code: MA output: ma_tafdc_dependent_care_deduction: 200 - # Each: ($700 - $200) x 0.5 = $250; unit total $500 - $200 = $300, split - # $150 each (equal shares). Before, each earner had the full $200 - # subtracted: $50 each, $400 deducted for a $200 cost. - ma_tafdc_partially_disregarded_earned_income: [150, 150, 0] + # Equal earnings, so the payer is the first of the two. + ma_tafdc_dependent_care_payer: [true, false, false] + # Each: ($700 - $200) x 0.5 = $250. parent1 pays: $250 - $200 = $50; + # parent2 keeps $250. Unit total $300. Before, each earner had the full + # $200 subtracted: $50 each, $400 deducted for a $200 cost. + ma_tafdc_partially_disregarded_earned_income: [50, 250, 0] -- name: Two earners with unequal earnings share the deduction by earnings +- name: Two unequal earners, the payer is not named, so the higher earner pays period: 2026-01 input: people: @@ -139,12 +146,86 @@ members: [parent1, parent2, child] state_code: MA output: + ma_tafdc_dependent_care_payer: [true, false, false] # parent1: ($1,000 - $200) x 0.5 = $400; parent2: ($400 - $200) x 0.5 = $100. - # Unit: $500 - $200 = $300. Shares 400/500 and 100/500: - # parent1 $400 - $160 = $240; parent2 $100 - $40 = $60. - ma_tafdc_partially_disregarded_earned_income: [240, 60, 0] + # parent1 pays: $400 - $200 = $200; parent2 keeps $100. Unit total $300. + ma_tafdc_partially_disregarded_earned_income: [200, 100, 0] -- name: Two earners with two children below the cap share the deduction by earnings +- name: Two unequal earners, the lower earner pays and cannot use the whole deduction + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 # $1,000/month + weekly_hours_worked_before_lsr: 40 + ma_tafdc_dependent_care_payer: false + parent2: + age: 30 + employment_income_before_lsr: 4_800 # $400/month + weekly_hours_worked_before_lsr: 40 + ma_tafdc_dependent_care_payer: true + child: + age: 1 + ma_tafdc_dependent_care_payer: false + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + ma_tafdc_dependent_care_deduction: 200 + # parent1: $400 after the disregard; parent2: $100 after the disregard. + # parent2 pays: max($100 - $200, 0) = $0. The other $100 of the deduction + # does not reduce parent1's earnings: parent1 keeps $400. Unit total $400. + ma_tafdc_partially_disregarded_earned_income: [400, 0, 0] + +- name: Two members set as payers share the deduction equally + period: 2026-01 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 # $1,000/month + weekly_hours_worked_before_lsr: 40 + ma_tafdc_dependent_care_payer: true + parent2: + age: 30 + employment_income_before_lsr: 4_800 # $400/month + weekly_hours_worked_before_lsr: 40 + ma_tafdc_dependent_care_payer: true + child: + age: 1 + ma_tafdc_dependent_care_payer: false + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + # $200 / 2 = $100 each. parent1: $400 - $100 = $300; + # parent2: $100 - $100 = $0. Unit total $300. + ma_tafdc_partially_disregarded_earned_income: [300, 0, 0] + +- name: Two earners with two children below the cap, the higher earner pays period: 2026-01 input: people: @@ -179,10 +260,9 @@ # min($200, $175) = $175; child age 5: min($175, $175) = $175; total $350. ma_tafdc_dependent_care_deduction: 350 # parent1: ($1,000 - $200) x 0.5 = $400; parent2: ($400 - $200) x 0.5 = $100. - # Unit: $500 - $350 = $150. Shares 400/500 and 100/500: - # parent1 $400 - $280 = $120; parent2 $100 - $70 = $30. + # parent1 pays: $400 - $350 = $50; parent2 keeps $100. Unit total $150. # Before, each earner had the full $350 subtracted: $50 and $0. - ma_tafdc_partially_disregarded_earned_income: [120, 30, 0, 0] + ma_tafdc_partially_disregarded_earned_income: [50, 100, 0, 0] - name: Two earners whose earnings after the disregard are below the deduction period: 2026-01 @@ -214,9 +294,10 @@ state_code: MA output: ma_tafdc_dependent_care_deduction: 200 - # Each: ($300 - $200) x 0.5 = $50; unit $100 is less than the $200 - # deduction, so each member's amount is max($50 - $100, 0) = $0. - ma_tafdc_partially_disregarded_earned_income: [0, 0, 0] + # Each: ($300 - $200) x 0.5 = $50. parent1 pays (first of two equal + # earners): max($50 - $200, 0) = $0. The other $150 of the deduction does + # not reduce parent2's earnings: parent2 keeps $50. Unit total $50. + ma_tafdc_partially_disregarded_earned_income: [0, 50, 0] - name: Single parent with one child, unchanged period: 2026-01 @@ -279,7 +360,7 @@ # plus the $500 clothing allowance for the child. ma_tafdc: 10_112 -- name: Two earners on separate returns, annual grant +- name: Two equal earners on separate returns, annual grant period: 2026 input: people: @@ -308,7 +389,46 @@ members: [parent1, parent2, child] state_code: MA output: - # $150 a month each for the 6 months after the 100% disregard: $900 each. - ma_tafdc_countable_earned_income: [900, 900, 0] + # $50 (payer) and $250 a month for the 6 months after the 100% disregard: + # $300 and $1,500. + ma_tafdc_countable_earned_income: [300, 1_500, 0] # ($901 - $1,800 / 12) x 12 = $9,012, plus the $500 clothing allowance. ma_tafdc: 9_512 + +- name: Two unequal earners, the lower earner pays, annual grant + period: 2026 + input: + people: + parent1: + age: 30 + employment_income_before_lsr: 12_000 + weekly_hours_worked_before_lsr: 40 + ma_tafdc_dependent_care_payer: false + parent2: + age: 30 + employment_income_before_lsr: 4_800 + weekly_hours_worked_before_lsr: 40 + ma_tafdc_dependent_care_payer: true + child: + age: 1 + ma_tafdc_dependent_care_payer: false + tax_units: + tax_unit1: + members: [parent1, child] + tax_unit2: + members: [parent2] + spm_units: + spm_unit: + members: [parent1, parent2, child] + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 3_000 + households: + household: + members: [parent1, parent2, child] + state_code: MA + output: + # $400 and $0 a month for the 6 months after the 100% disregard: + # $2,400 and $0. + ma_tafdc_countable_earned_income: [2_400, 0, 0] + # ($901 - $2,400 / 12) x 12 = $8,412, plus the $500 clothing allowance. + ma_tafdc: 8_912 diff --git a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.py b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.py new file mode 100644 index 00000000000..1fc7113dcd4 --- /dev/null +++ b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/deductions/ma_tafdc_dependent_care_payer.py @@ -0,0 +1,26 @@ +from policyengine_us.model_api import * + + +class ma_tafdc_dependent_care_payer(Variable): + value_type = bool + entity = Person + label = "Pays the dependent care expenses for the Massachusetts Temporary Assistance for Families with Dependent Children (TAFDC) dependent care deduction" + definition_period = YEAR + reference = ( + "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-275", # (A) + "https://eohhs.ehs.state.ma.us/DTA/PolicyOnline/BEACON5/%21SSL%21/WebHelp/TAFDC/Employment/Emp_DepCareExTAFDC.htm", + ) + defined_for = StateCode.MA + + def formula(person, period, parameters): + # Per 106 CMR 704.275(A), an employed applicant or client receives + # the deduction for the expenditure on care, and DTA's BEACON help + # applies it as a deduction for the client incurring the expense. + # The SPM unit's care expenses do not record who pays them, so the + # payer is the head or spouse with the highest gross earnings (the + # first such member when earnings are equal). Set this variable to + # name the member who pays. + head_or_spouse = person("is_tax_unit_head_or_spouse", period) + earnings = person("ma_tcap_gross_earned_income", period) + rank = person.get_rank(person.spm_unit, -earnings, head_or_spouse) + return rank == 0 diff --git a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py index 11325ad07e4..332b205087d 100644 --- a/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py +++ b/policyengine_us/variables/gov/states/ma/dta/tcap/tafdc/income/earned/ma_tafdc_partially_disregarded_earned_income.py @@ -11,6 +11,7 @@ class ma_tafdc_partially_disregarded_earned_income(Variable): "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-281", "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-275", # (A) "https://www.law.cornell.edu/regulations/massachusetts/106-CMR-704-500", # (A) + "https://eohhs.ehs.state.ma.us/DTA/PolicyOnline/BEACON5/%21SSL%21/WebHelp/TAFDC/Employment/Emp_DepCareExTAFDC.htm", ) defined_for = StateCode.MA @@ -28,25 +29,24 @@ def formula(person, period, parameters): earned_income_after_work_related_deduction * p.percentage ) # Per 106 CMR 704.275(A), the dependent care deduction is made after the - # 50% disregard and is the unit's actual expenditure up to the maximum, - # so it is subtracted once from the unit's earnings. 106 CMR 704.500(A) - # Steps 2-4 apply the work expense and the 50% disregard to each - # member, then the dependent care deduction, then total the members' - # countable earned income. The deduction is allocated to each member in - # proportion to the member's share of the unit's earnings after the 50% - # disregard, so the members' amounts add up to the unit's earnings after - # the disregard less the deduction (not less than zero). + # 50% disregard, and an employed applicant or client receives it for + # the expenditure on care. 106 CMR 704.500(A) Steps 2-4 apply the work + # expense and the 50% disregard to each member, then the dependent + # care deduction, then total the members' countable earned income. + # The unit's deduction is subtracted once, from the earnings of the + # member who pays for the care. A part of the deduction above that + # member's earnings does not reduce another member's earnings. If more + # than one member is set as a payer, they share the deduction equally. dependent_care_deduction = person.spm_unit( "ma_tafdc_dependent_care_deduction", period ) - unit_earned_income_after_disregard = person.spm_unit.sum( - earned_income_after_disregard - ) + payer = person("ma_tafdc_dependent_care_payer", period.this_year) + payer_count = person.spm_unit.sum(payer) share = np.divide( - earned_income_after_disregard, - unit_earned_income_after_disregard, + payer.astype(float), + payer_count, out=np.zeros_like(earned_income_after_disregard, dtype=float), - where=unit_earned_income_after_disregard > 0, + where=payer_count > 0, ) return max_( 0,