Skip to content

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

Merged
MaxGhenis merged 13 commits into
mainfrom
dependent-state-subtractions-dc-de-oh
Nov 15, 2026
Merged

MaxGhenis merged 13 commits into
mainfrom
dependent-state-subtractions-dc-de-oh

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Leave tax unit dependents' own income and expenses out of the filers' DC, Delaware and Ohio subtractions. Count DC's D-2440 disability income exclusion once per return, and leave dependents' contributions out of Ohio's 529 deduction.

Changes and legal basis

  • Leave a tax unit dependent's own income and expense items out of the DC, Delaware and Ohio subtraction totals. Filers subtract their own amounts under D.C. Code 47-1803.02, 30 Del. C. 1106(b), and Ohio Revised Code 5747.01(A). A new helper, person_non_dep_add, zeroes a tax unit dependent's own items before it adds each person's subtractions.
  • Allocate the DC disability exclusion across filers in proportion to their capped payments. On DC Form D-2440, filers add their own and their spouse's excludable payments on line 4. On lines 5 to 10 they subtract, once for the return, the excess of federal adjusted gross income less taxable Social Security over $15,000.
  • Keep Ohio medical shares for care the filer paid for dependents. Ohio allows those expenses under Revised Code 5747.01(A)(10).
  • Exclude dependent contributions and beneficiary counts before computing Ohio's 529 deduction, then allocate the deduction among filer contributors. Ohio allows the deduction to a taxpayer who contributes, with one $4,000 limit per beneficiary for the taxpayer and spouse (Revised Code 5747.70(A)). The Department of Taxation bars a deduction for amounts another person contributed (2025 IT 1040 instructions, line 37).

Invariants

  • A dependent's own subtraction items leave the filers' state income and tax before credits unchanged. The property test leaves DC units with a disabled filer out of this check, because D.C. Code 47-1803.02(a)(2)(V) limits that filer's exclusion by household adjusted gross income.
  • Dependents receive zero DC and Delaware subtractions. Their Ohio deductions retain medical shares for expenses the filer paid for them.
  • DC disability and Ohio medical amounts across people sum to one amount per return.
  • Dependent 529 contributions and beneficiary counts leave the filers' Ohio deduction unchanged.
  • The person helper matches core add rounding for filers and rejects group variables.

Methodology choices

  • Allocate the return exclusion in proportion to each filer's capped payments on D-2440.
  • The model computes Ohio's 529 deduction from individual contributor inputs; a supplied tax unit investment total no longer drives it. The model lacks beneficiary identifiers and retains its existing aggregate cap approximation. The model reads beneficiary counts from the contributor's row.
  • Leave a dependent's Pell grant off the filers' Ohio return. Revised Code 5747.01(A)(27) names grants a dependent receives, and the Department of Taxation limits line 38 to amounts "included in your federal adjusted gross income". The filers' federal adjusted gross income leaves out a dependent's income, so their return holds no such amount to deduct.
  • Keep Ohio medical expenses paid by the filer on the covered dependent's row.
  • Keep three existing approximations for separate fixes. The model tests DC's (V) exclusion against tax unit adjusted gross income, where the Code limits household adjusted gross income, and caps it at the household's gross income. It applies none of Form D-2440's filing conditions, such as an age under 65 and retirement on disability. In Ohio it deducts a filer's whole Pell grant, where line 38 covers amounts in federal adjusted gross income that paid for room and board.

Tests

Pull request run 43725210892 at 4cd89b4fbe passed all 37 jobs on GitHub's merge with main 1c3103179f.

Added eight helper cases in test_person_non_dep_add.py, and a Hypothesis property in test_dependent_state_subtractions_invariants.py that checks the first four invariants above on random DC, Delaware and Ohio tax units. Added DC, Delaware and Ohio cases in which a dependent child has their own items, and Ohio 529 contributor, cap and allocation regressions. Two D-2440 cases cover a dependent's payments and an exclusion counted once per return. The three existing D-2440 cases now expect each filer's share of the return's one exclusion, and the shares sum to the line 10 amounts those cases expected before (200, 10,400 and 7,000).

Microsimulation impact

We estimate that this branch raises Ohio income tax by $5 in 2026 on the default dataset, on 2 sampled tax units that carry no weight, and changes no DC or Delaware income tax. DC subtractions fall by $551,205 (1 record, 365 weighted), Delaware subtractions by $2.5m (2 records, 2,846 weighted) and Ohio deductions by $172.7m (5 records, 16,731 weighted). We compared main at a93cc58d7e with this branch at 4cd89b4fbe.

Output Main total Change Records changed (weighted)
dc_income_tax $3.70bn $0 0 (0)
de_income_tax $2.46bn $0 0 (0)
oh_income_tax $10.34bn +$5 2 (0)
dc_disability_exclusion $0 $0 0 (0)
dc_income_subtractions $1.17bn -$551,205 1 (365)
de_subtractions $4.63bn -$2.5m 2 (2,846)
oh_529_plan_deduction $0 $0 0 (0)
oh_deductions $89.24bn -$172.7m 5 (16,731)
state_income_tax $576.5bn +$5 2 (0)
income_tax $2,594.9bn $0 0 (0)
household_benefits $2,060.5bn $0 0 (0)
household_net_income $17,247.1bn -$5 2 (0)

Axiom parity

axiom: TheAxiomFoundation/rulespec-us#2246 queued (D.C. Code § 47-1803.02(a)(2)(LL), (M) and (V) with Form D-2440, and R.C. 5747.70 and 5747.01(A)(3), (11), (18), (23), (27) and (31)). The corpus holds no Form D-2440, and its pinned release carries neither R.C. 5747.01 nor R.C. 5747.70. TheAxiomFoundation/rulespec-us#1424 queued (the IRC § 1(g)(7) election, which moves a child's interest and dividends onto a parent's return). us-de:policies/income_tax/resident_core_liability_pipeline#de_pit_2026_profile_candidate_other_statutory_subtractions takes Delaware's refund subtraction from the taxpayer's own refund in federal adjusted gross income (companion test supported modifications depreciation and schedule branch). TheAxiomFoundation/rulespec-us#1513 queued (the DE529 subtraction). For 2026, us-dc:policies/income_tax/2026_resident_liability_source_hold takes DC's 47-1803.02(a)(2)(A), (E) and (L) exclusions from the return's own federally taxable amounts (companion test single_direct_exclusions_build_district_adjusted_gross_income_then_hold).

🤖 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>
MaxGhenis and others added 5 commits November 13, 2026 09:12
Retain main's medical, capital-loss, pension and charitable deduction changes. Exclude dependent income from Massachusetts's new helpers and the 2021 unemployment worksheet. Match core addition rounding in person-level subtraction sums.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exclude dependent contributions and beneficiary counts before capping the deduction. Allocate person shares among filer contributors. Keep dependent medical shares for care the filer paid for. Extend the Ohio contribution and Massachusetts unemployment worksheet invariants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the existing unemployment calculation while reconciling the worksheet with TIR21-6 and IRC 36B(d). Remove the blanket dependent exclusion and its tests. Retain the Massachusetts capital income fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the filer-only sum without implying a source conflict. Keep the new dependent-income cases below the worksheet threshold so they isolate filer scope from the existing Social Security calculation gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Include the pension exemption in the Social Security reference cases. Remove the dependent capital gain credit from the filer tax expectation and assert zero credit for both people.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 4 commits November 14, 2026 14:59
Restore every file outside the DC, Delaware and Ohio change to its version on main, and drop the capital-income changelog fragment. The branch held an older copy of #9894's first two commits, plus Massachusetts, Iowa and Montana follow-ups to them, and #9894 carries the current version of that work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main already counts the Ohio medical deduction once per return, and the Massachusetts change now lives in #9894, so the fragment names the DC, Delaware and Ohio subtractions, Ohio's 529 deduction and the DC disability income exclusion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2025 IT 1040 booklet starts the line 44 instructions at the foot of PDF page 25, not page 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
de_529_plan_subtraction already multiplies contributions by is_tax_unit_head_or_spouse, so the case guards the subtraction total without depending on the de_subtractions mask.

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

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#9939 at 4cd89b4fbe9eab0e0b53ecf06666f95682988777 (squash): Leave dependents' own items out of DC, Delaware and Ohio subtractions.

  • Reviews:
    • The PR has no GitHub reviews. Two independent review rounds ran outside GitHub, with a fix round between them.
    • The first round, at 41326efabf, read D.C. Code 47-1803.02(a)(2), the 2025 Form D-2440, 30 Del. C. 1106(b), R.C. 5747.01(A) and 5747.70 and the Ohio 2025 IT 1040 instructions. It computed six households by hand and ran them on the head and on the merge base a93cc58d7e. Every head result matched its hand figure. At the base, the child's item lowered the filers' state income in four households, and the D-2440 exclusion went to every member in the other two.
    • It asked for changes. The branch still carried an older copy of Leave dependents' capital income out of state lines on the filers' return #9894's capital-income changes for other states, 71 of the branch's 88 files, and that copy conflicted with Leave dependents' capital income out of state lines on the filers' return #9894's own head. The description gave no impact estimate. The changelog credited this PR with an Ohio medical fix that Count Ohio's unreimbursed medical care deduction once per return #9925 had made, the new Ohio parameter cited line 44 at the wrong PDF page, and one Delaware 529 case passed at the base too.
    • The fix round pushed four commits. 3e115d0d3f restored or removed 71 paths so that they match main, which left the 17 DC, Delaware and Ohio files. 65b50681b3 rewrote the changelog fragment, b966682355 moved the line 44 reference to PDF page 25, and 4cd89b4fbe says in the Delaware 529 case that it passes without the mask. Each of four mutants failed at least one case: counting a dependent's D-2440 payments, a plain add in de_subtractions, dropping Ohio's medical exception, and counting a dependent's 529 beneficiaries.
    • The second round approved 4cd89b4fbe with no blocking finding. It confirmed that the diff against the merge base holds those 17 files, recomputed every expectation in the six YAML files by hand and read the statutes, Form D-2440 and the Ohio booklet again. Main's 75 commits since the merge base had changed none of the PR's files.
    • It listed minor findings for follow-up: two test comments, an undocumented input convention, one skip in the property test and dependents' additions. It also found three stale sentences in my comment on rulespec-us#1424, which a new comment there corrects.
    • The branch history still holds two commits from the older Leave dependents' capital income out of state lines on the filers' return #9894 copy, so I squashed with a message written from this change.
    • The reviews listed corrections to the description, and I made each before merge, with two differences. The D-2440 sentence states the form's line 9, the excess over $15,000, where the review's wording subtracted $15,000 itself. I cut the bullet that asked for an Axiom companion case, since the new parity issue supplies those cases.
  • Methodology choices for maintainers:
    • Form D-2440 gives one line 10 amount per return. The model sums each person's DC income, so it gives each filer a share of that amount in proportion to their capped payments. The split can change a result where DC spouses file separately on the same return, since each spouse's taxable income takes their own share. The form requires married claimants to file a joint return, and the model doesn't apply that condition.
    • The model caps each filer's D-2440 payments at $5,200 a year. The form's line 2 allows $100 for each week of payments, and the model holds no count of weeks.
    • Ohio's 529 deduction reads each filer's own contributions and beneficiary count. A count recorded on a beneficiary child's row gave the parent a deduction at the base and gives none now. The model caps the filers' combined contributions at $4,000 times their combined count, where R.C. 5747.70(A) sets the limit beneficiary by beneficiary, and it carries no excess forward.
    • R.C. 5747.01(A)(27) names grant amounts "received by the taxpayer or the taxpayer's spouse or dependent". The PR drops a dependent's Pell grant from the filers' deductions, following the Department of Taxation's line 38 instruction, which covers amounts "included in your federal adjusted gross income". A maintainer who reads (A)(27) as letting a parent deduct a dependent's taxable grant would add pell_grant to filer_amounts_recorded_on_dependents.
    • Ohio's medical shares stay on the dependent they cover through the new list filer_amounts_recorded_on_dependents, since R.C. 5747.01(A)(10) covers care the taxpayer paid for dependents.
    • person_non_dep_add zeroes every listed item on a dependent's row, including the free inputs dc_other_subtractions, de_other_subtractions and oh_other_subtractions. A caller records a filer's amount on the filer's row.
    • The PR keeps the model's approximations of D.C. Code 47-1803.02(a)(2)(V): a tax unit income test where the Code limits household adjusted gross income, and a cap at the household's gross income. The model also holds no input for railroad retirement disability benefits or for federal or District disability payments.
  • Gates checked live at merge:
  • Impact: we estimate that this branch raises Ohio income tax by $5 in 2026 on the default dataset, on 2 sampled tax units that carry no weight, and changes no DC or Delaware income tax. Ohio deductions fall by $172.7m (5 records, 16,731 weighted). Main a93cc58d7e against 4cd89b4fbe.
  • Next:
    • dc_other_additions, de_other_additions, oh_other_additions and oh_bonus_depreciation_add_back still add a dependent's amount to the filers' state income. An issue can mask them as this PR masks the subtractions.
    • oh_deductions.yaml line 79 and the docstring of test_reported_examples say Ohio's medical deduction "used to be given to every member". Count Ohio's unreimbursed medical care deduction once per return #9925 made that fix before this branch's merge base, so a follow-up should reword both.
    • count_529_contribution_beneficiaries has a label and no documentation. A follow-up should say the count belongs on the contributor's row.
    • The property test leaves DC units with a disabled filer out of its first invariant. The model tests tax unit income for the (V) exclusion, so a follow-up can keep those units in until the household income test lands.
    • Three approximations need issues: the (V) exclusion's income test, cap and receipt routes, Form D-2440's filing conditions and weekly limit, and Ohio's deduction of a filer's whole Pell grant.
    • About 30 other state and territory formulas read the tax unit's investment_in_529_plan total, which includes a dependent's contributions.
    • After this squash, Leave dependents' capital income out of state lines on the filers' return #9894 conflicts with main in five more files: the three subtraction formulas and the DC and Delaware subtraction test files. It should merge main and drop its us_govt_interest_person masks there, which this PR's helper covers.
    • test_ma_dependent_capital_income_invariants.py left this branch with the split and Leave dependents' capital income out of state lines on the filers' return #9894 lacks it. Leave dependents' capital income out of state lines on the filers' return #9894 can take the file from 41326efabf. DTrim99's review of Leave dependents' capital income out of state lines on the filers' return #9894 found dependent masks unpinned in several states, and this file pins the Massachusetts ones.
  • Axiom: Encode DC's D-2440, (LL) and (V) exclusions and Ohio's 529 and (A) deductions on the filers' own amounts (D.C. Code § 47-1803.02(a)(2); R.C. 5747.01(A) and 5747.70) (PE-US #9939) TheAxiomFoundation/rulespec-us#2246 queued, a new pe-parity issue for D.C. Code 47-1803.02(a)(2)(LL), (M) and (V) and R.C. 5747.70 and 5747.01(A)(3), (11), (18), (23), (27) and (31), with companion rows from this PR's YAML. The corpus holds no Form D-2440, and its pinned release carries neither R.C. 5747.01 nor R.C. 5747.70. A new comment on Encode IRC §1(g)(7) parent's election (the rule that decides whether a child's items reach a parent's return) TheAxiomFoundation/rulespec-us#1424 pins that issue's DC, Delaware and Ohio cases to this head.

🤖 Generated with Claude Code

@MaxGhenis
MaxGhenis deleted the dependent-state-subtractions-dc-de-oh branch November 15, 2026 15:57
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