Skip to content

Leave dependents' own items out of DC, Delaware and Ohio subtractions - #9939

Open
MaxGhenis wants to merge 4 commits into
mainfrom
dependent-state-subtractions-dc-de-oh
Open

MaxGhenis wants to merge 4 commits into
mainfrom
dependent-state-subtractions-dc-de-oh

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #9894. This PR's own changes are the last two commits, 6ae711ae21 and 5386c7ccd9. Until #9894 merges, the diff below also shows #9894. Merge #9894 first.

What was wrong

DC, Delaware and Ohio compute subtractions person by person and pool every tax unit member into the filers' state AGI: dc_taxable_income_joint adds each person's dc_taxable_income_indiv, de_agi_joint sums each member's net income, and oh_agi adds each oh_agi_person. Federal AGI leaves a tax unit dependent's income out (irs_gross_income), because the dependent reports it on their own return. But the per-person lists dc_income_subtractions, de_subtractions and oh_deductions still subtracted the dependent's own items, so they cut the parents' state tax.

#9894 dropped only the dependent's U.S. government interest from these three lists. This PR handles the rest of each list.

Two per-return amounts were also given to every member, so they were counted once per person:

  • dc_disability_exclusion (Form D-2440) returned the return's whole exclusion to each member.
  • oh_unreimbursed_medical_care_expense_deduction_person listed the tax-unit variable oh_insured_unreimbursed_medical_care_expenses in adds. Core's adds calls calculate(..., map_to="person"), which copies a tax-unit value onto every member. The person-level add() helper raises on a tax-unit variable instead. So a household of three deducted the insured medical amount three times.

Engine output (TY2025, before credits). The head has $60,000 of wages, and one dependent child aged 15 has the item shown. "Base" is #9894's head 435de86ab1.

State and child's item No child item Base This PR
DC, unemployment compensation $10,000 2,050.00 1,450.00 2,050.00
DC, state tax refund $5,000 2,050.00 1,750.00 2,050.00
DC, disabled with SSI (persons-with-disabilities exclusion) 2,050.00 1,450.00 2,050.00
DE, state tax refund $5,000 2,763.13 2,485.63 2,763.13
DE, 529 contribution $1,000 2,763.13 2,707.63 2,763.13
OH, section 179 deduction, uniformed services retirement, Pell grant, disability benefits or state tax refund, $3,000 each 1,157.38 1,074.88 1,157.38
OH, educator expenses $500 1,157.38 1,143.63 1,157.38
OH, medical expenses $9,000 the parent paid for the child 1,157.38 909.88 1,033.63

On the last row, the deduction should be $9,000 − 7.5% × $60,000 = $4,500, taken once. Base took $4,500 for each of the two members; this PR takes it once.

What changes

  • New helper person_non_dep_add (policyengine_us/tools/general.py). It works like add over people, but a tax unit dependent gets zero for every variable except those named in include_dependents. Those are the filer's amounts, even when recorded on a dependent. Like add, it rejects a variable that isn't person-level.

  • DC dc_income_subtractions and DE de_subtractions. Every item is now zero for a dependent. This replaces Leave dependents' capital income out of state lines on the filers' return #9894's special case for U.S. government interest.

  • OH oh_deductions. Every item is zero for a dependent, except those in the new parameter gov.states.oh.tax.income.deductions.filer_amounts_recorded_on_dependents:

    • oh_unreimbursed_medical_care_expense_deduction_person: premiums and medical care the taxpayer paid "for the taxpayer, the taxpayer's spouse, and dependents" (R.C. 5747.01(A)(10)).
    • oh_529_plan_deduction_person: shares of the tax unit's 529 deduction. oh_529_plan_deduction caps every member's contributions at $4,000 per beneficiary, and each person's share follows the contributions recorded on them. The other states' 529 deductions pool contributions the same way. See "Open question" below.

    Apply Ohio's business income deduction and 3% business tax; add both deductions back in modified AGI #9876 adds oh_business_income_deduction_person and oh_qualifying_capital_gain_deduction to the Ohio list. Both are person-level, and both are a filer's own, so the dependent mask applies to them unchanged. But Apply Ohio's business income deduction and 3% business tax; add both deductions back in modified AGI #9876's oh_modified_agi adds back every member's oh_qualifying_capital_gain_deduction. Once this PR drops a dependent's amount from oh_agi, that add-back would overstate modified AGI. The fix belongs in Apply Ohio's business income deduction and 3% business tax; add both deductions back in modified AGI #9876 (zero the deduction for dependents) and is noted there.

  • dc_disability_exclusion. Form D-2440 is one per return, with a column for you and one for your spouse:

    • line 4 adds both columns' payments, each capped at $5,200;
    • line 10 subtracts the excess of federal AGI over taxable Social Security plus $15,000.

    The variable now caps only the head's and spouse's payments. Each filer gets a share of the line 10 amount in proportion to their capped payments, so the shares add up to the return's exclusion. Dependents get zero.

  • oh_unreimbursed_medical_care_expense_deduction_person now adds each person's prorated share, oh_insured_unreimbursed_medical_care_expenses_person. That variable already existed, but nothing used it.

Legal basis

Each item was checked against the statute and the current form; sources were read this session. A read-only research lane checked the same items independently and reached the same results; its report is ~/reviews/pe-us-dep-subtractions-2026-10-06/legal_out.md.

DC. D.C. Code 47-1803.02(a)(2) excludes items from the taxpayer's own DC gross income:

  • (E): "Any state or local income tax refund included in federal gross income."
  • (L): Social Security "subject to taxation under § 86".
  • (LL): from 2021, unemployment insurance benefits. The 2025 D-40 booklet says to enter them on line 13 "provided this amount is also included on Line 4 of the D-40 return" (federal AGI). Line 9 (refunds) and line 10 (taxable Social Security) say "Enter the amount from your 1040".
  • (M): the disability income exclusion. Form D-2440 has columns for "You" and "Your spouse", and says "The maximum annual exclusion per disabled person is $5,200."
  • (V): "Income derived from any source, not to exceed $10,000, for a person who has been determined to have a permanent and total disability". This is the disabled person's own income. A disabled child's exclusion goes on the child's return; it does not exclude the parents' income.

Delaware. 30 Del. C. 1106(b) subtracts from the individual's federal AGI:

  • (4) Social Security and (9) Delaware refunds, "to the extent included in federal adjusted gross income";
  • (10) 2020 and 2021 unemployment benefits, "to the extent included in federal adjusted gross income";
  • (11) 529 amounts "contributed by an individual", or on a joint return "contributed by the spouses".

#9878 rewrites the 529 subtraction and also excludes dependents' contributions; this PR does not touch that formula. The pension exclusion was already limited to the head and spouse.

Ohio. R.C. 5747.01(A) defines Ohio AGI as "federal adjusted gross income ... adjusted as provided in this section". Each deduction in the list is the taxpayer's own:

Item Statute Operative words
Disability benefits (A)(4) "to the extent included in federal adjusted gross income"
State tax refunds (A)(11)(a) refunds of expenses "the taxpayer had deducted"
Prior-year section 179 add-backs (A)(18) 2025 IT 1040 line 27: "You can only deduct amounts that you added back in a prior year"
Uniformed services retirement (A)(23) "received by the taxpayer"
Educator expenses (A)(31) "paid or incurred by the taxpayer"

Pell grants: (A)(27) names grants "received by the taxpayer or the taxpayer's spouse or dependent". But the 2025 IT 1040 instructions, line 38 limit the deduction to the portion "included in your federal adjusted gross income (AGI)". A dependent's grant is in the dependent's own federal AGI, never the parents', so the parents' return has nothing to deduct.

Medical care: (A)(10) covers expenses "of the taxpayer, the taxpayer's spouse, and dependents", over 7.5% "of the taxpayer's federal adjusted gross income". That is one floor per return.

Open question (not changed here)

The input investment_in_529_plan_indv is documented as the amount "for each contributor". Ohio's own instructions disallow "Amounts contributed by another person". So a contribution recorded on a dependent could be read as the dependent's own, which is how #9878 treats Delaware.

This PR keeps a dependent's share in Ohio. That matches the existing tax-unit computation in oh_529_plan_deduction and the other states' 529 deductions, which pool every member's contributions. Settling one convention across states, and fixing Ohio's cap, which is not per beneficiary, is a follow-up chip.

Not in this PR (follow-up chips)

  • Amounts never in federal AGI. Ohio deducts pell_grant and disability_benefits, and DC excludes total_disability_payments, but none of these is in federal gross income. So even a filer's own amount is subtracted without ever being added.
  • DC persons-with-disabilities exclusion. It caps the exclusion at household gross income rather than the disabled person's own income, and it tests tax-unit AGI rather than household AGI.
  • Delaware refunds. The subtraction takes salt_refund_income, which includes other states' and local refunds; the law covers only Delaware refunds.
  • Dependents' additions. Ohio's and Delaware's add-back inputs are summed for dependents too.
  • Same adds pattern elsewhere. Six other person-level variables list a group-level amount in adds, including ms_agi_adjustments and mt_misc_deductions, with the same projection. This needs a code-health guard.

Tests

  • YAML. 15 new or changed cases in dc_income_subtractions.yaml, dc_disability_exclusion.yaml, de_subtractions.yaml and oh_deductions.yaml.
    • 14 of them give a different value on base, which this PR fixes. Copied into a base checkout, the four files give 3, 5, 4 and 2 failures.
    • One, the Ohio 529 case, is a guard that the kept item stays.
    • The three existing D-2440 cases now expect per-person shares. They had expected the return's total for each of the two spouses.
    • Every expected value was worked by hand from the form lines. For example, D-2440 lines 4, 9 and 10: 5,200 + 4,000 = 9,200; 30,000 − 6,000 − 15,000 = 9,000; 200, split 5,200 : 4,000 = 113.04 and 86.96.
  • Property test policyengine_us/tests/core/test_dependent_state_subtractions_invariants.py: Hypothesis, 5 derandomized batches of 10 to 30 DC, DE and OH tax units. Each unit has random filer and dependent items, and is run against a twin with the dependents' own items zeroed. It checks the invariants below, with the medical and D-2440 amounts against reference formulas from the inputs.
    • Fixed cases: a DC child with their own items; an Ohio household's medical deduction; and a DC couple with a positive D-2440 exclusion, whose dependent also has payments.
    • DC units with a disabled filer are left out of the twin check. The (V) exclusion's household-income limit counts every household member, so a dependent's income can rightly end a filer's exclusion. The model tests tax-unit AGI for now (follow-up).
    • On base both tests fail. Hypothesis shrinks to a DC dependent with a $2 item that moves DC taxable income by $2. The fixed DC cases give 12,500 against 37,500, and -61,600 against -46,600.
    • Local cost (macOS arm64, not a CI measurement): about 18 s.
  • Targeted local run. The dc/, de/ and oh/ state folders, plus the 51 other YAML files that set one of these states or name a changed variable. It is queued under heavy_run.sh, and results will be added here.

Invariants

For every tax unit in DC, Delaware or Ohio, and any own items its dependents have (checked by the property test and the YAML cases):

  • DC taxable income and tax before credits, Delaware tax before credits, and Ohio AGI, taxable income and tax before credits equal their values when the dependents have none of these items.
  • A dependent's dc_income_subtractions and de_subtractions are zero. Their oh_deductions equal their shares of the filer's 529 and medical deductions.
  • The members' oh_unreimbursed_medical_care_expense_deduction_person values add up to max(0, medical expenses − 7.5% of federal AGI). Their dc_disability_exclusion values add up to the D-2440 line 10 amount, with dependents at zero.
  • Tax units without dependents get exactly what they got before, apart from the two per-return fixes: person_non_dep_add equals add when no member is a dependent.

Microsim impact

Pending: a real 2026 microsimulation on the default dataset, comparing base 435de86ab1 with this PR's 6ae711ae21, is queued under lockrun.sh. Results will be added here.

axiom: TheAxiomFoundation/rulespec-us#1424 queued (extended with DC, Delaware and Ohio companion cases: TheAxiomFoundation/rulespec-us#1424 (comment)). Delaware's refund subtraction is encoded-correct per return in us-de:policies/income_tax/resident_core_liability_pipeline#de_pit_2026_profile_candidate_other_statutory_subtractions (companion test supported modifications depreciation and schedule branch); DC 47-1803.02(a)(2) and Ohio 5747.01(A) are not encoded.

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 6, 2026 09:43
…turn

A tax unit dependent's interest, dividends and capital gains are on the
dependent's own return, and federal adjusted gross income (irs_gross_income)
leaves them out. State lines that adjust the filers' federal AGI or taxable
income summed them over every member, so a child's dividends, gains or
interest moved the parents' state tax.

Count only the head and spouse (tax_unit_non_dep_add, or a dependent mask on
per-person lines) in AZ, DC, DE, IA, IL, MA, MD, ME, MN, MT, ND, NH, OH, PA,
SC, UT, VA, VT, WA, WI and WV, and in us_govt_interest, which most states
subtract.

In formulas edited anyway: North Dakota's net long-term capital gain
exclusion is floored at zero and includes capital gain distributions (Form
ND-1 line 6 worksheet); Utah's retirement credit counts only the head and
spouse as claimants; the West Virginia low-income family credit cites W. Va.
Code 11-21-22a(d).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…UT cases

The Montana and Utah Social Security credit cases now carry the exact
half-cent amounts (1,765.725, 1,847.725 and 259.475) instead of values
rounded past the 0.001 margin.

In two existing Utah retirement credit cases person2 (age 64) is a tax unit
dependent, so their tax-exempt interest is on their own return and no longer
enters the modified AGI: 750 instead of 737.5, and 675 instead of 662.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DC, Delaware and Ohio sum per-person subtractions into the filers' state
AGI. A tax unit dependent's own items, which irs_gross_income leaves off
the filers' federal return, reduced the parents' state tax. Mask every
item for dependents except the Ohio 529 and medical deductions the filer
pays for them (new parameter oh...filer_amounts_recorded_on_dependents),
through a new person_non_dep_add helper. This subsumes #9894's special
case for U.S. government interest.

Also count two per-return amounts once:
- dc_disability_exclusion returned the return's D-2440 exclusion to every
  member; it now shares it between the filers by capped payments and
  leaves out dependents' payments.
- oh_unreimbursed_medical_care_expense_deduction_person added the
  tax-unit insured expense deduction, which `adds` projects onto every
  member; it now adds each person's prorated share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Property test: leave DC units with a disabled filer out of the twin
  invariant, since D.C. Code 47-1803.02(a)(2)(V) tests household AGI,
  which counts a dependent's income; add a fixed DC couple with a
  positive D-2440 exclusion and a dependent with payments.
- Describe Ohio's 529 dependent share as a modelling convention that
  matches the pooled tax-unit deduction.
- person_non_dep_add starts from a zero array; fix a test name typo.

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

Copy link
Copy Markdown
Contributor Author

Overlap with #9925. #9925 makes the same Ohio change to oh_unreimbursed_medical_care_expense_deduction_person, in the same lines: it adds oh_insured_unreimbursed_medical_care_expenses_person in place of the tax-unit amount. It also floors federal AGI at 0 on worksheet line 6 and updates the reference URLs. Whichever PR lands second has a conflict in that file. The conflict is only in the comment and the URLs; the code is the same.

I merged both onto main 2d0815ae23, with #9925 949dd8d728, this PR 5386c7ccd9, the other group-projection fixes and #9897, keeping #9925's version of that file. The combination works. An earlier merge, with this PR at 6ae711ae21, passed:

  • oh_unreimbursed_medical_care_expense_deduction.yaml, oh_insured_unreimbursed_medical_care_expenses.yaml, oh_deductions.yaml and integration_2025.yaml;
  • test_oh_unreimbursed_medical_deduction_invariants.py and test_dependent_state_subtractions_invariants.py.

filer_amounts_recorded_on_dependents keeps the medical deduction on dependents, so #9925's prorated dependent share still counts. A re-run on the current heads is queued.

Dropping the Ohio medical hunk here would remove the conflict. Otherwise, whichever PR lands second takes the other's lines. The merge order with #9897's KNOWN_VIOLATIONS list is in #9897.

MaxGhenis added a commit that referenced this pull request Oct 8, 2026
Zero the qualifying capital gain deduction for dependent members whose
income is excluded from the filers' federal AGI, retaining the existing
filer gain/payroll limits and filer-only business deduction.

Pin federal, Ohio and modified AGI using actual dependent gain inputs.
Add a generated twin comparison for single/joint returns with dependents.

Addresses the PR #9876 interaction identified with #9939.
MaxGhenis added a commit that referenced this pull request Oct 9, 2026
…deductions back in modified AGI (#9876)

* Apply Ohio's business income deduction and add it back in modified AGI

Ohio deducts the first $250,000 ($125,000 married filing separately) of
business income (R.C. 5747.01(A)(28)) and taxes the rest at a flat 3%
(R.C. 5747.02(A)(4)). The model taxed all business income at the graduated
rates. Modified AGI is Ohio AGI plus the (A)(28) deduction and, from 2026,
the (A)(34) qualifying capital gain deduction (R.C. 5747.01(II), 5747.79(B)).
Personal exemptions and the exemption credit now use modified AGI
(R.C. 5747.025, 5747.022).

Fixes #4056

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

* Update Ohio TAXSIM cases for the business income deduction; mirror MAGI in the dependent exemption reform

TAXSIM35 does not apply R.C. 5747.01(A)(28); the two 2021 integration cases
now carry the form-line derivation with the deduction. The contrib dependent
exemption reform's no-op schedule mirrors the baseline, which is stepped by
modified AGI (R.C. 5747.025).

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

* Address review: no double exclusion of a deducted qualifying gain; disclose conventions

- Joint filing credit qualifying income excludes capital gains only to the
  extent they are still in Ohio AGI; a gain deducted under R.C.
  5747.01(A)(34) is not excluded again (R.C. 5747.05(E)(1)). 2026 test.
- The qualifying capital gain deduction cannot exceed the capital gains
  reported, and its documentation states the per-entity rule of R.C.
  5747.79(C)(2).
- Label the per-spouse split of a joint business income deduction as a
  modeling convention; disclose farm rent, Form 4797 gains and 20%-owner
  compensation as nonbusiness; describe the TAXSIM cases' line 8a as model
  values; move the MAGI test out of business_income/.

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

* Cap the deducted qualifying gain in joint filing credit qualifying income; quote 5747.79(A)(1)

A directly set multi-entity deduction above the capital gains reported can no
longer cancel the interest, dividend and rent exclusions.

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

* Exclude dependent qualifying gains from Ohio filer deductions

Zero the qualifying capital gain deduction for dependent members whose
income is excluded from the filers' federal AGI, retaining the existing
filer gain/payroll limits and filer-only business deduction.

Pin federal, Ohio and modified AGI using actual dependent gain inputs.
Add a generated twin comparison for single/joint returns with dependents.

Addresses the PR #9876 interaction identified with #9939.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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.

1 participant