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 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.
Summary
North Carolina allows itemizers to deduct wagering losses from tax year 2025. This PR adds
nc_wagering_losses_deduction: the wagering losses allowed under 26 U.S.C. 165(d) (PE'swagering_losses_deduction), from 2025, counted in North Carolina itemized deductions outside the $20,000 mortgage and property tax cap.Depends on two open PRs; its own change is six files on top of them:
wagering_losses_deductionallows 90% of losses from 2026 (P.L. 119-21 § 70114), and it counts only the head's and spouse's gambling.other_sourceslist this extends.Until both merge, the diff against
mainalso shows their changes. Against the merge of their current heads (#10028 at81528e0207, #10070 at4bfb615ab7), this branch adds onlync_wagering_losses_deduction.py, itsin_effectparameter, one line inother_sources.yaml, the YAML and property tests, and the changelog fragment.The law
S.L. 2026-41 § 44.2.(a) (PDF pp. 607–608; ratified July 2, 2026, approved July 7, 2026) adds sub-subdivision e. to G.S. 105-153.5(a)(2):
§ 44.2.(b): "This section is effective for taxable years beginning on or after January 1, 2025."
NCDOR's notice of July 23, 2026 (updated July 29) gives an example. Jane Smith had $10,000 of 2025 gambling winnings, all in AGI, and $12,000 of losses; she "can include $10,000 in gambling losses". The deduction goes on Form D-400 Schedule A line 9 for 2025. NCDOR's FAQs of September 11, 2026, Q36–Q40 (PDF pp. 11–12): the winnings must be reported as income, cannot be reduced by the losses, and the losses are claimed separately as an NC itemized deduction.
North Carolina's Code is the Internal Revenue Code as of July 5, 2025 (S.L. 2026-31 § 12.(a)). That includes P.L. 119-21 § 70114, which allows 90% of losses from 2026, so North Carolina follows the federal amount in 2026 too.
Households,
mainand this branchNCDOR's example as a 2025 single return: wages $60,000, gambling winnings $10,000, losses $12,000, charity $5,000. Evidence:
~/reviews/us-hub/nc-itemized-other/evidence/households_main.json(mainff479aa74a) and~/reviews/us-hub/gambling-9637/evidence/households_nc_wagering.json(this branch with the federal fix, headde24c038a8).main: AGI, NC income tax$55,000 = $70,000 − ($10,000 wagering + $5,000 charity); 4.25% × $55,000 = $2,337.50.
Tests
nc_wagering_losses_deduction.yaml: ten cases. None before 2025; NCDOR's example; losses below winnings; spouses combined; 2026; 2026 at 90% ($8,000 of losses → $7,200); a dependent's gambling ($0); a non-NC household; andnc_income_taxintegration for 2025 and 2024.test_nc_wagering_losses_properties.py: a 196-point grid (winnings × losses × charity × property tax), three vectorized simulations per year for 2024–2026 (winnings in AGI, no gambling, PE's own AGI). Invariants: zero before 2025; equal to min(share × losses, winnings) with the share restated from the statute; bounded by winnings and losses and monotone in each; adds one for one to NC itemized deductions outside the cap; gambling never lowers NC taxable income and raises it by at most the winnings, by exactly the net gain for a filer who itemizes either way, with AGI given and with PE's own AGI.de24c038a8(~/reviews/us-hub/gambling-9637/evidence/nc_r2.log): NC deduction and income tax YAML 63 passed; both NC property files 20 passed in 2.9 s of tests, 44 s wall, 1.04 GB peak RSS (local macOS, not a CI figure). NC_R3_RESULTSMicrosimulation
A real 2026 run on
populace_us_2024.h5@populace-us-2024-spm-20260909atde24c038a8, against the federal branch's run atf7f555818f(~/reviews/us-hub/gambling-9637/evidence/impact-ncw9637-2026.json): zero change on every record instate_income_tax,income_tax,taxable_income,adjusted_gross_incomeandhousehold_net_income.gambling_winnings,gambling_lossesandwagering_losses_deductionare zero on every record, because the dataset has no gambling, so the deduction is zero everywhere.Axiom
axiom: N.C. Gen. Stat. 105-153.5(a)(2)e TheAxiomFoundation/rulespec-us#1656 queued
🤖 Generated with Claude Code