Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
edf7cf1
Add North Carolina's claim of right repayment itemized deduction
MaxGhenis Oct 9, 2026
3b57231
From 2026 limit North Carolina's claim of right deduction to income N…
MaxGhenis Oct 9, 2026
a6a96cd
Model the section 1341 claim of right deduction and credit; wire Nort…
MaxGhenis Oct 9, 2026
4526aed
Keep the federal claim of right deduction and credit out of state rul…
MaxGhenis Oct 10, 2026
09ee710
Document the unmodeled pre-2018 small repayment deduction; changelog …
MaxGhenis Oct 10, 2026
0343962
Fix the federal method in the North Carolina worksheet property test …
MaxGhenis Oct 10, 2026
8f268ca
Remove a stray empty log file
MaxGhenis Oct 10, 2026
6c2a76e
Address review: isolate the method branches, compare to the cent, ret…
MaxGhenis Oct 10, 2026
c2b9602
Keep the simulation's claim of right method in the itemizing branches
MaxGhenis Oct 10, 2026
81528e0
Merge main into North Carolina claim of right deduction
MaxGhenis Oct 11, 2026
1500215
Merge PR 10028's branch (with main) into the section 1341 branch
MaxGhenis Oct 11, 2026
9c98f0d
Restore conservative branch invalidation; fix the method in itemizing…
MaxGhenis Oct 11, 2026
de58d20
Merge main into the section 1341 branch
MaxGhenis Oct 11, 2026
dc10cc5
Test both NC contrib credits stacked on the claim of right payment wi…
MaxGhenis Oct 11, 2026
589d72c
List the states whose own claim of right relief applies under the fed…
MaxGhenis Oct 13, 2026
1c2be5a
Model Arkansas's claim of right deduction (Ark. Code § 26-51-457)
MaxGhenis Oct 13, 2026
2d36a76
Merge main into the section 1341 branch
MaxGhenis Oct 13, 2026
5e8fe82
Test an Arkansas repayment partly never taxed by Arkansas; say small …
MaxGhenis Oct 13, 2026
c924980
Merge #10038's merge of main into the ar-claim-of-right branch
MaxGhenis Oct 13, 2026
32b0c13
Carry the claim of right deduction into Montana itemized deductions f…
MaxGhenis Oct 13, 2026
53ccdba
Merge #10038's Montana 2024 list change into the ar-claim-of-right br…
MaxGhenis Oct 13, 2026
6f34ccd
Merge main into the section 1341 branch
MaxGhenis Oct 14, 2026
ed83f4e
Merge #10038's merge of main (6f34ccde23) into the ar-claim-of-right …
MaxGhenis Oct 14, 2026
d1c695b
Give every itemizing branch the simulation's claim of right method
MaxGhenis Oct 14, 2026
d86a5cd
Merge #10038's d1c695b2f7 (itemizing branches inherit the claim of ri…
MaxGhenis Oct 14, 2026
17cad4b
Drop #10028's merged changelog fragment; date period_branch's set_inp…
MaxGhenis Oct 14, 2026
71d08b1
Merge #10038's 17cad4b53b (drops the compiled NC changelog fragment) …
MaxGhenis Oct 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/ar-claim-of-right.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Arkansas's claim of right deduction (Ark. Code § 26-51-457): a repayment over $3,000 of income Arkansas taxed in an earlier year is a miscellaneous itemized deduction above 2% of Arkansas AGI, whichever federal method applies.
1 change: 1 addition & 0 deletions changelog.d/federal-claim-of-right-1341.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the federal claim of right repayment deduction and section 1341 credit (26 U.S.C. 1341), North Carolina's bar on its claim of right deduction when federal tax is computed under section 1341(a)(5), and North Carolina's tax payment for restored income (G.S. 105-266.2).
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ values:
- mo_refundable_credits # Missouri.
- ms_refundable_credits # Mississippi.
- mt_refundable_credits # Montana.
# Skip NC which has no refundable credits.
- nc_refundable_credits # North Carolina.
- nd_refundable_credits # North Dakota.
- ne_refundable_credits # Nebraska.
- nh_refundable_credits # New Hampshire.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ values:
- mo_refundable_credits # Missouri.
- ms_refundable_credits # Mississippi.
- mt_refundable_credits # Montana.
# Skip NC which has no refundable credits.
- nc_refundable_credits # North Carolina.
- nd_refundable_credits # North Dakota.
- ne_refundable_credits # Nebraska.
- nh_refundable_credits # New Hampshire.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ values:
- mo_income_tax_before_refundable_credits
- ms_income_tax_before_credits_unit
- mt_income_tax_before_refundable_credits_unit
- nc_income_tax # NC has no refundable credits.
- nc_income_tax_before_refundable_credits
- nd_income_tax_before_refundable_credits
- ne_income_tax_before_refundable_credits
- nh_income_tax_before_refundable_credits
Expand Down
3 changes: 3 additions & 0 deletions policyengine_us/parameters/gov/irs/credits/refundable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ values:
- refundable_ctc
- recovery_rebate_credit
- refundable_payroll_tax_credit
- claim_of_right_credit
# Currently, the premium tax credit is not included in the refundable tax credits.
# Add CDCC in 2021.
2021-01-01:
Expand All @@ -14,6 +15,7 @@ values:
- refundable_ctc
- recovery_rebate_credit
- refundable_payroll_tax_credit
- claim_of_right_credit
# Currently, the premium tax credit is not included in the refundable tax credits.
- cdcc
# Remove CDCC in 2022.
Expand All @@ -23,6 +25,7 @@ values:
- refundable_ctc
- recovery_rebate_credit
- refundable_payroll_tax_credit
- claim_of_right_credit
# Currently, the premium tax credit is not included in the refundable tax credits.
metadata:
unit: list
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: The IRS computes tax for the year of repayment as the lesser of the tax with a deduction for the repayment and the tax without it less the resulting decrease in prior-year tax, when the repayment of income held under a claim of right exceeds this amount.
values:
1954-01-01: 3_000
metadata:
unit: currency-USD
period: year
label: Claim of right repayment threshold
reference:
- title: 26 U.S. Code § 1341(a)(3)
href: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapQ-partV-sec1341.htm
- title: 26 U.S. Code § 67(b)(9)
href: https://www.law.cornell.edu/uscode/text/26/67#b_9
- title: 26 CFR 1.1341-1(a)(3)
href: https://www.ecfr.gov/current/title-26/chapter-I/subchapter-A/part-1/subject-group-ECFR4c74bc8cf7c11fb/section-1.1341-1
- title: "Publication 525 (2025), Repayments #page 36-37"
href: https://www.irs.gov/pub/irs-prior/p525--2025.pdf#page=36
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ values:
- medical_expense_deduction
- casualty_loss_deduction
- misc_deduction
- claim_of_right_deduction
2020-01-01:
- charitable_deduction
- charitable_deduction_for_non_itemizers
Expand All @@ -15,13 +16,15 @@ values:
- medical_expense_deduction
- casualty_loss_deduction
- misc_deduction
- claim_of_right_deduction
2022-01-01:
- charitable_deduction
- interest_deduction
- salt_deduction
- medical_expense_deduction
- casualty_loss_deduction
- misc_deduction
- claim_of_right_deduction
metadata:
unit: list
label: itemized deductions
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Arkansas allows the claim of right deduction when the amount restored on the return is more than this amount.
values:
2013-01-01: 3_000
metadata:
unit: currency-USD
period: year
label: Arkansas claim of right deduction threshold
reference:
- title: "Ark. Code § 26-51-457, enacted by Act 1284 of 2013, adopting 26 U.S.C. § 1341(a)(1)-(3) as of January 1, 2013 #page 1-2"
href: https://www.arkleg.state.ar.us/Acts/FTPDocument?path=%2FACTS%2F2013R%2FPublic%2F&file=1284.pdf&ddBienniumSession=2013%2F2013R#page=1
- title: 26 U.S.C. § 1341(a)(3)
href: https://www.law.cornell.edu/uscode/text/26/1341#a_3
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
description: Arkansas subjects these miscellaneous itemized deductions to the floor of a share of Arkansas adjusted gross income.
values:
1987-01-01:
- total_misc_deductions
2013-01-01:
- total_misc_deductions
# Ark. Code § 26-51-437(b) does not list the § 26-51-457 deduction among
# the itemized deductions that are not miscellaneous.
- ar_claim_of_right_deduction
metadata:
unit: list
period: year
label: Arkansas miscellaneous itemized deduction sources
reference:
- title: Ark. Code § 26-51-437, enacted by Act 382 of 1987, § 28
href: https://www.arkleg.state.ar.us/Acts/FTPDocument?path=%2FACTS%2F1987R%2FPublic%2F&file=382.pdf&ddBienniumSession=1987%2F1987R#page=9
- title: Ark. Code § 26-51-437(b), cross-references updated by Act 614 of 2025, § 7
href: https://www.arkleg.state.ar.us/Acts/FTPDocument?path=%2FACTS%2F2025R%2FPublic%2F&file=614.pdf&ddBienniumSession=2025%2F2025R#page=4
- title: Ark. Code § 26-51-457, enacted by Act 1284 of 2013
href: https://www.arkleg.state.ar.us/Acts/FTPDocument?path=%2FACTS%2F2013R%2FPublic%2F&file=1284.pdf&ddBienniumSession=2013%2F2013R#page=1
- title: 2025 Form AR3, lines 20-25 (miscellaneous deductions subject to the 2% AGI limit)
href: https://www.dfa.arkansas.gov/wp-content/uploads/2025_AR3_ItemizedDeduction.pdf#page=1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ values:
- mo_income_tax_before_refundable_credits
- ms_income_tax_before_credits_unit
- mt_income_tax_before_refundable_credits_unit
- nc_income_tax
- nc_income_tax_before_refundable_credits
- nd_income_tax_before_refundable_credits
- ne_income_tax_before_refundable_credits
- nh_income_tax_before_refundable_credits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ values:
- mo_refundable_credits # Missouri.
- ms_refundable_credits # Mississippi.
- mt_refundable_credits # Montana.
# Skip NC which has no refundable credits.
- nc_refundable_credits # North Carolina.
- nd_refundable_credits # North Dakota.
- ne_refundable_credits # Nebraska.
- nh_refundable_credits # New Hampshire.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ description: Missouri ignores the following credits in federal income tax deduct
# Part I Line 3, and the net premium tax credit (Schedule 3 Line 9). Credits
# claimed on Line 28 (refundable CTC) and Line 30 (recovery rebate), and the
# 2021 refundable CDCC (Schedule 3 Line 13g), never reduce Line 22, so they
# are added back here. The EIC is not added back: the Line 9 instructions say
# are added back here. So is the section 1341 credit for repaid claim of right
# income (Schedule 3 Line 13b). The EIC is not added back: the Line 9 instructions say
# "If you have an earned income credit, you must subtract the credit from the
# tax on your federal return."
values:
2018-01-01:
- recovery_rebate_credit
- refundable_ctc
- claim_of_right_credit
# The CDCC is a refundable credit only in 2021 (ARPA); in other years it
# already reduces income tax before refundable credits, so adding it back
# would overstate the base.
2021-01-01:
- recovery_rebate_credit
- refundable_ctc
- claim_of_right_credit
- cdcc
2022-01-01:
- recovery_rebate_credit
- refundable_ctc
- claim_of_right_credit
metadata:
unit: list
label: Missouri ignored credits in federal income tax deduction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ description: Montana counts these sources as miscellaneous deductions.
values:
2021-01-01:
- casualty_loss_deduction
2024-01-01: []

# Form 2 itemized deductions line 18 follows federal Schedule A line 16.
- mt_claim_of_right_deduction
# From 2024 Form 2 line 2 takes the federal itemized deductions (Worksheet A
# line 1: Form 1040 line 12), which include Schedule A line 16.
2024-01-01:
- mt_claim_of_right_deduction

metadata:
unit: list
label: Montana miscellaneous deductions
label: Montana miscellaneous deductions
period: year
reference:
- title: 2023 Montana Form 2 instructions, itemized deductions line 18
href: https://revenue.mt.gov/files/forms/Montana-Individual-Income-Tax-Return-Form-2-Instructions/2023_Montana_Individual_Income_Tax_Return_Form_2_Instructions.pdf#page=39
- title: 2024 Montana Form 2 instructions, line 2 and Worksheet A
href: https://revenue.mt.gov/files/forms/Montana-Individual-Income-Tax-Return-Form-2-Instructions/2024_Montana_Individual_Income_Tax_Return_Form_2_Instructions.pdf#page=15
- title: Montana Individual Income Tax Return (Form 2) 2024
href: https://revenuefiles.mt.gov/files/Forms/Montana-Individual-Income-Tax-Return-Form-2-Instructions/2024_Montana_Individual_Income_Tax_Return_Form_2_Instructions.pdf#page=8
- title: Montana Individual Income Tax Return (Form 2) 2022
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: North Carolina provides these refundable income tax credits and payments.
values:
1995-01-01:
- nc_claim_of_right_payment
metadata:
unit: list
period: year
label: North Carolina refundable income tax credits
reference:
- title: N.C. Gen. Stat. § 105-266.2
href: https://www.ncleg.gov/EnactedLegislation/Statutes/HTML/BySection/Chapter_105/GS_105-266.2.html
- title: S.L. 1997-213, Section 2 (effective for taxable years beginning on or after January 1, 1995)
href: https://www.ncleg.gov/EnactedLegislation/SessionLaws/HTML/1997-1998/SL1997-213.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ values:
- real_estate_taxes
- casualty_loss_deduction
- va_capped_state_and_local_sales_or_income_tax
# Schedule A line 16b, other itemized deductions.
- claim_of_right_deduction
metadata:
unit: list
period: year
label: Virginia itemized deductions reduction applicable deduction sources
reference:
- title: "2025 Virginia Schedule A Itemized Deductions, line 16b and Limited Itemized Deduction Worksheet line 1 #page 1-2"
href: https://www.tax.virginia.gov/sites/default/files/taxforms/individual-income-tax/2025/schedule-2025.pdf#page=1
- title: 2024 Virginia Schedule A Itemized Deductions
href: https://www.tax.virginia.gov/sites/default/files/taxforms/individual-income-tax/2024/schedule-2024.pdf#page=2
- title: 2023 Virginia Schedule A Itemized Deductions
Expand Down
36 changes: 15 additions & 21 deletions policyengine_us/reforms/states/nc/cdcc/nc_cdcc_reform.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,35 @@ class nc_refundable_credits(Variable):
unit = USD
definition_period = YEAR
defined_for = StateCode.NC
# Baseline computes this via `adds`; replacing it with a
# formula requires clearing the inherited computation mode
# (the core engine rejects `formula` + `adds`/`subtracts`).
adds = None
subtracts = None

def formula(tax_unit, period, parameters):
# Preserve the baseline refundable credits and ADD the new
# CDCC (see #8775). Baseline nc_income_tax subtracts
# nc_refundable_credits and excludes nc_use_tax, which
# state_use_tax already counts, so no override of it is needed.
baseline_credits = parameters(
period
).gov.states.nc.tax.income.credits.refundable
total = add(tax_unit, period, list(baseline_credits)) + tax_unit(
"nc_cdcc", period
)
# Stack with nc_eitc when the NC EITC contrib reform is also
# active, so enabling both NC contrib credits sums rather than
# overwrites.
total = tax_unit("nc_cdcc", period)
variables = tax_unit.simulation.tax_benefit_system.variables
if "nc_eitc" in variables:
total = total + tax_unit("nc_eitc", period)
return total

class nc_income_tax(Variable):
value_type = float
entity = TaxUnit
label = "North Carolina income tax"
unit = USD
definition_period = YEAR
defined_for = StateCode.NC

def formula(tax_unit, period, parameters):
tax_before_credits = add(
tax_unit, period, ["nc_income_tax_before_credits", "nc_use_tax"]
)
non_refundable_credits = tax_unit("nc_non_refundable_credits", period)
tax_before_refundable = max_(0, tax_before_credits - non_refundable_credits)

refundable_credits = tax_unit("nc_refundable_credits", period)

return tax_before_refundable - refundable_credits

class reform(Reform):
def apply(self):
self.update_variable(nc_cdcc)
self.update_variable(nc_refundable_credits)
self.update_variable(nc_income_tax)

return reform

Expand Down
37 changes: 15 additions & 22 deletions policyengine_us/reforms/states/nc/eitc/nc_eitc_reform.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,28 @@ class nc_refundable_credits(Variable):
unit = USD
definition_period = YEAR
defined_for = StateCode.NC
# Baseline computes this via `adds`; replacing it with a
# formula requires clearing the inherited computation mode
# (the core engine rejects `formula` + `adds`/`subtracts`).
adds = None
subtracts = None

def formula(tax_unit, period, parameters):
return tax_unit("nc_eitc", period)

class nc_income_tax(Variable):
value_type = float
entity = TaxUnit
label = "North Carolina income tax"
unit = USD
definition_period = YEAR
defined_for = StateCode.NC

def formula(tax_unit, period, parameters):
# Mirror baseline nc_income_tax, which uses
# nc_income_tax_before_credits and does NOT add nc_use_tax. This
# reform's only change is subtracting the new refundable EITC;
# adding use tax here would raise tax for every filer (even those
# with no EITC). See #8775.
tax_before_credits = tax_unit("nc_income_tax_before_credits", period)
non_refundable_credits = tax_unit("nc_non_refundable_credits", period)
tax_before_refundable = max_(0, tax_before_credits - non_refundable_credits)
refundable_credits = tax_unit("nc_refundable_credits", period)
return tax_before_refundable - refundable_credits
# Preserve the baseline refundable credits and ADD the new
# EITC. Baseline nc_income_tax subtracts nc_refundable_credits
# and excludes nc_use_tax, so no override of it is needed.
# See #8775.
baseline_credits = parameters(
period
).gov.states.nc.tax.income.credits.refundable
return add(tax_unit, period, list(baseline_credits)) + tax_unit(
"nc_eitc", period
)

class reform(Reform):
def apply(self):
self.update_variable(nc_eitc)
self.update_variable(nc_refundable_credits)
self.update_variable(nc_income_tax)

return reform

Expand Down
5 changes: 4 additions & 1 deletion policyengine_us/tests/core/test_override_branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
on the seeded sample and on random households (Hypothesis).
3. Each comparison branch equals a fresh simulation that sets the overridden
input before anything is calculated (a differential test of the branch
against the reference path).
against the reference path). These households repay no claim of right
income; with a qualifying repayment the itemizing branches also fix the
claim of right method, so a reference must fix it too
(``test_claim_of_right_section_1341_properties.py`` covers that case).
4. The same holds when the parent has already calculated the overridden
input, and when an earlier year was calculated first.
5. When the branch drops what it copied, it keeps exactly the values set as
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- name: Case 1, the credit is the prior-year decrease when tax is computed under section 1341(a)(5).
period: 2025
input:
claim_of_right_section_1341_eligible: true
claim_of_right_credit_applies: true
claim_of_right_prior_year_tax_decrease: 1_234
output:
claim_of_right_credit: 1_234

- name: Case 2, no credit under section 1341(a)(4).
period: 2025
input:
claim_of_right_section_1341_eligible: true
claim_of_right_credit_applies: false
claim_of_right_prior_year_tax_decrease: 1_234
output:
claim_of_right_credit: 0

- name: Case 3, no credit without a qualifying repayment.
period: 2025
input:
claim_of_right_section_1341_eligible: false
claim_of_right_credit_applies: true
claim_of_right_prior_year_tax_decrease: 1_234
output:
claim_of_right_credit: 0
Loading
Loading