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..afa48002aaa --- /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, 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 0c856c677d3..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 @@ -30,3 +30,405 @@ state_code: MA output: ma_tafdc_partially_disregarded_earned_income: 0 + +# 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. + +- 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 + 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 equal earners on separate returns, the deduction is subtracted once from the payer + 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 + # 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 unequal earners, the payer is not named, so the higher earner pays + 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: + ma_tafdc_dependent_care_payer: [true, false, false] + # parent1: ($1,000 - $200) x 0.5 = $400; parent2: ($400 - $200) x 0.5 = $100. + # parent1 pays: $400 - $200 = $200; parent2 keeps $100. Unit total $300. + ma_tafdc_partially_disregarded_earned_income: [200, 100, 0] + +- 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: + 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. + # 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: [50, 100, 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. 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 + 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 equal 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: + # $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 2518a4ce3a1..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 @@ -7,7 +7,12 @@ 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) + "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 def formula(person, period, parameters): @@ -20,17 +25,30 @@ 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 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 ) - # 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 + payer = person("ma_tafdc_dependent_care_payer", period.this_year) + payer_count = person.spm_unit.sum(payer) + share = np.divide( + payer.astype(float), + payer_count, + out=np.zeros_like(earned_income_after_disregard, dtype=float), + where=payer_count > 0, ) return max_( 0, - earned_income_after_work_related_deduction * p.percentage - - applicable_dependent_care_deduction, + earned_income_after_disregard - dependent_care_deduction * share, )