Skip to content

Cap DE non-refundable credits per spouse on separate/combined returns#8726

Open
DTrim99 wants to merge 2 commits into
PolicyEngine:mainfrom
DTrim99:de-separate-combined-credit-cap
Open

Cap DE non-refundable credits per spouse on separate/combined returns#8726
DTrim99 wants to merge 2 commits into
PolicyEngine:mainfrom
DTrim99:de-separate-combined-credit-cap

Conversation

@DTrim99

@DTrim99 DTrim99 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8710. Draft for review — flagging one TAXSIM-validated test change below.

What

On a Delaware separate/combined return (Filing Status 4, de_files_separately = True), each spouse's non-refundable credits are limited to that spouse's own tax before credits (Form PIT-RES Line 32 ≤ Line 26, per column). PolicyEngine previously capped the pooled credits against the combined tax-unit liability, so one spouse's surplus personal credit could offset the other spouse's tax.

Approach

  • New person-level de_non_refundable_credits_indv holds each spouse's column-tied credits (own personal credit + own aged personal credit), which cannot move between columns.
  • de_non_refundable_credits, when filing separately:
    1. applies each spouse's own credits against their own tax: Σ min(own_i, tax_i);
    2. places the allocable credits (dependents' personal credits, child/dependent care credit, non-refundable EITC) in the column with the most remaining capacity, capped there — as a tax-minimizing filer would, since the form allows allocating exemptions between columns.
  • Joint filers are unaffected (existing pooled cap retained).

Results

Case Before After
#1007 household (MFJ, 2 filers + 1 dep, equal-tax columns) $8.33 $59.17 (≈ form's $58)
taxsimid 2682 (head $6.05 tax, spouse $3,225.65 tax, 1 dep + CDCC) $2,429.20 $2,643.15

⚠️ Test change to review

This updates the existing taxsimid 2682 integration test: de_income_tax $2,429.20 → $2,643.15. That prior value came from TAXSIM-35, which pools the credits against combined tax — exactly the behavior this PR fixes. In that household the head has only $6.05 of tax, so $213.95 of their own personal+aged credit is unusable; TAXSIM (and old PE) wrongly let it offset the spouse's tax. The new value is the correct per-column result, and is verified to still be lower than filing jointly ($2,705.30), so the couple's separate-filing choice remains valid. I don't have a filled DE form for this synthetic TAXSIM case, so this expected value is derived from the per-column logic confirmed by the #1007 form — please scrutinize.

Tests

  • Added a Fix AMT income #1007 regression test (separate/combined, per-column cap → $59.17).
  • Full DE suite passes (295 tests) with the 2682 update.

Known limitation

Allocable credits are placed entirely in the single highest-capacity column. If allocable credits exceed that column's capacity, the remainder is not spilled to the other column (a rare edge case). Noted for reviewer.

Context

Reported by Daniel Feenberg (NBER TAXSIM) in PolicyEngine/policyengine-taxsim#1007.

🤖 Generated with Claude Code

On a Delaware separate/combined return (Filing Status 4), each spouse's
non-refundable credits are limited to that spouse's own tax before
credits (Form PIT-RES Line 32 cannot exceed Line 26 per column).
PolicyEngine previously capped the pooled credits against the combined
tax-unit liability, letting one spouse's surplus personal credit offset
the other spouse's tax.

Each spouse now applies their own column-tied credits (personal + aged
personal) against their own tax; allocable credits (dependents' personal
credits, child/dependent care credit, non-refundable EITC) are placed in
the column with remaining capacity, as a tax-minimizing filer would.

Updates the taxsimid 2682 integration test: its prior expected value
came from TAXSIM-35, which pools the credits (the behavior this fixes).

Surfaced via PolicyEngine/policyengine-taxsim#1007.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (47cb26b) to head (6eb44b4).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8726   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         2    -1     
  Lines           47        41    -6     
=========================================
- Hits            47        41    -6     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

DE separate/combined return: non-refundable credits capped against combined tax instead of each spouse's own tax

1 participant