Skip to content

Count gambling winnings in federal gross income and fix the wagering losses deduction - #10070

Merged
MaxGhenis merged 22 commits into
mainfrom
fix-gambling-winnings-gross-income
Nov 14, 2026
Merged

MaxGhenis merged 22 commits into
mainfrom
fix-gambling-winnings-gross-income

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #9637. Federal gross income now counts gambling winnings, and the federal itemized total counts the wagering-loss deduction once.

  • Deduct min(losses, winnings) through 2025 and min(90% × losses, winnings) from 2026.
  • Count only the head's and spouse's gambling on their return.
  • Include wagering in the 2026 section 68 base and exclude it from the historical section 68 ceiling.
  • Count the winnings in market income, so household and SPM net income include the income whose tax they subtract.
  • Align the states that tax gambling winnings or build on federal itemized deductions.

Federal treatment

The gross-income list includes gambling_winnings. The Schedule A list includes wagering_losses_deduction; the separate itemizing-deduction list no longer adds it again.

Through 2025, filers may deduct wagering losses up to winnings under 26 U.S.C. 165(d). From 2026, filers deduct min(90% × losses, winnings) under P.L. 119-21 §70114.

For a 2026 filer whose section 68 taxable-income excess exceeds the deduction, a $27,000 deduction falls by $27,000 × 2/37 = $1,459.46, to $25,540.54. New Mexico reads that allowed federal amount.

Market income and SPM resources

Household net income and SPM net income subtract the federal and state tax on gambling winnings. Person market_income and gov.household.market_income_sources now count gambling_winnings, so both totals count the winnings too. test_household_spm_resource_parity.py maps the new gross-income source to that market income member.

For example, $30,000 of winnings on top of $500,000 of wages in 2026 adds $30,000 to a single filer's market income in every state and the District of Columbia. In Texas, net income rises by $19,500, after $10,500 of federal income tax. In Minnesota, it rises by $13,920, after $13,125 of federal and $2,955 of state income tax.

Three programs read person market income, and each now counts winnings:

  • North Dakota's renter's refund counts income "from all sources" (N.D.C.C. 57-02-08.1(5)(c)). Its market income component list adds the winnings, so income that federal law excludes for Puerto Rico and American Samoa also comes out of winnings.
  • Missouri's Supplemental Nursing Care counts "gross income from all sources" (manual 0610.005.00).
  • Washington's ECEAP application asks for all family income and lists the Form 1040 among its income documents (DCYF 05-006, section 9).

adult_earnings_index ranks a household's adults by market income, so winnings now count in that ranking.

cbo_household_market_income starts from household market income, and cbo_household_income_before_transfers_and_taxes adds that measure, so both CBO measures now count winnings too.

Methodology choices

  • Both net income totals count gambling winnings. docs/spm.md gives every source of federal gross income a place in resources, apart from three sources it lists with reasons. The Census CPS subject definitions do not mention gambling.
  • Market income counts winnings before losses, as gross income does. Filers deduct losses only as an itemized deduction, and neither net income total subtracts them: losing wagers stay out of resources, like other spending. The alternative nets losses against winnings.
  • Montana's joint allocation through 2023 keeps each spouse's own losses first, then allocates the residual over uncovered winnings. The 2023 Form 2 instructions give the losses to the spouse who claims the winnings and set no split.

States

  • Alabama: al_gambling_winnings keeps only the head's and spouse's winnings in Alabama gross income. al_gambling_loss_deduction deducts their losses up to winnings, with no 90% share, among Alabama itemized deductions (2025 Form 40 booklet).
  • California: ca_wagering_losses_deduction replaces the federal amount with all losses up to winnings and joins the deductions the high-income limitation leaves out (2025 Form 540 booklet, page 62 and pages 67-68, FTB conformity).
  • District of Columbia: dc_itemized_deductions keeps wagering losses out of the phase-out, as D.C. Code 47-1803.04(c)(2) does and the former 47-1803.03(b-4) did. Calculation F in the 2024 D-40 booklet protects only Schedule A lines 4, 9 and 15, so the form limits wagering losses. The model follows the statute.
  • Delaware: itemized deductions add the federal wagering deduction and allocate it by the head's and spouse's losses only.
  • Hawaii: itemized deductions add wagering losses, and limitation/excluded_deductions.yaml lists them among the deductions outside the 80% ceiling of the overall limitation. Filers enter them on line 2d of the Total Itemized Deductions Worksheet (2025 N-11 instructions).
  • Iowa: before 2023, ia_gambling_winnings adds the head's and spouse's winnings to Iowa gross income.
  • Kansas: main's four-category formula from Limit Kansas itemized deductions to the four K.S.A. 79-32,120(a) categories at each year's shares #10095 stays, and none of its categories holds wagering losses.
  • Kentucky: wagering_losses_allowed turns the deduction off for 2018 only, and ky_itemized_deductions_unit subtracts the federal wagering deduction that year (2019 Ky. Acts ch. 151).
  • Michigan: from 2021 Michigan subtracts mi_wagering_losses_deduction, the federal wagering deduction of a federal itemizer. The new 2021 subtraction list names mi_military_retirement_subtraction on line 11, as Restrict military survivor tax exemptions to eligible spouses #10398 does in main's other blocks.
  • Minnesota: wagering losses stay outside the itemized-deduction limitation, in the baseline and in the HF1938 contributed reform.
  • Mississippi: itemized deductions subtract the federal wagering deduction, since Mississippi income in PolicyEngine holds no gambling winnings.
  • Montana: the miscellaneous list through 2023 adds mt_wagering_losses_deduction. From 2024 mt_federal_deductions and the state income tax addback read itemized_taxable_income_deductions alone.
  • New York: ny_wagering_losses_deduction deducts all losses up to winnings under the 2017 rules, inside the itemized total and outside the limited base of the phase-out worksheet.
  • Pennsylvania: pa_gambling_loss_offset nets each person's own losses against that person's winnings, up to the winnings. PA-1000 rebate income nets the head's and spouse's offsets and no longer adds winnings on top of AGI. pa_other_additions no longer asks users to enter gambling winnings.
  • Virginia: the limited-deduction worksheet counts wagering_losses_deduction in its total, and leaves that deduction out of the reduction where it left out raw gambling_losses.
  • Vermont: the 2017 addback reads itemized_taxable_income_deductions alone. Start Vermont's 2017 taxable income from federal taxable income (former 32 V.S.A. § 5811(21)) #10595 added wagering_losses_deduction beside it on main, which counts the losses twice once the aggregate holds them.
  • Wisconsin: the itemized deduction credit leaves wagering losses out.
  • Reforms: the CRFB senior deduction extension no longer adds wagering losses to its 2029 itemizing list, since the Schedule A list holds them.

Merged and open PRs

This branch merges main 99d740496b4891aa8f70659e4d2aa7541245b500 at 71120de51a37e22d68202369147f439b6b2b88db, including #9940 and #10847. Earlier merges brought #10038, #10095, #10198, #10200, #10398 and #10595.

  • Federal and Hawaii deduction lists keep main's claim-of-right deductions beside wagering losses.
  • Hawaii keeps main's limitation from Update Hawaii deductions for Act 35 conformity #9940 and adds wagering losses to the deductions it leaves out.
  • Montana keeps both deductions in its miscellaneous list through 2023 and uses main's federal taxable-income base from 2024. Add Montana income tax parameters for 2017–2020 #10847 moved the list's start from 2021 to 2017. In 2017, filers deducted gambling losses up to reported winnings on Schedule III, line 29 (2017 Form 2 instructions). The 2018 to 2020 instructions set the same limit on line 17 of the itemized deductions (2018, 2019, 2020). PolicyEngine copies each parameter's earliest value back to 2015, so the new start date changes no Montana result.
  • Virginia keeps wagering losses, claim-of-right deductions and the historical miscellaneous deduction.
  • New York keeps its state interest deduction and state wagering deduction.
  • Wisconsin keeps main's claim-of-right category.

The 2025 Montana case computes $11,000 of wagering losses + $6,000 of SALT = $17,000 of itemized deductions. Against the $15,750 standard deduction, the addback equals min($6,000, $17,000 − $15,750) = $1,250. Counting wagering twice gives $28,000 and an addback of $6,000.

#9940 replaced hi_reduced_itemized_deductions with hi_itemized_deductions_reduction and a list of the deductions Hawaii's limitation leaves out, and this PR adds wagering_losses_deduction to that list. Main's hi_itemized_deductions_reduction returns 0 when the excluded deductions equal or exceed the total, or when Hawaii AGI does not exceed the threshold, so hi_itemized_deductions equals the full total there. This PR changes only a comment in that formula. Its Hawaii cases now sit in hi_itemized_deductions.yaml (cases 14 and 15) and hi_itemized_deductions_reduction.yaml (cases 2, 3 and 8), with the same expected deductions. Case 15 sets hi_charitable_deduction, which #9940 put in Hawaii's list in place of the federal charitable_deduction. Case 9 adds a filer with $1 million of Hawaii AGI and $4,000 of gambling losses in a $10,000 total, whose reduction equals 80% × $6,000 = $4,800. #10110 remains an open draft for North Carolina.

Minnesota source conflict

source_conflicts/candidates.yaml records us-mn:wagering-losses-itemized-limitation-exclusion as ruled, with PolicyEngine following the statute. The baseline excludes wagering at mn_itemized_deductions.py:68,71; the Walz reform does so at mn_walz_hf1938.py:136,139.

The statute excludes wagering losses from the limitation (Minn. Stat. 290.0122, subdivisions 2(d)(3) and 8). The Department places gambling on line 24 in every final 2019–2025 M1SA. It directs filers to exclude only lines 4, 13 and 19 when computing the limitation.

The Legislature enacted both provisions for tax years beginning after December 31, 2018 (1Sp2019 c6 art1 s16). It renumbered paragraph 2(c)(3) to 2(d)(3) from 2023 (2023 c64 art1 s18).

In its published 2026 final draft, the Department directs filers to put gambling on line 26 and exclude only lines 4, 13 and 22 from the limitation. The candidate records final-form years 2019–2025.

For the 2023 example, AGI equals $2 million and wagering deductions equal $50,000. Under the statute, the filer keeps $50,000 − 80% × $0 = $50,000. Under Worksheet B, the filer keeps $50,000 − 80% × $50,000 = $10,000.

Invariants

  • The federal deduction equals min(share × losses, winnings), with the share 1 through 2025 and 0.9 from 2026; it never falls as winnings or losses rise.
  • AGI rises by the full winnings, and the deduction enters itemized deductions once.
  • Income tax never falls as winnings rise and never rises as losses rise; gambling never lowers taxable income or income tax.
  • A dependent's winnings and losses change nothing on the filer's return.
  • Hawaii's limitation never reduces the wagering losses deduction: a dollar more of it leaves the reduction unchanged and adds a dollar to the allowed deduction.
  • A dollar of winnings adds a dollar to person, household and SPM market income.
  • Winnings never raise SPM net income by more than the winnings. For a family with no means-tested benefits to lose, they never lower it outside state tax steps. Connecticut adds $50 of tax for each $5,000, or fraction thereof, by which a single filer's Connecticut AGI exceeds $500,000 (C.G.S. 12-700(a)(10)(A)(v)), so the first dollar of winnings above $500,000 of wages lowers net income by $49.42.
  • Every source of federal gross income reaches SPM resources or appears in the documented exclusions, and the person and household market income lists differ only by debt_relief.
  • North Dakota's component list equals market income's. For a filer whose income comes only from sources that market income and federal gross income share, renter's refund income equals gross income less the exclusions the federal model deducts above the line.

Tests

At 4396452c76b0ded33511527cc4585b0548277156, each file ran in its own process:

File (under policyengine_us/tests/) Result
policy/baseline/household/income/person/market_income.yaml 11 passed
policy/baseline/household/income/household/household_market_income.yaml 12 passed
policy/baseline/household/income/spm_unit/spm_unit_market_income.yaml 5 passed
policy/baseline/household/income/spm_unit/spm_unit_net_income.yaml 4 passed
test_household_spm_resource_parity.py 68 passed
policy/baseline/gov/states/nd/tax/property/renters_refund/nd_renters_refund_income.yaml 41 passed
test_nd_renters_refund_income_exclusions.py 7 passed
policy/baseline/gov/states/wa/dcyf/eceap/wa_eceap_income_eligible.yaml 26 passed
policy/baseline/gov/states/mo/dss/ssp/mo_ssp.yaml 35 passed
policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_wagering_losses_deduction.yaml 5 passed
policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_claim_of_right_deduction.yaml 35 passed
policy/baseline/gov/states/mt/tax/income/deductions/mt_federal_deductions.yaml 1 passed
policy/baseline/gov/states/mn/tax/income/mn_itemized_deductions.yaml 19 passed
policy/baseline/gov/states/ks/tax/income/ks_itemized_deductions.yaml 16 passed
policy/baseline/gov/states/va/tax/income/deductions/va_itemized_deductions.yaml 9 passed
policy/baseline/gov/states/wi/tax/income/wi_itemized_deduction_credit.yaml 17 passed
code_health/test_source_conflicts.py 103 passed

With market income and the North Dakota component list as they stood before this change, the new cases fail. Market income stays at $0 against $5,000 of winnings, the parity test reports gambling_winnings as a gross-income source with no SPM treatment, and North Dakota renter's refund income reads $20,000 against $24,000 and $26,000.

A 2026 sweep over the 50 states and the District of Columbia added $1 to $200,000 of winnings to $500,000 of wages. Market income rose by the winnings in all 357 cases. Net income rose by between $0 and the winnings in every case except Connecticut at $1, the step described under Invariants.

A local run of household_net_income.yaml, which this PR does not change, reached its 8 GB memory cap after 7 of its 11 cases passed, so the table leaves it out.

Pull request run 43647952856 at 86c3e2f48f passed all 37 jobs on GitHub's merge with main 94054aa57e.

At 86c3e2f48f45cb9d71cebe4c0713610d4aedd9cf, which follows the merge of main, each file in the table passed with the same count, and so did the Hawaii files that now hold this PR's cases:

File (under policyengine_us/tests/) Result
policy/baseline/gov/states/hi/tax/income/deductions/itemized/hi_itemized_deductions.yaml 15 passed
policy/baseline/gov/states/hi/tax/income/deductions/itemized/hi_itemized_deductions_reduction.yaml 9 passed
core/test_hi_itemized_deduction_limitation_properties.py 5 passed

With wagering_losses_deduction removed from Hawaii's excluded list, case 9 of hi_itemized_deductions_reduction.yaml fails, with a reduction of $8,000 against $4,800. Case 14 of hi_itemized_deductions.yaml fails too, allowing $7,704 against $9,000.

At this head, a 2025 single filer in Hawaii with $300,000 of wages and $20,000 of winnings and losses deducts the full $20,000. One with $100,000 of wages, $10,000 of cash gifts and $5,000 of winnings and losses deducts the full $15,000. With $300,000 of wages, $20,000 of gifts and $10,000 of winnings and losses, the reduction equals min(80% × $20,000, 3% × $143,200) = $4,296.

Not in this PR

  • 2026 section 68 in states that add up raw Schedule A components (AZ, DC, DE, KY, NE, OK, OR): the 2/37 reduction does not reach their itemized deductions. Maryland, Maine, Montana and New Mexico apply it in current code.
  • Winnings by source: the single gambling input cannot separate exempt lottery prizes or jurisdiction-specific wagering categories.
  • Separate state income-list defects and AMT treatment remain outside this change.

Microsimulation impact

We estimate that this branch changes none of the outputs below in 2026 on the default dataset, where gambling_winnings and wagering_losses_deduction total $0. We compared main at 99d740496b with this branch at 86c3e2f48f.

Output Main total Change Records changed (weighted)
gambling_winnings $0 $0 0 (0)
wagering_losses_deduction $0 $0 0 (0)
adjusted_gross_income $18,986.0bn $0 0 (0)
itemized_taxable_income_deductions $1,879.4bn $0 0 (0)
hi_itemized_deductions $7.88bn $0 0 (0)
ks_itemized_deductions $10.40bn $0 0 (0)
ny_itemized_deductions_max $97.50bn $0 0 (0)
ca_itemized_deductions_pre_limitation $234.6bn $0 0 (0)
market_income $19,306.0bn $0 0 (0)
state_income_tax $576.5bn $0 0 (0)
income_tax $2,594.9bn $0 0 (0)
household_benefits $2,060.2bn $0 0 (0)
household_net_income $17,246.6bn $0 0 (0)

Axiom

axiom: TheAxiomFoundation/rulespec-us#2241 queued (Missouri Supplemental Nursing Care manual 0610.005.00 and Washington DCYF form 05-006, section 9; the corpus lacks DCYF 05-006 and its pinned release lacks the SNC manual, so the signed encoder can't run yet). TheAxiomFoundation/rulespec-us#1658 queued, extended with a comment (federal sections 61(a) and 165(d), with rows at this head and the 2017 and 2026 section 68 rows). TheAxiomFoundation/rulespec-us#1663 queued, extended with a comment (Hawaii's limitation list from #9940, where the cases moved, and a case where the 80% ceiling binds). TheAxiomFoundation/rulespec-us#1667 queued, extended with a comment (Montana's federal path from 2024, its spouse split and the list's 2017 start). TheAxiomFoundation/rulespec-us#2042 queued, extended with a comment (North Dakota renter's refund income with gambling winnings). TheAxiomFoundation/rulespec-us#1659, TheAxiomFoundation/rulespec-us#1660, TheAxiomFoundation/rulespec-us#1661, TheAxiomFoundation/rulespec-us#1662, TheAxiomFoundation/rulespec-us#1664, TheAxiomFoundation/rulespec-us#1665, TheAxiomFoundation/rulespec-us#1666, TheAxiomFoundation/rulespec-us#1668, TheAxiomFoundation/rulespec-us#1669, TheAxiomFoundation/rulespec-us#1670, TheAxiomFoundation/rulespec-us#1671, TheAxiomFoundation/rulespec-us#1672, TheAxiomFoundation/rulespec-us#1738, TheAxiomFoundation/rulespec-us#1739 queued.

Issue 1658 covers federal sections 61(a) and 165(d), issues 1659 to 1672 cover thirteen states and the District of Columbia, issue 1738 covers Kentucky's 2018 exclusion, and issue 1739 covers Iowa's pre-2023 gross winnings. Issue 2042 covers North Dakota renter's refund income, and the first issue listed covers the Missouri and Washington programs. PolicyEngine defines market income and SPM resources itself, and rulespec-us has no module for them.


🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 10, 2026 13:26
…losses deduction

Fixes #9637.

- gambling_winnings joins gov.irs.gross_income.sources (26 U.S.C. 61(a), Schedule 1 line 8b).
- wagering_losses_deduction is min(rate x losses, winnings) for the head and spouse; the rate is 1 through 2025 and 0.9 from 2026 (P.L. 119-21 sec. 70114).
- The deduction moves into the Schedule A list (line 16) and the pre-2018 section 68(c) exclusions.
- States: AL, CA, DC, DE, HI, KS, MI, MN, MS, MT, NY, PA, VA, WI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eform's formula

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n, Kentucky 2018, Montana allocation

- Alabama and pre-2023 Iowa gross income count the head's and spouse's
  gambling winnings (new person variables), not a dependent's.
- Delaware allocates wagering losses over the head's and spouse's losses only.
- Kentucky allowed no wagering losses for 2018 (2019 Ky. Acts ch. 151).
- Montana allocates each spouse's own losses first.
- Document what the gambling inputs hold; move the integration cases into
  the deduction's YAML file; add section 68 cases; fix reference titles.

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

Copy link
Copy Markdown
Contributor Author

Context from the original session (cbe2e2c2), for the US + core hub, which now owns this PR. I have not pushed to this branch since the hub adopted it.

Evidence at f7f555818f (the r1-fix commit the hub built on; all in ~/reviews/us-hub/gambling-9637/evidence/):

  • YAML: 72 federal and 606 state cases passed in nine bounded batches (yaml_r3.log), including the new KY 2018, pre-2023 IA, AL and DE dependent, MT allocation and section 68 cases.
  • Python: 61 passed (new property file, section 68 property file, Arkansas property file), 23.9 s of tests, 42 s wall, 3.35 GB peak RSS (pytest_r2.log). Isolated per-file cost: cost_r1.log.
  • 51-state differential re-run at f7f555818f (state_flow_branch.json; scripts in ../scripts/): against the pre-fix branch only Iowa 2021 moved (winnings now in pre-2023 Iowa gross income). With no gambling, state and federal tax equal main everywhere.
  • Microsimulation, 2026, main fe0c3a651c vs f7f555818f, populace_us_2024.h5@populace-us-2024-spm-20260909 (impact-g9637-2026.json): gambling inputs are zero on every record, so AGI, income tax and every touched state variable are unchanged, except Hawaii. The worksheet "not limited" correction raises hi_itemized_deductions on 7 records (+$83.1 million weighted) and lowers hi_income_tax on 1 record (−$2.24 million weighted; the same −$2.24 million in state_income_tax, +$2.24 million in household_net_income). Not re-run at 4bfb615ab7.

Review r1 (review-r1-out.md) and my response (review-response-r1.md): fixed AL and pre-2023 IA dependents, DE allocation, KY 2018, MT allocation, input docs, test placement, reference titles. Findings 1, 2, 5 and 7 (section 68 with QBID, AMT keeping section 68, states summing raw Schedule A components, WA WFTC base) reproduce on main with no gambling (preexisting_main.log), so I answered them as separate work; write-ups for follow-ups in ../followups.md (A–F, including the #9940 Hawaii and #10038 overlaps).

Axiom: rulespec-us#1658–#1672 were filed from drafts written before the r1 fixes. Not covered by them: Kentucky's 2018 exclusion (gov.states.ky.tax.income.deductions.itemized.wagering_losses_allowed), pre-2023 Iowa winnings (ia_gambling_winnings, IA 1040 line 13), and the head-and-spouse-only Alabama winnings (al_gambling_winnings), Delaware allocation and Montana allocation in their filed issues. My decision d1271 duplicated d1142 and is annotated as such.

Stack: North Carolina's wagering deduction is #10110 (draft), on top of this PR and #10028.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Heads-up on an overlap with #9977 (draft, §163(d) limit), from the session that wrote #9695.

Both PRs edit gov.irs.deductions.itemized.limitation.excluded_deductions and tests/core/test_itemized_deduction_limitation_properties.py:

Whichever lands second will conflict on the list and the property test, and the resolved list needs all four entries:

    - medical_expense_deduction
    - investment_interest_expense_deduction
    - casualty_loss_deduction
    - wagering_losses_deduction

If this PR lands first, nothing changes here: investment_interest_expense stays correct until #9977 changes interest_deduction.

This PR also covers two of the follow-ups noted in #9695, wagering losses in the 2026 2/37 base and the 90% limit, so I'm not pursuing those separately.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Coordination with #10136, which fixes the 2026 section 68 taxable-income leg (#9170). Both PRs edit two files, and the overlaps are textual only:

Semantics after both land: #10136's new taxable_income_before_itemized_deductions (section 68(a)(2)'s taxable income, increased by itemized deductions) subtracts every deductions_if_itemizing entry except itemized_taxable_income_deductions and wagering_losses_deduction. Wagering losses are itemized deductions, so leg (2) adds them back. Once #10070 moves wagering_losses_deduction into itemized_deductions, that exclusion is a harmless no-op. Leg (1) then picks up the losses through total_itemized_taxable_income_deductions, which is #10070's fix. #10136's property test raises wagering_losses_deduction and checks that leg (2) does not move, which holds under either layout.

MaxGhenis added a commit that referenced this pull request Oct 12, 2026
Review follow-ups (GPT-6.1 Sol, approve with nits):
- tax_unit_itemizes reads itemized deductions from the itemizing branch only
  when the rewritten section 68 is in force, the only case where they depend
  on the itemization choice; other years and the prior-law counterfactual
  keep the main-simulation value, so non-branching mode adds no branch there.
- A 2026 case with branch_to_determine_itemization false.
- The property tests' docstring states that gambling losses outside the
  limited base is a model limitation (#10070), not the law; the 2026
  monotonicity check raises one itemized component instead of seven.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 12, 2026
…temized deductions (#10136)

* Net the 2026 section 68 taxable-income leg of non-itemized deductions

Section 68(a)(2), as rewritten by P.L. 119-21 sec. 70111(a), measures
"taxable income ... (determined without regard to this section and increased
by such amount of itemized deductions)". For an itemizer that is AGI less
exemptions and every deduction 63(b) allows besides itemized deductions
(199A, 224, 225, 151(d)(5)(C), 163(h)(4)). The reduction used AGI minus
exemptions, overstating the base for filers with a QBI deduction.

- New taxable_income_before_itemized_deductions gives that amount; the
  reduction and Idaho's recomputation of it use it.
- Section 199A(e)(1), as amended by sec. 70111(b), computes taxable income
  without regard to section 68, so taxable_income_less_qbid deducts
  itemized deductions before the limitation from 2026. This also keeps the
  reduction -> QBID -> reduction chain acyclic.
- tax_unit_itemizes reads itemized deductions from the itemizing branch,
  since the QBI deduction (and so the limitation) depends on the choice.

Fixes #9170

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

* Test the 2026 section 68 taxable-income leg from statute arithmetic

- YAML cases for single, joint, separate and head-of-household filers, with
  2026 37 percent bracket starts from Rev. Proc. 2025-32 sec. 4.01, and a
  qualified REIT dividend case where the QBI deduction is capped by taxable
  income computed without regard to section 68 (199A(e)(1)).
- taxable_income_before_itemized_deductions unit cases (63(b)/(d), the 2029
  end of the OBBB deductions, wagering losses as an itemized deduction).
- An itemization-choice case the corrected limitation flips.
- Property and differential tests: leg (2) and the reduction restated from
  the statute; bounds; each 63(b) deduction lowers leg (2) one for one;
  monotonicity in AGI and itemized components; a calculated QBI deduction
  with the itemization choice set and calculated.

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

* Branch for itemized deductions only under the P.L. 119-21 section 68

Review follow-ups (GPT-6.1 Sol, approve with nits):
- tax_unit_itemizes reads itemized deductions from the itemizing branch only
  when the rewritten section 68 is in force, the only case where they depend
  on the itemization choice; other years and the prior-law counterfactual
  keep the main-simulation value, so non-branching mode adds no branch there.
- A 2026 case with branch_to_determine_itemization false.
- The property tests' docstring states that gambling losses outside the
  limited base is a model limitation (#10070), not the law; the 2026
  monotonicity check raises one itemized component instead of seven.

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

* Tighten the 2026 monotonicity bound and pin the QBI deduction in the non-branching case

Optional nits from the Sol delta review (approve): allowed itemized
deductions rise by at least 35/37 of an increase; the comment cites tests 6
and 8; the non-branching itemization case asserts the 60,000 QBI deduction.

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

---------

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

Copy link
Copy Markdown
Contributor Author

DTrim99, here's where each item of your round 2 review stands at 86c3e2f48f. Your round 2 table found the round 1 items fixed, and none of them has changed since.

Since then, 71120de51a merged main again, after #9940 and #10847 landed. It took #9940's Hawaii limitation and added wagering_losses_deduction to the deductions it leaves out (limitation/excluded_deductions.yaml:9-10). The Hawaii cases moved to main's two Hawaii test files with the same expected values, and 86c3e2f48f adds a case where the 80% ceiling binds. #10847 starts Montana's miscellaneous list in 2017, and the 2017 to 2020 Form 2 instructions each allow gambling losses up to winnings.

An independent AI review at 6ed57489b2 found one more defect. Gross income counted winnings but market income didn't, so household and SPM net income subtracted the tax on winnings without the income. 30d0fd3ad2 counts winnings, before losses, in person and household market income and in North Dakota's renter's refund components. Later independent reviews agreed at 4396452c76 and, after the second merge, at 86c3e2f48f.

🤖 Generated with Claude Code

@MaxGhenis
MaxGhenis dismissed DTrim99’s stale review November 14, 2026 23:39

The commits since this review answer each of its items, and the reply above maps each one to its commit, file and line. An independent review then agreed at 86c3e2f, after the latest merge of main.

@MaxGhenis
MaxGhenis merged commit f67128e into main Nov 14, 2026
168 of 183 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#10070 at 86c3e2f48f45cb9d71cebe4c0713610d4aedd9cf (squash): Count gambling winnings in federal gross income and fix the wagering losses deduction.

🤖 Generated with Claude Code

@MaxGhenis
MaxGhenis deleted the fix-gambling-winnings-gross-income branch November 14, 2026 23:39
MaxGhenis added a commit that referenced this pull request Nov 15, 2026
Main's #10070 appended gambling winnings cases to nd_renters_refund_income.yaml
where this branch appended its TANF and dependent's SSI cases; the merge keeps
all four.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 15, 2026
Both sides appended cases to mn_itemized_deductions.yaml and the contrib
mn_walz_hf1938.yaml: #10070 its wagering-loss cases, this branch its
charitable and property tax cases. Keep every case from both sides,
main's first.

Git combined mn_itemized_deductions.py, the HF1938 reform and the
source-conflict candidates without conflict. The baseline and the
reform read mn_property_tax_deduction and mn_charitable_deduction, and
both leave wagering_losses_deduction out of the limitation.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

Federal gross income omits gambling winnings but still deducts wagering losses; OBBBA 90% wagering loss limit (2026+) not modeled

3 participants