Skip to content

Count only taxable wages in the child and dependent care credit's earned income limit - #10520

Open
PavelMakarchuk wants to merge 2 commits into
mainfrom
fix-4007-cdcc-earned-income-deferrals
Open

PavelMakarchuk wants to merge 2 commits into
mainfrom
fix-4007-cdcc-earned-income-deferrals

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator

Summary

The child and dependent care credit (CDCC) limits creditable expenses to the taxpayer's earned income, or to the lower earner's on a joint return. head_earned and spouse_earned read adjusted_earnings, which started from earned_income. That variable adds employment_income, the wages before pre-tax payroll deductions. A spouse who defers part of the pay into a traditional 401(k) or 403(b) therefore had a limit that was too high by the deferral.

Repro (TY2025, TX, from the issue): married couple, head $56,000 of wages, spouse $4,000 of wages with a $1,000 traditional 401(k) deferral, two children, $9,103 of childcare.

Variable main this PR Form 2441
irs_employment_income (spouse) 3,000 3,000 3,000
adjusted_earnings (spouse) 4,000 3,000 3,000
cdcc_relevant_expenses 4,000 3,000 3,000
cdcc (20% rate, AGI $59,000) 800 600 600

adjusted_earnings now subtracts the wages that are not includible in gross income (employment_income − irs_employment_income), the same way filer_adjusted_earnings has done since #10030. earned_income does not change: about 18 formulas read it directly, and some benefit programs count wages before these deductions (the scope question that closed #4066). #10030 already moved the EITC and ACTC to taxable wages.

The law

  • 26 U.S.C. 21(d)(1): expenses may not exceed the taxpayer's earned income or, for a married taxpayer, "the lesser of" the two spouses' earned income.
  • Treas. Reg. 1.21-2(b)(3): "the term earned income has the same meaning as in section 32(c)(2) and the regulations thereunder."
  • 26 U.S.C. 32(c)(2)(A)(i): employee compensation counts "only if such amounts are includible in gross income for the taxable year."
  • 26 U.S.C. 402(e)(3): an elective deferral is not "treated as distributed or made available to the employee", so it is not in gross income. Cafeteria-plan premiums and payroll HSA contributions are also out of W-2 box 1. Designated Roth deferrals stay in (26 U.S.C. 402A(a)(1)).
  • Form 2441 instructions (2025), lines 4 and 5: earned income starts from "The amount shown on Form 1040, 1040-SR, or 1040-NR, line 1z". Line 1a is W-2 box 1.
  • 26 U.S.C. 129(b) limits the dependent care assistance exclusion to the same earned income, and 129(e)(2) gives it "the meaning given such term in section 32(c)(2)". Form 2441 lines 18 and 19 figure it "in the same way as earned income for figuring the credit".

What changes, and for whom

Only filers in which a head or spouse has traditional 401(k)/403(b) deferrals, pre-tax health premiums or payroll HSA contributions, and in which that person's earned income is the binding limit. Results without these deductions do not change.

Formula Rule Check
head_earned, spouse_earned, min_head_spouse_earned → cdcc_relevant_expenses IRC 21(d)(1) Reg. 1.21-2(b)(3) → 32(c)(2). Correct.
dependent_care_assistance_exclusion (also feeds cdcc_limit under 21(c)) IRC 129(b) 129(e)(2) → 32(c)(2). Correct.
amt_exemption, child cap before 2018 IRC 59(j) See below. Taxable wages.
filer_adjusted_earnings IRC 32(c)(2) Now sums adjusted_earnings over non-dependents. Same values; the formula is no longer duplicated.
va_child_dependent_care_expense_deduction Va. Code 58.1-322.03(3): expenses "upon which the federal credit is based under § 21" Follows 21(d). Correct.
ma_dependent_care_credit (to 2022) St. 2021, c. 24, § 29 (former c. 62, § 6(x)): expenses allowed for the section 21 credit Follows 21(d). Correct.
mn_cdcc Minn. Stat. 290.067, subd. 1: the credit for which the taxpayer is eligible under section 21 Correct.
co_low_income_cdcc C.R.S. 39-22-119.5(4)(a): "the individual's earned income" (undefined; 39-22-103(11) gives it the IRC meaning) Correct.
ca_cdcc_relevant_expenses, ca_dependent_care_assistance_exclusion R&TC 17052.6(d)(2): earned income "limited to earned income subject to tax under this part"; FTB 3506 line 4: "other taxable employee compensation" California wages. See below.
ca_amt_exemption, child R&TC 17062 adopts IRC 55-59; Schedule P (540) line 8: "wages, tips, and other payments received" Same reasoning as the federal cap, on California wages. See below.
ar_federal_cdcc A.C.A. 26-51-502 adopts IRC 21; AR2441 line 4 starts from AR1000F line 8 wages Correct.
ny_cdcc_max (606(c), to 2025) IT-216 (2025): "other taxable employee compensation", IT-201 line 1, federal amount Correct.
ny_cdcc_qualifying_expenses (606(c-2), from 2026) Tax Law 606(c-2)(2)(C) Kept on gross wages. See below.
id_household_and_dependent_care_expense_deduction Idaho Code 63-3022D: expenses "as further specified and limited by section 21 (d) and (e)" Correct.
or_cdcc_relevant_expenses ORS 315.264(1)(c)(A): "earned income taxable by Oregon" Correct.
wi_childcare_expense_subtraction, wi_childcare_expense_credit_potential Wis. Stat. 71.05(6)(b)43. and 71.07(9g): section 21 expenses; Wisconsin replaces only the 21(c) dollar limit Follows 21(d). Correct.

States that take a percentage of the federal credit inherit the change through cdcc. The individual_eitc (Winship) reform also reads adjusted_earnings; it now uses the same taxable wages as the baseline EITC. cdcc_single_parent_work_requirement and the Minnesota HF 1938 reform read the CDCC earnings and follow the federal rule.

AMT child cap (before 2018). #10030 kept this cap on gross earnings. IRC 59(j)(1)(A) uses earned income "as defined in section 911(d)(2)", which has no gross-income inclusion clause. But 911(d)(2)(A) counts "amounts received as compensation for personal services", and 402(e)(3) says an elective deferral is not made available to the employee. The 2017 Form 8615 instructions apply the same 911(d)(2) definition (through IRC 1(g)(4)) to the same children, and say earned income "is generally the total of the amounts reported on Form 1040, lines 7, 12, and 18". Line 7 is taxable wages. The 2017 Form 6251 instructions (worksheet line 8) use the same words as Form 8615. So the cap now follows adjusted_earnings. It applies only before 2018 (IRC 55(d)(4)(A)(iii)), and California's Schedule P uses the same wording. If reviewers prefer to keep #10030's reading, amt_exemption and ca_amt_exemption can add back the excluded wages the way New York does below.

California. California excludes traditional 401(k)/403(b) deferrals and pre-tax health premiums, but it taxes payroll HSA contributions: the Schedule CA (540) instructions, line 1h, add the W-2 box 12 code W amount in column C (also FTB Pub. 1005; ca_hsa_addition). #10030 added ca_taxable_wages (W-2 box 16) for this. With the federal change alone, California's CDCC limit would have dropped the HSA amounts. This PR therefore adds:

  • ca_head_earned and ca_spouse_earned: head_earned / spouse_earned plus ca_taxable_wages − irs_employment_income for that person, which is the payroll HSA contribution.
  • ca_cdcc_min_head_spouse_earned: the lesser of the two, with the same deemed income for a student or disabled spouse (FTB 3506 line 5: $250 or $500 a month). The deeming logic of min_head_spouse_earned moved into a helper, lesser_head_spouse_earned, that both variables call. The federal results do not change.
  • ca_cdcc_relevant_expenses caps expenses at ca_cdcc_min_head_spouse_earned. ca_dependent_care_assistance_exclusion raises the federal exclusion by the amount that California earned income exceeds federal earned income, up to the benefits. That equals the lesser of the benefits, the California cap and California earned income, because the federal cap is at least California's. ca_amt_exemption (Schedule P worksheet line 8) uses ca_head_earned.

No other California formula reads adjusted_earnings, head_earned, spouse_earned or min_head_spouse_earned. CalEITC and the YCTC already use ca_taxable_wages.

New York from 2026. Tax Law 606(c-2)(2)(C) (L. 2026, ch. 59, Part A, § 2) defines earned income as "the wages, salaries, tips and other employee compensation, and those items of gross income which are includible in the computation of net earnings from self-employment". It leaves out IRC 32(c)(2)(A)(i)'s "only if such amounts are includible in gross income". ny_cdcc_qualifying_expenses therefore adds the excluded wages back to head_earned and spouse_earned, which keeps its results as on main. DTF has not published the 2026 IT-216 instructions. Revisit this if they start the line from federal wages.

Known gaps, not changed here:

  • As with adjusted_earnings, the New York and California add-backs follow the zero floor: when a self-employment loss is larger than a person's federal taxable wages, the add-back goes onto zero.
  • hi_cdcc_min_head_spouse_earned reads gross earned_income directly and does not use this chain.
  • or_cdcc_relevant_expenses uses the federal deemed income for a student or disabled spouse. ORS 315.264(5)(a) deems $1,000 a month ($2,000 for two or more qualifying individuals) for students only.
  • ar_federal_cdcc does not leave out active-duty military pay, which Arkansas exempts (AR2441 line 4 starts from AR1000F line 8).

Tests

New cases, run against main (4a1a3cdeb7) and this branch:

Case Variable main this PR
$4,000 wages, $1,000 traditional 401(k) adjusted_earnings 4,000 3,000
$10,000 wages, $1,000 Roth 401(k), $500 pre-tax premiums, $1,000 payroll HSA adjusted_earnings 10,000 8,500
$4,000 wages, $1,000 deferral, $10,000 self-employment income adjusted_earnings 13,293.52 12,293.52
$2,000 wages, $1,000 deferral, −$3,000 self-employment (control) adjusted_earnings 0 0
Issue repro (TY2025) cdcc 800 600
Joint, $5,000 employer benefits, spouse $4,000 wages with $1,500 deferral dependent_care_assistance_exclusion 4,000 2,500
Virginia, joint, spouse $4,000 wages with $1,500 deferral, $9,000 care va_child_dependent_care_expense_deduction 4,000 2,500
New York 2026, same household ny_cdcc_qualifying_expenses 4,000 4,000
California, joint, spouse $6,000 wages with $1,000 401(k) and $1,000 payroll HSA, $9,000 care ca_cdcc_relevant_expenses 6,000 5,000
California, joint, $5,000 employer benefits, spouse $4,000 wages with $1,000 payroll HSA ca_dependent_care_assistance_exclusion 4,000 4,000
California child filer, $10,000 wages, $1,000 401(k), $1,000 payroll HSA ca_amt_exemption 19,550 18,550

Main fails 10 of the 11 new cases; the self-employment loss control passes on both. The California exclusion is 4,000 on main only because main counted the spouse's gross wages; that case fails on main at the federal exclusion (4,000, expected 3,000). Each expected value has its arithmetic in a comment.

ca_cdcc_relevant_expenses.yaml set min_head_spouse_earned as an input in 7 places; those inputs are now ca_cdcc_min_head_spouse_earned, the variable the formula reads.

Changed: eitc_earned_income.yaml case "AMT kiddie-tax exemption retains its pre-2018 gross earnings cap" (from #10030) is now "... caps at taxable earnings before 2018". It expects 15,500 = (10,000 − 2,000 deferral) + 7,500 instead of 17,500. Its 2018 companion case only loses "gross" from its name.

tests/core/test_eitc_elective_deferral_invariants.py asserted that adjusted_earnings and amt_exemption do not depend on payroll deductions. It now asserts that head_earned, spouse_earned, min_head_spouse_earned and amt_exemption match a run with the same W-2 box 1 wages and no deductions, and keeps the check that gross earned_income does not depend on them.

Local results (PolicyEngine-Core test runner and pytest, Python 3.11):

  • YAML, 3,177 cases in gov/irs/credits/cdcc, gov/irs/income, gov/irs/tax/federal_income/alternative_minimum_tax, gov/irs/credits/earned_income, gov/irs/credits/ctc, the VA, MA, MN, CO, CA, AR, NY, NYC, ID, OR, WI and HI credit folders, ca/tax/income/alternative_minimum_tax, reform/winship.yaml, reform/cdcc_single_parent_work_requirement.yaml, contrib/states/ny/a06774, contrib/states/mn/walz and contrib/taxsim: 3,176 passed. The one failure was the Exclude pretax payroll deductions from EITC and ACTC earnings #10030 AMT case above; after the update, eitc_earned_income.yaml and the AMT folder pass (135).
  • tests/policy/baseline/partners: 623 passed.
  • pytest, 25 files (the elective deferral, dependent care exclusion, claimable-filer and head/spouse swap invariants, federal credit limit order, KY CDCC federal match, NYC credit properties, reference URL and source-conflict code health): 478 passed, 1 failed. The failure, test_source_conflicts.py::test_unscannable_files_fail_closed, also fails on main in this environment.
  • After the rebase on 4a1a3cdeb7: the CDCC, AMT, EITC earned income, NY credit and VA deduction folders (612) and the two invariant files (7) pass.
  • After the California change: gov/states/ca/tax and gov/irs/credits/cdcc, 424 passed; tests/policy/baseline/partners, 623 passed; the two invariant files and the reference URL and source-conflict code-health files, 235 passed and the same 1 environment failure.
  • ruff format --check and ruff check pass on the changed Python files.

Note: #10501 edits the lines next to the ca_amt_exemption line 8 change, so the second of the two to merge needs a small rebase. #10308 touches the federal AMT child exemption tests, but no file in this PR.

Fixes #4007

axiom: n/a: us/statutes/26/21.yaml in rulespec-us takes the taxpayer's and spouse's earned income as inputs (taxpayer_earned_income_for_cdcc, spouse_earned_income_for_cdcc); this PR changes only how PolicyEngine measures those inputs (Treas. Reg. 1.21-2(b)(3), IRC 32(c)(2)), not the section 21 rule

🤖 Generated with Claude Code

PavelMakarchuk and others added 2 commits October 27, 2026 16:26
adjusted_earnings, which feeds head_earned, spouse_earned and
min_head_spouse_earned, started from gross employment_income, so a
spouse's traditional 401(k)/403(b) deferrals, pre-tax health premiums
and payroll HSA contributions raised the IRC 21(d)(1) expense limit and
the IRC 129(b) exclusion limit. Treas. Reg. 1.21-2(b)(3) and IRC
129(e)(2) use the IRC 32(c)(2) definition, which counts employee pay
only if includible in gross income, and Form 2441 starts from Form 1040
line 1z.

- adjusted_earnings subtracts employment_income - irs_employment_income,
  as filer_adjusted_earnings did since #10030; earned_income stays gross.
- filer_adjusted_earnings sums adjusted_earnings over non-dependents
  again (same values).
- The pre-2018 AMT child cap (IRC 59(j), 911(d)(2)) follows: the 2017
  Form 8615 instructions read the same definition as Form 1040 line 7
  wages. The #10030 test that pinned the gross cap now expects 15,500.
- New York's 2026 credit adds the excluded wages back, because Tax Law
  606(c-2)(2)(C) has no gross-income inclusion test.

Fixes #4007

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
California taxes payroll HSA contributions (Schedule CA (540) line 1h,
column C), so with taxable federal adjusted_earnings the California CDCC
limit under R&TC 17052.6(d)(2) dropped them.

- ca_head_earned / ca_spouse_earned add ca_taxable_wages minus
  irs_employment_income (the payroll HSA amount) to head_earned /
  spouse_earned.
- ca_cdcc_min_head_spouse_earned applies the IRC 21(d)(2) deeming (FTB
  3506 line 5) to them through lesser_head_spouse_earned, a helper split
  out of min_head_spouse_earned with no change to federal results.
- ca_cdcc_relevant_expenses, ca_dependent_care_assistance_exclusion and
  the ca_amt_exemption child worksheet (Schedule P line 8) use the
  California amounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PavelMakarchuk

Copy link
Copy Markdown
Collaborator Author

@hua7450 — could you review this one when you have a moment? CI is green. It fixes #4007 for the child and dependent care credit chain only (Treas. Reg. 1.21-2(b)(3) and IRC 32(c)(2): earned income is pay "includible in gross income"), and leaves earned_income itself unchanged. Two points need your judgment: the pre-2018 AMT child cap now uses taxable earnings (#10030 left that question open; the PR explains the § 911(d)(2) reading and how to keep the gross cap instead), and California keeps payroll HSA contributions in its CDCC earned income (R&TC 17052.6(d)(2)), which also corrects ca_dependent_care_assistance_exclusion and ca_amt_exemption.

🤖 Posted by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace employment_income with irs_employment_income in earned_income

1 participant