Repository navigation
Count gambling winnings in federal gross income and fix the wagering losses deduction - #10070
Conversation
…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>
|
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
Review r1 ( Axiom: rulespec-us#1658–#1672 were filed from drafts written before the r1 fixes. Not covered by them: Kentucky's 2018 exclusion ( Stack: North Carolina's wagering deduction is #10110 (draft), on top of this PR and #10028. |
|
Heads-up on an overlap with #9977 (draft, §163(d) limit), from the session that wrote #9695. Both PRs edit
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_deductionIf this PR lands first, nothing changes here: 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. |
|
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 |
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>
…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>
|
DTrim99, here's where each item of your round 2 review stands at
Since then, An independent AI review at 🤖 Generated with Claude Code |
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.
|
US + core hub merge audit, us#10070 at
🤖 Generated with Claude Code |
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>
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>
Summary
Fixes #9637. Federal gross income now counts gambling winnings, and the federal itemized total counts the wagering-loss deduction once.
Federal treatment
The gross-income list includes
gambling_winnings. The Schedule A list includeswagering_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_incomeandgov.household.market_income_sourcesnow countgambling_winnings, so both totals count the winnings too.test_household_spm_resource_parity.pymaps 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:
adult_earnings_indexranks a household's adults by market income, so winnings now count in that ranking.cbo_household_market_incomestarts from household market income, andcbo_household_income_before_transfers_and_taxesadds that measure, so both CBO measures now count winnings too.Methodology choices
docs/spm.mdgives 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.States
al_gambling_winningskeeps only the head's and spouse's winnings in Alabama gross income.al_gambling_loss_deductiondeducts their losses up to winnings, with no 90% share, among Alabama itemized deductions (2025 Form 40 booklet).ca_wagering_losses_deductionreplaces 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).dc_itemized_deductionskeeps 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.limitation/excluded_deductions.yamllists 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).ia_gambling_winningsadds the head's and spouse's winnings to Iowa gross income.wagering_losses_allowedturns the deduction off for 2018 only, andky_itemized_deductions_unitsubtracts the federal wagering deduction that year (2019 Ky. Acts ch. 151).mi_wagering_losses_deduction, the federal wagering deduction of a federal itemizer. The new 2021 subtraction list namesmi_military_retirement_subtractionon line 11, as Restrict military survivor tax exemptions to eligible spouses #10398 does in main's other blocks.mt_wagering_losses_deduction. From 2024mt_federal_deductionsand the state income tax addback readitemized_taxable_income_deductionsalone.ny_wagering_losses_deductiondeducts all losses up to winnings under the 2017 rules, inside the itemized total and outside the limited base of the phase-out worksheet.pa_gambling_loss_offsetnets 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_additionsno longer asks users to enter gambling winnings.wagering_losses_deductionin its total, and leaves that deduction out of the reduction where it left out rawgambling_losses.itemized_taxable_income_deductionsalone. Start Vermont's 2017 taxable income from federal taxable income (former 32 V.S.A. § 5811(21)) #10595 addedwagering_losses_deductionbeside it on main, which counts the losses twice once the aggregate holds them.Merged and open PRs
This branch merges main
99d740496b4891aa8f70659e4d2aa7541245b500at71120de51a37e22d68202369147f439b6b2b88db, including #9940 and #10847. Earlier merges brought #10038, #10095, #10198, #10200, #10398 and #10595.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_deductionswithhi_itemized_deductions_reductionand a list of the deductions Hawaii's limitation leaves out, and this PR addswagering_losses_deductionto that list. Main'shi_itemized_deductions_reductionreturns 0 when the excluded deductions equal or exceed the total, or when Hawaii AGI does not exceed the threshold, sohi_itemized_deductionsequals the full total there. This PR changes only a comment in that formula. Its Hawaii cases now sit inhi_itemized_deductions.yaml(cases 14 and 15) andhi_itemized_deductions_reduction.yaml(cases 2, 3 and 8), with the same expected deductions. Case 15 setshi_charitable_deduction, which #9940 put in Hawaii's list in place of the federalcharitable_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.yamlrecordsus-mn:wagering-losses-itemized-limitation-exclusionas ruled, with PolicyEngine following the statute. The baseline excludes wagering atmn_itemized_deductions.py:68,71; the Walz reform does so atmn_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
debt_relief.Tests
At
4396452c76b0ded33511527cc4585b0548277156, each file ran in its own process:policyengine_us/tests/)policy/baseline/household/income/person/market_income.yamlpolicy/baseline/household/income/household/household_market_income.yamlpolicy/baseline/household/income/spm_unit/spm_unit_market_income.yamlpolicy/baseline/household/income/spm_unit/spm_unit_net_income.yamltest_household_spm_resource_parity.pypolicy/baseline/gov/states/nd/tax/property/renters_refund/nd_renters_refund_income.yamltest_nd_renters_refund_income_exclusions.pypolicy/baseline/gov/states/wa/dcyf/eceap/wa_eceap_income_eligible.yamlpolicy/baseline/gov/states/mo/dss/ssp/mo_ssp.yamlpolicy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_wagering_losses_deduction.yamlpolicy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_claim_of_right_deduction.yamlpolicy/baseline/gov/states/mt/tax/income/deductions/mt_federal_deductions.yamlpolicy/baseline/gov/states/mn/tax/income/mn_itemized_deductions.yamlpolicy/baseline/gov/states/ks/tax/income/ks_itemized_deductions.yamlpolicy/baseline/gov/states/va/tax/income/deductions/va_itemized_deductions.yamlpolicy/baseline/gov/states/wi/tax/income/wi_itemized_deduction_credit.yamlcode_health/test_source_conflicts.pyWith 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_winningsas 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
86c3e2f48fpassed all 37 jobs on GitHub's merge with main94054aa57e.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:policyengine_us/tests/)policy/baseline/gov/states/hi/tax/income/deductions/itemized/hi_itemized_deductions.yamlpolicy/baseline/gov/states/hi/tax/income/deductions/itemized/hi_itemized_deductions_reduction.yamlcore/test_hi_itemized_deduction_limitation_properties.pyWith
wagering_losses_deductionremoved from Hawaii's excluded list, case 9 ofhi_itemized_deductions_reduction.yamlfails, with a reduction of $8,000 against $4,800. Case 14 ofhi_itemized_deductions.yamlfails 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
Microsimulation impact
We estimate that this branch changes none of the outputs below in 2026 on the default dataset, where
gambling_winningsandwagering_losses_deductiontotal $0. We comparedmainat99d740496bwith this branch at86c3e2f48f.gambling_winningswagering_losses_deductionadjusted_gross_incomeitemized_taxable_income_deductionshi_itemized_deductionsks_itemized_deductionsny_itemized_deductions_maxca_itemized_deductions_pre_limitationmarket_incomestate_income_taxincome_taxhousehold_benefitshousehold_net_incomeAxiom
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