Skip to content

Add North Carolina's wagering losses itemized deduction from 2025 (G.S. 105-153.5(a)(2)e) - #10110

Draft
MaxGhenis wants to merge 17 commits into
mainfrom
nc-wagering-losses-deduction
Draft

MaxGhenis wants to merge 17 commits into
mainfrom
nc-wagering-losses-deduction

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

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's wagering_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:

Until both merge, the diff against main also shows their changes. Against the merge of their current heads (#10028 at 81528e0207, #10070 at 4bfb615ab7), this branch adds only nc_wagering_losses_deduction.py, its in_effect parameter, one line in other_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):

e. The amount allowed as a deduction for wagering losses under section 165(d) of the Code, to the extent the losses are not deducted in arriving at adjusted gross income.

§ 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, main and this branch

NCDOR'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 (main ff479aa74a) and ~/reviews/us-hub/gambling-9637/evidence/households_nc_wagering.json (this branch with the federal fix, head de24c038a8).

Case main: AGI, NC income tax Branch: AGI, deduction, NC taxable income, NC income tax Law
2025, PE's own AGI $60,000, $2,008.12 (winnings missing from AGI) $70,000, $10,000, $55,000, $2,337.50 $2,337.50
2025, AGI given as $70,000 $70,000, $2,433.12 (no wagering deduction) $70,000, $10,000, $55,000, $2,337.50 $2,337.50
2024, AGI $70,000 $70,000, $2,576.25 $70,000, $0 (none before 2025), $57,250, $2,576.25 $2,576.25
2025, no gambling $60,000, $2,008.12 $60,000, $0, $47,250, $2,008.12 $2,008.12

$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; and nc_income_tax integration 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.
  • Five checks guarded this deduction on the federal fix: the YAML 2026 and dependent cases, the 2026 section 165(d) check, and the modeled-AGI checks for 2025 and 2026. They failed before Count gambling winnings in federal gross income and fix the wagering losses deduction #10070 and pass after it, with their inputs and expectations unchanged. Two other 2026 property checks compared sums near $30,000 at a tolerance of $0.000001; once the deduction is 90% of losses, float32 rounding reaches $0.0016, so their tolerance is now $0.01.
  • At 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_RESULTS

Microsimulation

A real 2026 run on populace_us_2024.h5@populace-us-2024-spm-20260909 at de24c038a8, against the federal branch's run at f7f555818f (~/reviews/us-hub/gambling-9637/evidence/impact-ncw9637-2026.json): zero change on every record in state_income_tax, income_tax, taxable_income, adjusted_gross_income and household_net_income. gambling_winnings, gambling_losses and wagering_losses_deduction are 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

MaxGhenis and others added 17 commits October 9, 2026 08:50
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>
…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

This branch has not been deployed

No deployments
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