Repository navigation
Count only taxable wages in the child and dependent care credit's earned income limit - #10520
Open
PavelMakarchuk wants to merge 2 commits into
Open
PavelMakarchuk wants to merge 2 commits into
PavelMakarchuk wants to merge 2 commits into
Conversation
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>
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 🤖 Posted by Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_earnedandspouse_earnedreadadjusted_earnings, which started fromearned_income. That variable addsemployment_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.
irs_employment_income(spouse)adjusted_earnings(spouse)cdcc_relevant_expensescdcc(20% rate, AGI $59,000)adjusted_earningsnow subtracts the wages that are not includible in gross income (employment_income − irs_employment_income), the same wayfiler_adjusted_earningshas done since #10030.earned_incomedoes 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
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.
head_earned,spouse_earned,min_head_spouse_earned→cdcc_relevant_expensesdependent_care_assistance_exclusion(also feedscdcc_limitunder 21(c))amt_exemption, child cap before 2018filer_adjusted_earningsadjusted_earningsover non-dependents. Same values; the formula is no longer duplicated.va_child_dependent_care_expense_deductionma_dependent_care_credit(to 2022)mn_cdccco_low_income_cdccca_cdcc_relevant_expenses,ca_dependent_care_assistance_exclusionca_amt_exemption, childar_federal_cdccny_cdcc_max(606(c), to 2025)ny_cdcc_qualifying_expenses(606(c-2), from 2026)id_household_and_dependent_care_expense_deductionor_cdcc_relevant_expenseswi_childcare_expense_subtraction,wi_childcare_expense_credit_potentialStates that take a percentage of the federal credit inherit the change through
cdcc. Theindividual_eitc(Winship) reform also readsadjusted_earnings; it now uses the same taxable wages as the baseline EITC.cdcc_single_parent_work_requirementand 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_exemptionandca_amt_exemptioncan 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 addedca_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_earnedandca_spouse_earned:head_earned/spouse_earnedplusca_taxable_wages − irs_employment_incomefor 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 ofmin_head_spouse_earnedmoved into a helper,lesser_head_spouse_earned, that both variables call. The federal results do not change.ca_cdcc_relevant_expensescaps expenses atca_cdcc_min_head_spouse_earned.ca_dependent_care_assistance_exclusionraises 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) usesca_head_earned.No other California formula reads
adjusted_earnings,head_earned,spouse_earnedormin_head_spouse_earned. CalEITC and the YCTC already useca_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_expensestherefore adds the excluded wages back tohead_earnedandspouse_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:
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_earnedreads grossearned_incomedirectly and does not use this chain.or_cdcc_relevant_expensesuses 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_cdccdoes 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:adjusted_earningsadjusted_earningsadjusted_earningsadjusted_earningscdccdependent_care_assistance_exclusionva_child_dependent_care_expense_deductionny_cdcc_qualifying_expensesca_cdcc_relevant_expensesca_dependent_care_assistance_exclusionca_amt_exemptionMain 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.yamlsetmin_head_spouse_earnedas an input in 7 places; those inputs are nowca_cdcc_min_head_spouse_earned, the variable the formula reads.Changed:
eitc_earned_income.yamlcase "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.pyasserted thatadjusted_earningsandamt_exemptiondo not depend on payroll deductions. It now asserts thathead_earned,spouse_earned,min_head_spouse_earnedandamt_exemptionmatch a run with the same W-2 box 1 wages and no deductions, and keeps the check that grossearned_incomedoes not depend on them.Local results (PolicyEngine-Core test runner and pytest, Python 3.11):
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/walzandcontrib/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.yamland the AMT folder pass (135).tests/policy/baseline/partners: 623 passed.test_source_conflicts.py::test_unscannable_files_fail_closed, also fails on main in this environment.4a1a3cdeb7: the CDCC, AMT, EITC earned income, NY credit and VA deduction folders (612) and the two invariant files (7) pass.gov/states/ca/taxandgov/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 --checkandruff checkpass on the changed Python files.Note: #10501 edits the lines next to the
ca_amt_exemptionline 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.yamlin 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