Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 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
2d36a76
Merge main into the section 1341 branch
MaxGhenis Oct 13, 2026
32b0c13
Carry the claim of right deduction into Montana itemized deductions f…
MaxGhenis Oct 13, 2026
6f34ccd
Merge main into the section 1341 branch
MaxGhenis Oct 14, 2026
d1c695b
Give every itemizing branch the simulation's claim of right method
MaxGhenis Oct 14, 2026
17cad4b
Drop #10028's merged changelog fragment; date period_branch's set_inp…
MaxGhenis Oct 14, 2026
184a75b
Clarify federal claim of right input documentation
MaxGhenis Oct 18, 2026
0871d52
Keep claim of right threshold references specific to its value
MaxGhenis Oct 18, 2026
6612771
Explain Wisconsin claim of right worksheet interpretation
MaxGhenis Oct 18, 2026
4944560
Carry the federal claim of right deduction into California itemized d…
MaxGhenis Oct 18, 2026
60cb3dd
Require section 1341 eligibility for North Carolina repayment relief
MaxGhenis Oct 18, 2026
e1d600a
Merge remote-tracking branch 'gh/main' into federal-claim-of-right-1341
MaxGhenis Oct 20, 2026
2216889
Align NC refundable claim-of-right accounting with state tax invariants
MaxGhenis Oct 20, 2026
7c24ccf
Apply statute-first claim-of-right treatment in AL MO OR WI and VA
MaxGhenis Oct 20, 2026
2c4d303
Complete Montana repayment deductions and federal taxable income base
MaxGhenis Oct 20, 2026
23bf40a
Preserve Alabama federal deduction credit treatment before 2021
MaxGhenis Oct 20, 2026
aae7056
Document Alabama credit-list verification boundary
MaxGhenis Oct 20, 2026
c69ccc4
Correct entities in Montana repayment regression fixtures
MaxGhenis Oct 20, 2026
3fdef4d
Remove duplicate household inputs from Montana fixtures
MaxGhenis Oct 20, 2026
2ea81fc
Merge remote-tracking branch 'gh/main' into federal-claim-of-right-1341
MaxGhenis Oct 20, 2026
1ab1b5e
Fix Montana state-tax adjustment before taxable-income floor
MaxGhenis Oct 20, 2026
466d7e0
Correct tax-unit inputs in Montana property test
MaxGhenis Oct 20, 2026
bccaeca
Merge main into federal-claim-of-right-1341
MaxGhenis Oct 22, 2026
858dca3
Merge main into federal-claim-of-right-1341
MaxGhenis Oct 23, 2026
4b8cdd1
Merge current main into federal-claim-of-right-1341
MaxGhenis Oct 23, 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/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). Carry the federal claim of right deduction into California itemized deductions by default through Schedule CA column A. Require section 1341 eligibility for North Carolina's payment and deduction bar, including when the federal method is supplied as an input. Keep North Carolina's refundable payment in the state and household accounting totals. Apply statute-first federal-tax deduction treatment in Alabama, Missouri and Oregon, retain qualifying repayments in Wisconsin's itemized credit base, and complete Montana and Virginia repayment and historical miscellaneous-deduction treatment.
1 change: 1 addition & 0 deletions changelog.d/mt-taxable-income-adjustment-order.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Apply Montana's capped state-income-tax adjustment before flooring the federal taxable-income base at zero.
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,14 @@
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 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
metadata:
unit: list
label: itemized deductions
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
description: Alabama subtracts the following credits for the federal tax deduction.
values:
2021-01-01:
# Preserve the model's historical list until pre-2021 sources are verified.
# An explicit date prevents the system's automatic 2015 backdating from
# extending the verified 2021 correction to earlier years.
2015-01-01:
- eitc
- american_opportunity_credit
- refundable_ctc
2021-01-01:
- eitc
- refundable_american_opportunity_credit
- refundable_ctc
- claim_of_right_credit
- net_premium_tax_credit
- al_other_federal_payment_credits

metadata:
unit: list
period: year
label: Alabama federal tax deduction subtractable credits
reference:
- title: Alabama Code Title 40. Revenue and Taxation § 40-18-21
href: https://law.justia.com/codes/alabama/title-40/chapter-18/article-1/section-40-18-21/
- title: Alabama Code § 40-18-15(c)
href: https://alison.legislature.state.al.us/code-of-alabama?section=40-18-15
- title: Alabama Administrative Code r. 810-3-15-.20(1)(d)2
href: https://www.revenue.alabama.gov/wp-content/uploads/2021/12/810-3-15-.20.pdf#page=2
- title: 2021 Alabama Form 40A Instructions
href: https://www.revenue.alabama.gov/wp-content/uploads/2022/06/21f40abk.pdf#page=20
- title: 2022 Alabama Form 40A Instructions
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_refundable_credits
- 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 @@ -7,6 +7,8 @@ description: Missouri ignores the following credits in federal income tax deduct
# are added back here. 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."
# Section 143.171 reduces the base for all credits except its listed exceptions;
# the section 1341 credit is not added back.
values:
2018-01-01:
- recovery_rebate_credit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ description: Montana counts these sources as miscellaneous deductions.
values:
2021-01-01:
- casualty_loss_deduction
# Form 2 itemized deductions line 18 follows federal Schedule A line 16.
- mt_claim_of_right_deduction
# From 2024 mt_federal_deductions takes the full federal deduction.
2024-01-01: []

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,10 @@
description: Montana subtracts this share of Montana adjusted gross income from the combined pool of floor-subject miscellaneous itemized deductions.
values:
2017-01-01: 0.02
metadata:
unit: /1
period: year
label: Montana miscellaneous itemized deduction AGI floor
reference:
- title: 2017 Montana Form 2 with Legal References, Schedule III lines 21-26
href: https://mtrevenue.gov/wp-content/uploads/2018/02/2017-Form2-with-Legal-References.pdf#page=6
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Montana applies the modeled historical floor-subject miscellaneous itemized deduction component if this is true.
values:
2015-01-01: false
2017-01-01: true
2018-01-01: false
metadata:
unit: bool
period: year
label: Montana historical miscellaneous itemized deduction applies
reference:
- title: 2017 Montana Form 2 with Legal References, Schedule III lines 21-26
href: https://mtrevenue.gov/wp-content/uploads/2018/02/2017-Form2-with-Legal-References.pdf#page=6
- title: 26 U.S.C. 67, suspension of miscellaneous itemized deductions
href: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partI-sec67.htm
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,23 @@ 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
# Already reduced by the federal AGI floor; zero from 2018.
- misc_deduction
metadata:
unit: list
period: year
label: Virginia itemized deductions reduction applicable deduction sources
reference:
- title: Virginia Code Section 58.1-322.03(1)(a)
href: https://law.lis.virginia.gov/vacode/title58.1/chapter3/section58.1-322.03/
- title: Virginia Code Section 58.1-301(B)(5)
href: https://law.lis.virginia.gov/vacode/title58.1/chapter3/section58.1-301/
- title: 26 U.S.C. Section 68(a), (c), and (d), 2024 edition
href: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partI-sec68.htm
- 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
Expand Up @@ -67,11 +67,6 @@
# Lower of the joint return and separate returns on one form, each after
# refundable credits.
"MT",
# No refundable credits in baseline, so the before-refundable list holds
# nc_income_tax itself. The contributed EITC and child care credit reforms
# net their refundable credits inside nc_income_tax, which keeps NC out of
# the refundable list.
"NC",
# No tax at or below the filing threshold. The zero-out is in both
# nj_income_tax_before_refundable_credits and nj_income_tax; the second
# copy keeps tests that set the first as an input right.
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