Repository navigation
Conversation
G.S. 105-153.5(a)(2)d, added by S.L. 2016-5 for 2014 and later, lets North Carolina itemizers deduct repayments of income included in AGI in an earlier year under a claim of right (Form D-400 Schedule A line 8). Repayments above $3,000 are deductible in full; smaller ones are reduced by 2% of federal AGI less other miscellaneous itemized deductions, which the 2016 and 2025 NCDOR worksheets both reproduce. PE had no input for these repayments, so it adds claim_of_right_repayment (person level; only the head's and spouse's count) and moves North Carolina's uncapped itemized items into a parameter list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…C taxed Review r1 (subfleet 20261009-090558-nc-itemized-review): - S.L. 2026-31 section 1.8 rewrites G.S. 105-153.5(a)(2)d for taxable years beginning on or after January 1, 2026: the repaid amount must have been included in AGI "as modified in G.S. 105-153.5 and G.S. 105-153.6" in the earlier year. New person input nc_claim_of_right_repayment_excluded_from_income (the part NC deducted when received, such as repaid Social Security) and a dated parameter apply it. - Count only the head's and spouse's other miscellaneous expenses against the pre-2018 floor; a dependent's are on the dependent's return. - The property grid now varies property taxes (so the $20,000 cap binds) and adds a 2026 grid for the excluded part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G.S. 105-153.5(a)(2)d, added by S.L. 2016-5 for 2014 and later, lets North Carolina itemizers deduct repayments of income included in AGI in an earlier year under a claim of right (Form D-400 Schedule A line 8). Repayments above $3,000 are deductible in full; smaller ones are reduced by 2% of federal AGI less other miscellaneous itemized deductions, which the 2016 and 2025 NCDOR worksheets both reproduce. PE had no input for these repayments, so it adds claim_of_right_repayment (person level; only the head's and spouse's count) and moves North Carolina's uncapped itemized items into a parameter list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…C taxed Review r1 (subfleet 20261009-090558-nc-itemized-review): - S.L. 2026-31 section 1.8 rewrites G.S. 105-153.5(a)(2)d for taxable years beginning on or after January 1, 2026: the repaid amount must have been included in AGI "as modified in G.S. 105-153.5 and G.S. 105-153.6" in the earlier year. New person input nc_claim_of_right_repayment_excluded_from_income (the part NC deducted when received, such as repaid Social Security) and a dated parameter apply it. - Count only the head's and spouse's other miscellaneous expenses against the pre-2018 floor; a dependent's are on the dependent's return. - The property grid now varies property taxes (so the $20,000 cap binds) and adds a 2026 grid for the excluded part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
S.L. 2026-41 section 44.2 (approved July 7, 2026) adds G.S. 105-153.5(a)(2)e for taxable years beginning on or after January 1, 2025: North Carolina itemizers may deduct the wagering losses allowed under section 165(d), to the extent not deducted in arriving at AGI (2025 Form D-400 Schedule A line 9, per NCDOR's July 23, 2026 notice and September 11, 2026 FAQs). nc_wagering_losses_deduction is the federal wagering_losses_deduction from 2025. Do not merge before federal gross income counts gambling winnings (#9637). Until then PE's AGI omits the winnings this deduction offsets, so the deduction would take North Carolina tax further below the correct amount for every gambler with losses. For one who itemizes either way and whose losses at least equal the winnings, main is right by accident and this change alone would understate NC taxable income by the winnings. test_gambling_never_lowers_taxable_income_with_modeled_agi fails until then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 (subfleet 20261009-090558-nc-itemized-review): the NC deduction takes the federal section 165(d) amount, so it inherits two more federal defects besides gambling winnings missing from AGI (#9637): - no 90% share of losses from 2026 (P.L. 119-21 section 70114, in NC's July 5, 2025 Code); - dependents' gambling summed onto the filer's deduction, although federal gross income leaves dependents' income out. Each now has a guard that fails until it is fixed federally: YAML cases for $8,000 of 2026 losses ($7,200) and a dependent's gambling ($0), and a law-based min(share x losses, winnings) property. The property grid now varies property taxes so the standard-deduction crossover is exercised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
…come' into nc-wagering-losses-deduction
…eform's formula Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From 2026 the deduction is 90% of losses and no longer a whole number; sums near 30,000 resolve to about 0.002 in float32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only: the guards' inputs, expectations and assertions are unchanged. 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>
…nto nc-wagering-losses-deduction # Conflicts: # policyengine_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc_deductions.yaml # policyengine_us/parameters/gov/states/nc/tax/income/deductions/itemized/other_sources.yaml
…come' into nc-wagering-losses-deduction
This was referenced Oct 11, 2026
Merged
This was referenced Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10110 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 24 16 -8
=========================================
- Hits 24 16 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6 of 8 tasks
Use the state's adopted loss share, floor the deduction at zero, and include wagering losses in itemized deductions starting in 2025. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent-written for Max, by a Codex cloud task and Claude Code for Max Ghenis; no person has reviewed it yet.
Summary
North Carolina allows taxpayers to itemize eligible wagering losses from tax year 2025. This PR applies the IRC § 165(d) rules adopted by North Carolina and includes the result in state itemized deductions outside the $20,000 mortgage and property tax cap. A taxpayer can take the federal standard deduction and still itemize in North Carolina.
The federal wagering fix (#10070) and the North Carolina claim of right deduction (#10028) are both merged. This PR adds the deduction, its effective date, North Carolina's adopted loss-share schedule, the 2025 itemized list entry, tests and a changelog fragment.
The law
S.L. 2026-41 § 44.2 added G.S. 105-153.5(a)(2)e for tax years beginning on or after January 1, 2025. North Carolina allows wagering losses deductible under IRC § 165(d) to the extent they were not deducted in arriving at AGI. Session law, PDF pp. 607–608
NCDOR's example has $10,000 of winnings in AGI and $12,000 of losses. The taxpayer can claim $10,000 on Form D-400 Schedule A, line 9. NCDOR notice
North Carolina adopts the Internal Revenue Code as enacted on July 5, 2025. From 2026, the federal allowable deduction is 90% of losses, limited to gains. S.L. 2026-31 § 12(a), PDF p. 42 · P.L. 119-21 § 70114, PDF p. 96
Household comparison
A 2025 single North Carolina filer has $60,000 of wages, $10,000 of gambling winnings, $12,000 of gambling losses and $5,000 of charitable gifts. Main and this branch both model $70,000 of AGI.
Test plan
nc_wagering_losses_deduction.yamlpasses all 15 cases, including the federal-only reform, both negative input cases, federal standard deduction with North Carolina itemization, and a saturated mortgage cap.nc_itemized_deductions.yamlpasses all seven cases, including the 2024 override.test_nc_wagering_losses_properties.py: a 196-point grid; all 13 properties pass. With AGI given, it checks the lower bound, the upper bound and the exact net gain for a filer who itemizes either way. With modeled AGI, it checks that gambling never lowers North Carolina taxable income in 2025 and 2026.axiom: TheAxiomFoundation/rulespec-us#1656 queued
🤖 Generated with Claude Code