Skip to content

Fix EITC/CDCC: allow SE losses to reduce earned income per IRS Worksheet B#7469

Open
PavelMakarchuk wants to merge 1 commit intomainfrom
fix-eitc-se-loss-floor
Open

Fix EITC/CDCC: allow SE losses to reduce earned income per IRS Worksheet B#7469
PavelMakarchuk wants to merge 1 commit intomainfrom
fix-eitc-se-loss-floor

Conversation

@PavelMakarchuk
Copy link
Collaborator

Summary

  • Removes the per-person max_(0, ...) floor from adjusted_earnings.py that incorrectly clipped self-employment losses, preventing them from reducing earned income
  • Adds the zero floor at the tax-unit level in filer_adjusted_earnings.py, matching IRS EIC Worksheet B Line 4b: "If line 4b is zero or less, You can't take the credit"
  • Adds test coverage for both SE loss scenarios and the tax-unit-level floor

Legal Authority

IRC 32(c)(2)(A)(ii): EITC earned income includes "the amount of the taxpayer's net earnings from self-employment for the taxable year (within the meaning of section 1402(a))". Per IRC 1402(a), net earnings can be negative ("income or loss").

IRS EIC Worksheet B (Form 1040 Instructions, Line 4b): "Combine lines 1e, 2c, 3, and 4a. This is your total earned income." — No per-component or per-person floor. "If line 4b is zero or less, You can't take the credit." — Floor applies only to the combined total.

IRS Form 2441 Instructions (CDCC, Lines 4-5): "You must reduce your earned income by any loss from self-employment."

Note: Pub 596's "don't subtract losses on Schedule C or F from wages" applies only to Form 4029 filers (religious exemption from SE tax), not to general EITC filers.

Example

MFJ couple: Head has $30,000 wages, Spouse has -$10,000 SE loss.

Before (bug) After (fix) IRS Worksheet B
Head adjusted_earnings $30,000 $30,000 $30,000
Spouse adjusted_earnings $0 (clipped) -$10,000 -$10,000
filer_adjusted_earnings $30,000 $20,000 $20,000

Test plan

  • New tests: adjusted_earnings.yaml (3 tests) — SE loss, positive SE, zero SE
  • New tests: filer_adjusted_earnings.yaml (2 tests) — partial offset, full offset with floor
  • All existing EITC tests pass (37 tests)
  • All existing CDCC tests pass (37 tests)
  • AMT exemption tests pass (5 tests)
  • TAXSIM EITC contrib test passes
  • State EITC/WFC tests pass (WA, MN, CA — 31 tests)

🤖 Generated with Claude Code

Per IRC 32(c)(2)(A)(ii) and IRS EIC Worksheet B (Form 1040
Instructions, Line 4b), self-employment losses reduce earned income
with no per-person floor. The previous max_(0, ...) in
adjusted_earnings.py incorrectly clipped each person's earned income
to zero, preventing SE losses from offsetting a spouse's wages.

The zero floor now applies only to the combined tax-unit total in
filer_adjusted_earnings.py, matching Worksheet B: "If line 4b is
zero or less, You can't take the credit."

This also fixes CDCC (Form 2441 instructions: "You must reduce your
earned income by any loss from self-employment").

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fe9f829) to head (4f89885).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #7469       +/-   ##
============================================
+ Coverage   70.60%   100.00%   +29.39%     
============================================
  Files        3896         2     -3894     
  Lines       56278        22    -56256     
  Branches      277         0      -277     
============================================
- Hits        39735        22    -39713     
+ Misses      16542         0    -16542     
+ Partials        1         0        -1     
Flag Coverage Δ
unittests 100.00% <100.00%> (+29.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant