From 317b601a64932c60e8d4ee98506fbb11262bda87 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 09:00:36 -0400 Subject: [PATCH 1/4] Add estate and trust income to state-built gross income lists Alabama, Iowa, Mississippi, New Jersey, New Mexico and Oklahoma build their own income source lists, so they missed estate_income when federal gross income gained it (#9633). Each state's law counts a beneficiary's estate or trust income in the concept. Co-Authored-By: Claude Opus 5.5 --- .../tax/income/agi/gross_income_sources.yaml | 7 +++++ .../ia/tax/income/gross_income/sources.yaml | 6 +++++ .../states/ms/tax/income/income_sources.yaml | 5 ++++ .../loss_eligible_categories/category_h.yaml | 15 +++++++++++ .../nm/tax/income/modified_gross_income.yaml | 6 ++++- .../income/credits/gross_income_sources.yaml | 9 +++++++ .../tax/income/al_estate_and_trust_income.py | 26 +++++++++++++++++++ .../adjusted_gross_income/nj_gross_income.py | 1 + 8 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml create mode 100644 policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py diff --git a/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml b/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml index c21a24968de..0a720e287cb 100644 --- a/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml @@ -19,6 +19,9 @@ values: - partnership_s_corp_income - farm_operations_income - farm_rent_income + # Form 40, Part I, line 5: rents, royalties, partnerships, S corporations, + # trusts and estates. Estate and trust losses do not pass through. + - al_estate_and_trust_income metadata: unit: list @@ -39,3 +42,7 @@ metadata: href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=7 - title: 2025 Alabama Income Tax Instructions Form 40 Booklet, Part 1, Line 4 (Other Income) href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=14 + - title: 2025 Alabama Income Tax Instructions Form 40 Booklet, Part 1, Line 5 (Rents, Royalties, Partnerships, Estates, Trusts, Etc.) + href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=15 + - title: Code of Alabama 1975 Section 40-18-25(b) (income of beneficiaries of estates and trusts) + href: https://alison.legislature.state.al.us/code-of-alabama?section=40-18-25 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml index 1abc47597d6..e95a5be3b58 100644 --- a/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml +++ b/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml @@ -13,6 +13,8 @@ values: - taxable_roth_conversions - partnership_s_corp_income - rental_income + # Line 10: rents, royalties, partnerships, estates, etc. (federal Schedule E) + - estate_income - farm_operations_income - taxable_unemployment_compensation - miscellaneous_income @@ -29,3 +31,7 @@ metadata: href: https://revenue.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=1 - title: 2022 IA1040 Income Tax Return instructions href: https://revenue.iowa.gov/media/2721/download?inline#page=11 + - title: 2021 IA1040 Expanded Instructions, line 10 (rents, royalties, partnerships, estates, etc.) + href: https://revenue.iowa.gov/media/2650/download?inline#page=19 + - title: 2022 IA1040 Expanded Instructions, line 10 (rents, royalties, partnerships, estates, etc.) + href: https://revenue.iowa.gov/media/2721/download?inline#page=19 diff --git a/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml b/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml index 4fda82326a1..c2dee51e3ab 100644 --- a/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml +++ b/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml @@ -7,6 +7,9 @@ values: - partnership_s_corp_income - loss_limited_net_capital_gains_person - rental_income + # Line 41: rental real estates, royalties, partnerships, S corporations, + # trusts, etc. (income or loss from federal Schedule E) + - estate_income - farm_operations_income - interest_income - qualified_dividend_income @@ -33,3 +36,5 @@ metadata: href: https://www.dor.ms.gov/sites/default/files/Forms/Individual/80100241.pdf#page=10 - title: Mississippi Income Tax Instructions 2025 href: https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100251%202.pdf#page=10 + - title: Mississippi Income Tax Instructions 2025, line 41 (rental real estates, royalties, partnerships, S corporations, trusts, etc.) + href: https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100251%202.pdf#page=11 diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml new file mode 100644 index 00000000000..7ad844e104a --- /dev/null +++ b/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml @@ -0,0 +1,15 @@ +description: New Jersey classifies net gains or income derived through estates or trusts as Category (h) and disregards the net if negative under the same-category rule. +values: + 2021-01-01: + - estate_income # Line 26: Income from estates and trusts (Schedule NJK-1) +metadata: + unit: list + period: year + label: NJ Category (h) - Estates and trusts + reference: + - title: N.J.S. 54A:5-1(h) + href: https://law.justia.com/codes/new-jersey/title-54a/section-54a-5-1/ + - title: N.J.S. 54A:5-2 (a net loss in one category may not be applied against another category) + href: https://law.justia.com/codes/new-jersey/title-54a/section-54a-5-2/ + - title: 2025 NJ-1040 Instructions, Line 26, Income From Estates and Trusts + href: https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf#page=21 diff --git a/policyengine_us/parameters/gov/states/nm/tax/income/modified_gross_income.yaml b/policyengine_us/parameters/gov/states/nm/tax/income/modified_gross_income.yaml index aeb990f7858..d5c5915bf83 100644 --- a/policyengine_us/parameters/gov/states/nm/tax/income/modified_gross_income.yaml +++ b/policyengine_us/parameters/gov/states/nm/tax/income/modified_gross_income.yaml @@ -17,11 +17,15 @@ values: - self_employment_income - sstb_self_employment_income - veterans_benefits + # NMSA 1978 § 7-2-2(L)(15): income from an interest in an estate or a trust + - estate_income # income such as gambling winnings, insurance settlements, scholarships, - # grants, trust income and inheritance, + # grants and inheritance, metadata: unit: list label: New Mexico modified gross income elements reference: - title: New Mexico Income Tax Act, Chapter 7 - Taxation, 7-2-2. Definitions, L href: https://nmonesource.com/nmos/nmsa/en/item/4340/index.do#!fragment/zoupio-_Toc140503656/BQCwhgziBcwMYgK4DsDWszIQewE4BUBTADwBdoAvbRABwEtsBaAfX2zgEYAWABgFYeAZgBsfYQEoANMmylCEAIqJCuAJ7QA5BskRCYXAiUr1WnXoMgAynlIAhdQCUAogBknANQCCAOQDCTyVIwACNoUnZxcSA + - title: 2025 PIT-RC instructions, line 11 (income from an estate or trust) + href: https://taxsim.nber.org/historical_state_tax_forms/NM/2025/NM_PIT_RC_INST.PDF#page=4 diff --git a/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml b/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml index 562c3eb6094..e4163ff27b0 100644 --- a/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml @@ -11,6 +11,9 @@ values: - long_term_capital_gains - interest_income - rental_income + # Forms 538-S and 538-H, line 11: gross (positive) income from rentals, + # royalties, partnerships, estates and trusts. + - estate_income - dividend_income - pension_income - debt_relief @@ -39,3 +42,9 @@ metadata: href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/past-year/2024/511-Pkt-2024.pdf - title: 2025 Form 511 instructions href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/current/511-Pkt.pdf + - title: 2025 Form 538-S, Part 3, line 11 (gross positive income from rentals, royalties, partnerships, estates, trusts) + href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/current/511-Pkt.pdf#page=51 + - title: 2025 Form 538-H, line 11 (gross positive income from rentals, royalties, partnerships, estates and trusts) + href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/current/538-H.pdf#page=1 + - title: Okla. Admin. Code 710:50-15-96(c) (gross household income is the gross income of every type) + href: https://www.law.cornell.edu/regulations/oklahoma/OAC-710-50-15-96 diff --git a/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py b/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py new file mode 100644 index 00000000000..09b209b81bf --- /dev/null +++ b/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py @@ -0,0 +1,26 @@ +from policyengine_us.model_api import * + + +class al_estate_and_trust_income(Variable): + value_type = float + entity = Person + label = "Alabama estate and trust income" + unit = USD + definition_period = YEAR + reference = ( + "https://alison.legislature.state.al.us/code-of-alabama?section=40-18-25", + "https://admincode.legislature.state.al.us/administrative-code/810-3-25", + "https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=15", + "https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=24", + ) + defined_for = StateCode.AL + + def formula(person, period, parameters): + # A beneficiary reports their share of estate or trust income on + # Form 40, Part I, line 5 (Schedule E, Part II). Code of Ala. + # § 40-18-25(b)(4) switches off IRC § 642(h), so the excess deductions + # and loss carryovers an estate or trust passes to beneficiaries on + # termination do not reach them, and Ala. Admin. Code r. + # 810-3-25-.05(8)(b) bars passing an irrevocable trust's loss on. + # Only income flows through. + return max_(0, person("estate_income", period)) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_gross_income.py b/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_gross_income.py index 6a45290aec1..bad7256143f 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_gross_income.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/adjusted_gross_income/nj_gross_income.py @@ -22,5 +22,6 @@ def formula(person, period, parameters): total = total + max_(add(person, period, cats.category_b), 0) total = total + max_(add(person, period, cats.category_c), 0) total = total + max_(add(person, period, cats.category_d), 0) + total = total + max_(add(person, period, cats.category_h), 0) total = total + max_(add(person, period, cats.category_k_p), 0) return total From bf011b4a45b5b3291a599fbbab0fa1a04a366cc1 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 12:59:53 -0400 Subject: [PATCH 2/4] Test estate and trust income in the six state income concepts YAML cases per state with hand-computed values, and a property test of the pass-through identities. Co-Authored-By: Claude Opus 5.5 --- .../test_state_estate_income_invariants.py | 180 ++++++++++++++++++ .../income/al_estate_and_trust_income.yaml | 23 +++ .../states/ia/tax/income/ia_gross_income.yaml | 21 ++ .../gov/states/ms/tax/income/ms_agi.yaml | 22 +++ .../income/gross_income/nj_gross_income.yaml | 22 +++ .../tax/income/nm_modified_gross_income.yaml | 20 ++ .../states/ok/tax/income/ok_gross_income.yaml | 30 +++ 7 files changed, 318 insertions(+) create mode 100644 policyengine_us/tests/core/test_state_estate_income_invariants.py create mode 100644 policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml diff --git a/policyengine_us/tests/core/test_state_estate_income_invariants.py b/policyengine_us/tests/core/test_state_estate_income_invariants.py new file mode 100644 index 00000000000..4bc060d87fc --- /dev/null +++ b/policyengine_us/tests/core/test_state_estate_income_invariants.py @@ -0,0 +1,180 @@ +"""Invariants for estate and trust income in state-built income concepts. + +Six states build an income concept from their own source list rather than +from federal AGI, and each state's form puts a beneficiary's estate or trust +income on a line the list already covers: + +- Alabama AGI: Form 40, Part I, line 5. Losses do not pass through (Code of + Ala. § 40-18-25(b)(4) switches off IRC § 642(h)). +- Iowa gross income, tax years 2021 and 2022: IA 1040 line 10, "the income or + loss from federal Schedule E". +- Mississippi AGI: Form 80-105 line 41, "the income or loss from activities + reported on Federal Schedule E". +- New Jersey gross income: N.J.S. 54A:5-1(h), a category of its own, so + N.J.S. 54A:5-2 disregards a net loss. +- New Mexico modified gross income: NMSA 1978 § 7-2-2(L)(15), "undiminished + by losses". +- Oklahoma gross household income: Forms 538-S and 538-H line 11, "gross + (positive) income". + +Hypothesis draws batches of single filers with wages, interest, partnership +income of either sign and an estate or trust amount of either sign; a seeded +population adds breadth. Each batch runs as one vectorized simulation holding +three copies of every filer in every state: no estate income, the estate +amount, and the same amount entered as rental income instead. For every filer: + +1. Signed pass-through (Iowa, Mississippi): the concept moves by exactly the + estate amount, loss or gain. +2. Floored pass-through (Alabama, New Jersey, New Mexico, Oklahoma): the + concept moves by exactly max(estate amount, 0), so a loss never lowers it + and never offsets wages, interest or partnership income. +3. Differential against the existing rental line: the estate amount moves the + concept exactly as the same amount of rental income does. Every state but + Alabama treats the two alike for losses too; Alabama passes a rental loss + through but not an estate or trust loss, so there the two agree only for + gains. + +The identities hold for this income mix. The federal EITC is set to zero +because Oklahoma counts it (Form 538-S line 9) and an estate loss changes it. +""" + +import numpy as np +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from policyengine_us import Simulation + +TOLERANCE = 0.01 # dollars + +# (state, variable, year, whether an estate or trust loss passes through) +CONCEPTS = [ + ("AL", "al_agi", 2025, False), + ("IA", "ia_gross_income", 2022, True), + ("MS", "ms_agi", 2025, True), + ("NJ", "nj_gross_income", 2025, False), + ("NM", "nm_modified_gross_income", 2025, False), + ("OK", "ok_gross_income", 2025, False), +] +YEARS = sorted({year for _, _, year, _ in CONCEPTS}) +VARIANTS = ("none", "estate", "rental") + +amounts = st.one_of( + st.just(0.0), + st.integers(-200_000, -1).map(float), + st.integers(1, 400_000).map(float), +) + + +@st.composite +def filers(draw): + return { + "wages": float(draw(st.integers(0, 300_000))), + "interest": float(draw(st.integers(0, 40_000))), + "partnership": float(draw(st.integers(-50_000, 100_000))), + "estate": draw(amounts), + } + + +SEED = 20261010 + + +def _seeded_filers(n=60): + rng = np.random.default_rng(SEED) + drawn = [ + { + "wages": float(rng.integers(0, 300_001)), + "interest": float(rng.integers(0, 40_001)), + "partnership": float(rng.integers(-50_000, 100_001)), + "estate": float( + rng.choice( + [0, rng.integers(-200_000, 0), rng.integers(1, 400_001)], + p=[0.1, 0.4, 0.5], + ) + ), + } + for _ in range(n) + ] + edges = [ + # Nothing but an estate or trust loss. + {"wages": 0.0, "interest": 0.0, "partnership": 0.0, "estate": -40_000.0}, + # Nothing but estate or trust income. + {"wages": 0.0, "interest": 0.0, "partnership": 0.0, "estate": 25_000.0}, + # An estate loss beside partnership income of the same size. + {"wages": 50_000.0, "interest": 0.0, "partnership": 8_000.0, "estate": -8_000.0}, + # An estate gain beside a partnership loss of the same size. + {"wages": 50_000.0, "interest": 0.0, "partnership": -8_000.0, "estate": 8_000.0}, + ] # fmt: skip + return drawn + edges + + +def _situation(units): + def every_year(value): + return {year: value for year in YEARS} + + people, tax_units, households = {}, {}, {} + for state, _, _, _ in CONCEPTS: + for variant in VARIANTS: + for i, unit in enumerate(units): + name = f"{state}_{variant}_{i}" + people[name] = { + "age": every_year(45), + "employment_income": every_year(unit["wages"]), + "taxable_interest_income": every_year(unit["interest"]), + "partnership_s_corp_income": every_year(unit["partnership"]), + "estate_income": every_year( + unit["estate"] if variant == "estate" else 0.0 + ), + "rental_income": every_year( + unit["estate"] if variant == "rental" else 0.0 + ), + } + tax_units[name] = {"members": [name], "eitc": every_year(0)} + households[name] = { + "members": [name], + "state_code": every_year(state), + } + return {"people": people, "tax_units": tax_units, "households": households} + + +def _check(units): + sim = Simulation(situation=_situation(units)) + n = len(units) + estate = np.array([unit["estate"] for unit in units]) + for index, (state, variable, year, loss_passes_through) in enumerate(CONCEPTS): + # One person per tax unit and household, in insertion order, so a + # person-level and a tax-unit-level concept index the same way. + values = np.asarray(sim.calculate(variable, year), dtype=float) + start = index * len(VARIANTS) * n + none, with_estate, with_rental = ( + values[start + k * n : start + (k + 1) * n] for k in range(len(VARIANTS)) + ) + expected = estate if loss_passes_through else np.maximum(estate, 0) + + # 1 and 2. Pass-through, signed or floored. + np.testing.assert_allclose( + with_estate - none, expected, atol=TOLERANCE, err_msg=f"{state} {variable}" + ) + + # 3. Differential against the rental line. Alabama passes a rental + # loss through but not an estate or trust loss. + alike = np.ones(n, dtype=bool) if state != "AL" else estate >= 0 + np.testing.assert_allclose( + with_estate[alike], + with_rental[alike], + atol=TOLERANCE, + err_msg=f"{state} {variable} against rental income", + ) + + +@settings( + max_examples=4, + deadline=None, + suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large], +) +@given(st.lists(filers(), min_size=1, max_size=10)) +def test_state_estate_income_invariants(units): + _check(units) + + +def test_state_estate_income_invariants_seeded_population(): + _check(_seeded_filers()) diff --git a/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml new file mode 100644 index 00000000000..d9c71fcd305 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml @@ -0,0 +1,23 @@ +- name: A beneficiary's estate or trust income is in Alabama AGI + period: 2025 + input: + state_code: AL + irs_employment_income: 30_000 + estate_income: 5_000 + output: + # Form 40, Part I, line 5 carries Schedule E estate and trust income: + # 30,000 + 5,000. + al_estate_and_trust_income: 5_000 + al_agi: 35_000 + +- name: An estate or trust loss does not reduce Alabama AGI + period: 2025 + input: + state_code: AL + irs_employment_income: 30_000 + estate_income: -5_000 + output: + # Code of Ala. § 40-18-25(b)(4) switches off IRC § 642(h), so the loss + # stays with the estate or trust: max(-5,000, 0) = 0 and AGI is 30,000. + al_estate_and_trust_income: 0 + al_agi: 30_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_gross_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_gross_income.yaml index 7337123adcd..650bcdb385a 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_gross_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_gross_income.yaml @@ -5,3 +5,24 @@ state_code: IA output: ia_gross_income: 100_000 + +- name: Estate and trust income is included in Iowa gross income + period: 2022 + input: + irs_employment_income: 30_000 + estate_income: 5_000 + state_code: IA + output: + # 2022 IA 1040 line 10 reports federal Schedule E income, which includes + # estates and trusts: 30,000 + 5,000. + ia_gross_income: 35_000 + +- name: An estate or trust loss on federal Schedule E reduces Iowa gross income + period: 2022 + input: + irs_employment_income: 30_000 + estate_income: -5_000 + state_code: IA + output: + # Line 10 is "the income or loss from federal Schedule E": 30,000 - 5,000. + ia_gross_income: 25_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ms/tax/income/ms_agi.yaml b/policyengine_us/tests/policy/baseline/gov/states/ms/tax/income/ms_agi.yaml index 19d71f5778f..585f37ffda5 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ms/tax/income/ms_agi.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ms/tax/income/ms_agi.yaml @@ -94,3 +94,25 @@ # 2,119.43) plus health insurance 3,000. The spouse has no adjustment. ms_agi_adjustments: [5_119.43, 0] ms_agi: [24_880.57, 20_000] + +- name: Estate and trust income is included in Mississippi AGI + period: 2025 + input: + irs_employment_income: 30_000 + estate_income: 5_000 + state_code: MS + output: + # Form 80-105 line 41 reports federal Schedule E income, which includes + # trusts: 30,000 + 5,000, with no adjustments. + ms_agi: 35_000 + +- name: An estate or trust loss on federal Schedule E reduces Mississippi AGI + period: 2025 + input: + irs_employment_income: 30_000 + estate_income: -5_000 + state_code: MS + output: + # Line 41 is "the income or loss from activities reported on Federal + # Schedule E": 30,000 - 5,000. + ms_agi: 25_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/gross_income/nj_gross_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/gross_income/nj_gross_income.yaml index 982a865f105..abb9e4da450 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/gross_income/nj_gross_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/gross_income/nj_gross_income.yaml @@ -198,3 +198,25 @@ # 50_000 wages + 10_000 Roth conversion = 60_000 nj_gross_income: 60_000 nj_income_tax: 1_767.25 + +- name: NJ gross income includes income derived through estates or trusts + period: 2025 + input: + employment_income: 50_000 + estate_income: 8_000 + state_code: NJ + output: + # N.J.S. 54A:5-1(h), reported on NJ-1040 line 26: 50,000 + 8,000. + nj_gross_income: 58_000 + +- name: NJ same category rule - an estate or trust loss does not offset partnership income + period: 2025 + input: + employment_income: 50_000 + partnership_s_corp_income: 3_000 + estate_income: -8_000 + state_code: NJ + output: + # N.J.S. 54A:5-2: the category (h) net loss is disregarded, so + # 50,000 + 3,000 + max(-8,000, 0) = 53,000. + nj_gross_income: 53_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/nm_modified_gross_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/nm_modified_gross_income.yaml index 9e37896d514..06c92d3744d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/nm_modified_gross_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/nm_modified_gross_income.yaml @@ -90,3 +90,23 @@ state_code: NM output: nm_modified_gross_income: 0 + +- name: NM modified gross income includes income from an estate or trust + period: 2025 + input: + state_code: NM + irs_employment_income: 20_000 + estate_income: 5_000 + output: + # NMSA 1978 § 7-2-2(L)(15): 20,000 + 5,000. + nm_modified_gross_income: 25_000 + +- name: NM modified gross income is undiminished by an estate or trust loss + period: 2025 + input: + state_code: NM + irs_employment_income: 20_000 + estate_income: -5_000 + output: + # § 7-2-2(L): "undiminished by losses". max(-5,000, 0) = 0, so 20,000. + nm_modified_gross_income: 20_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_gross_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_gross_income.yaml index bf873261215..72d1c4817d2 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_gross_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_gross_income.yaml @@ -27,3 +27,33 @@ state_code: OK output: ok_gross_income: 38_566 + +- name: OK gross income includes estate and trust income, which can end the sales tax credit + period: 2025 + input: + age: 40 + irs_employment_income: 18_000 + estate_income: 3_000 + eitc: 0 + state_code: OK + output: + # Form 538-S line 11: 18,000 + 3,000 = 21,000, over the 20,000 limit + # for a filer with no dependents who is under 65 and not disabled. + ok_gross_income: 21_000 + ok_stc: 0 + +- name: OK gross income leaves out an estate or trust loss + period: 2025 + input: + age: 40 + irs_employment_income: 18_000 + estate_income: -3_000 + # The loss lowers federal AGI into the childless EITC range, and line 9 + # counts the EITC; set it to zero to isolate line 11. + eitc: 0 + state_code: OK + output: + # Line 11 takes gross (positive) income only: 18,000 + max(-3,000, 0). + # 18,000 is within the 20,000 limit, so the credit is 40 for one person. + ok_gross_income: 18_000 + ok_stc: 40 From 81a53c8700d2017fd38d78e7629a8aab038a9ad0 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 13:09:29 -0400 Subject: [PATCH 3/4] Cite one entry per source and add the changelog fragment Co-Authored-By: Claude Opus 5.5 --- changelog.d/state-gross-income-estate-income.fixed.md | 1 + .../states/al/tax/income/agi/gross_income_sources.yaml | 9 ++++----- .../gov/states/ia/tax/income/gross_income/sources.yaml | 9 +++------ .../gov/states/ms/tax/income/income_sources.yaml | 4 +--- .../loss_eligible_categories/category_h.yaml | 8 ++++---- .../ok/tax/income/credits/gross_income_sources.yaml | 4 +--- .../states/al/tax/income/al_estate_and_trust_income.py | 2 +- 7 files changed, 15 insertions(+), 22 deletions(-) create mode 100644 changelog.d/state-gross-income-estate-income.fixed.md diff --git a/changelog.d/state-gross-income-estate-income.fixed.md b/changelog.d/state-gross-income-estate-income.fixed.md new file mode 100644 index 00000000000..0fc1beb4718 --- /dev/null +++ b/changelog.d/state-gross-income-estate-income.fixed.md @@ -0,0 +1 @@ +Count a beneficiary's estate and trust income in Alabama AGI, Iowa gross income (2021 and 2022), Mississippi AGI, New Jersey gross income, New Mexico modified gross income, and Oklahoma gross household income for the sales tax and property tax credits. diff --git a/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml b/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml index 0a720e287cb..a861780c498 100644 --- a/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml @@ -38,11 +38,10 @@ metadata: href: https://www.taxformfinder.org/forms/2023/2023-alabama-form-40.pdf#page=2 - title: 2024 Alabama Income Tax Instructions href: https://www.revenue.alabama.gov/wp-content/uploads/2025/01/24f40bk.pdf#page=7 - - title: 2025 Alabama Income Tax Instructions + # Examples of income to report (page 7), Part I line 4, other income + # (page 14), and Part I line 5, rents, royalties, partnerships, estates, + # trusts, etc. (page 15). + - title: "2025 Alabama Income Tax Instructions, Form 40 Booklet #page 7,14-15" href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=7 - - title: 2025 Alabama Income Tax Instructions Form 40 Booklet, Part 1, Line 4 (Other Income) - href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=14 - - title: 2025 Alabama Income Tax Instructions Form 40 Booklet, Part 1, Line 5 (Rents, Royalties, Partnerships, Estates, Trusts, Etc.) - href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=15 - title: Code of Alabama 1975 Section 40-18-25(b) (income of beneficiaries of estates and trusts) href: https://alison.legislature.state.al.us/code-of-alabama?section=40-18-25 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml index e95a5be3b58..d63e38ad3d7 100644 --- a/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml +++ b/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml @@ -25,13 +25,10 @@ metadata: reference: - title: 2021 IA1040 Iowa Income Tax Return, Lines 1-14 href: https://revenue.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 - - title: 2021 IA1040 Income Tax Return instructions + # Line 10, rents, royalties, partnerships, estates, etc., is on page 19. + - title: "2021 IA1040 Income Tax Return instructions #page 12,19" href: https://revenue.iowa.gov/media/2650/download?inline#page=12 - title: 2022 IA1040 Iowa Income Tax Return, Lines 1-14 href: https://revenue.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=1 - - title: 2022 IA1040 Income Tax Return instructions + - title: "2022 IA1040 Income Tax Return instructions #page 11,19" href: https://revenue.iowa.gov/media/2721/download?inline#page=11 - - title: 2021 IA1040 Expanded Instructions, line 10 (rents, royalties, partnerships, estates, etc.) - href: https://revenue.iowa.gov/media/2650/download?inline#page=19 - - title: 2022 IA1040 Expanded Instructions, line 10 (rents, royalties, partnerships, estates, etc.) - href: https://revenue.iowa.gov/media/2721/download?inline#page=19 diff --git a/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml b/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml index c2dee51e3ab..c89f46af683 100644 --- a/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml +++ b/policyengine_us/parameters/gov/states/ms/tax/income/income_sources.yaml @@ -34,7 +34,5 @@ metadata: href: https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100231.pdf#page=11 # Line 38 - 48 - title: Mississippi Income Tax Instructions 2024 href: https://www.dor.ms.gov/sites/default/files/Forms/Individual/80100241.pdf#page=10 - - title: Mississippi Income Tax Instructions 2025 + - title: "Mississippi Income Tax Instructions 2025 #page 10-11" href: https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100251%202.pdf#page=10 - - title: Mississippi Income Tax Instructions 2025, line 41 (rental real estates, royalties, partnerships, S corporations, trusts, etc.) - href: https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100251%202.pdf#page=11 diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml index 7ad844e104a..a836e9b50c3 100644 --- a/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml +++ b/policyengine_us/parameters/gov/states/nj/tax/income/gross_income/loss_eligible_categories/category_h.yaml @@ -9,7 +9,7 @@ metadata: reference: - title: N.J.S. 54A:5-1(h) href: https://law.justia.com/codes/new-jersey/title-54a/section-54a-5-1/ - - title: N.J.S. 54A:5-2 (a net loss in one category may not be applied against another category) - href: https://law.justia.com/codes/new-jersey/title-54a/section-54a-5-2/ - - title: 2025 NJ-1040 Instructions, Line 26, Income From Estates and Trusts - href: https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf#page=21 + # Net losses by category of income (page 9) and line 26, income from + # estates and trusts (page 21). + - title: "2025 NJ-1040 Instructions #page 9,21" + href: https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf#page=9 diff --git a/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml b/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml index e4163ff27b0..856f98bac24 100644 --- a/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/ok/tax/income/credits/gross_income_sources.yaml @@ -40,9 +40,7 @@ metadata: href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/past-year/2023/511-Pkt.pdf - title: 2024 Form 511 instructions href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/past-year/2024/511-Pkt-2024.pdf - - title: 2025 Form 511 instructions - href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/current/511-Pkt.pdf - - title: 2025 Form 538-S, Part 3, line 11 (gross positive income from rentals, royalties, partnerships, estates, trusts) + - title: 2025 Form 511 packet, Form 538-S, Part 3 (gross income lines 9 to 14) href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/current/511-Pkt.pdf#page=51 - title: 2025 Form 538-H, line 11 (gross positive income from rentals, royalties, partnerships, estates and trusts) href: https://oklahoma.gov/content/dam/ok/en/tax/documents/forms/individuals/current/538-H.pdf#page=1 diff --git a/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py b/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py index 09b209b81bf..51cf3b6feee 100644 --- a/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py +++ b/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py @@ -10,8 +10,8 @@ class al_estate_and_trust_income(Variable): reference = ( "https://alison.legislature.state.al.us/code-of-alabama?section=40-18-25", "https://admincode.legislature.state.al.us/administrative-code/810-3-25", + # PDF pages 15, 24 "https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=15", - "https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=24", ) defined_for = StateCode.AL From 23c09348deb3d7a3e76ca52bab2d1608c7b8c8e1 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 15:03:28 -0400 Subject: [PATCH 4/4] Pass Alabama estate and trust losses through, as Schedule E reports them Review finding: a beneficiary's Schedule E Part III loss comes from depreciation, depletion and amortization apportioned by the estate or trust (Schedule K-1 box 9), not from the section 642(h) items that Code of Ala. 40-18-25(b)(4) switches off. Alabama's Schedule K-1 (Form 41) carries the same apportioned deductions, and r. 810-3-25-.11 follows Subchapter J, so the amount enters Alabama AGI signed. Drops the floored variable and moves the cases to al_agi.yaml. Co-Authored-By: Claude Opus 5.5 --- .../state-gross-income-estate-income.fixed.md | 2 +- .../tax/income/agi/gross_income_sources.yaml | 8 +++-- .../test_state_estate_income_invariants.py | 31 +++++++++---------- .../gov/states/al/tax/income/al_agi.yaml | 24 ++++++++++++++ .../income/al_estate_and_trust_income.yaml | 23 -------------- .../tax/income/al_estate_and_trust_income.py | 26 ---------------- 6 files changed, 44 insertions(+), 70 deletions(-) delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml delete mode 100644 policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py diff --git a/changelog.d/state-gross-income-estate-income.fixed.md b/changelog.d/state-gross-income-estate-income.fixed.md index 0fc1beb4718..30ef543488b 100644 --- a/changelog.d/state-gross-income-estate-income.fixed.md +++ b/changelog.d/state-gross-income-estate-income.fixed.md @@ -1 +1 @@ -Count a beneficiary's estate and trust income in Alabama AGI, Iowa gross income (2021 and 2022), Mississippi AGI, New Jersey gross income, New Mexico modified gross income, and Oklahoma gross household income for the sales tax and property tax credits. +Count a beneficiary's estate and trust income in Alabama AGI, Iowa gross income (which Iowa's tax uses through tax year 2022), Mississippi AGI, New Jersey gross income, New Mexico modified gross income, and Oklahoma gross household income for the sales tax and property tax credits. diff --git a/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml b/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml index a861780c498..4ea1ffc3f3e 100644 --- a/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml @@ -20,8 +20,8 @@ values: - farm_operations_income - farm_rent_income # Form 40, Part I, line 5: rents, royalties, partnerships, S corporations, - # trusts and estates. Estate and trust losses do not pass through. - - al_estate_and_trust_income + # trusts and estates (Alabama Schedule E, Part II). + - estate_income metadata: unit: list @@ -43,5 +43,7 @@ metadata: # trusts, etc. (page 15). - title: "2025 Alabama Income Tax Instructions, Form 40 Booklet #page 7,14-15" href: https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=7 - - title: Code of Alabama 1975 Section 40-18-25(b) (income of beneficiaries of estates and trusts) + - title: Code of Alabama 1975 Section 40-18-25(b) (income and deductions of beneficiaries of estates and trusts) href: https://alison.legislature.state.al.us/code-of-alabama?section=40-18-25 + - title: Ala. Admin. Code r. 810-3-25-.11 (Alabama taxable income of beneficiaries for taxable years beginning after December 31, 2004) + href: https://admincode.legislature.state.al.us/administrative-code/810-3-25 diff --git a/policyengine_us/tests/core/test_state_estate_income_invariants.py b/policyengine_us/tests/core/test_state_estate_income_invariants.py index 4bc060d87fc..2cb59ded568 100644 --- a/policyengine_us/tests/core/test_state_estate_income_invariants.py +++ b/policyengine_us/tests/core/test_state_estate_income_invariants.py @@ -4,8 +4,9 @@ from federal AGI, and each state's form puts a beneficiary's estate or trust income on a line the list already covers: -- Alabama AGI: Form 40, Part I, line 5. Losses do not pass through (Code of - Ala. § 40-18-25(b)(4) switches off IRC § 642(h)). +- Alabama AGI: Form 40, Part I, line 5. Code of Ala. § 40-18-25(b) follows + federal Subchapter J for a beneficiary's income and deductions, so the + Schedule E amount enters signed. - Iowa gross income, tax years 2021 and 2022: IA 1040 line 10, "the income or loss from federal Schedule E". - Mississippi AGI: Form 80-105 line 41, "the income or loss from activities @@ -23,16 +24,14 @@ three copies of every filer in every state: no estate income, the estate amount, and the same amount entered as rental income instead. For every filer: -1. Signed pass-through (Iowa, Mississippi): the concept moves by exactly the - estate amount, loss or gain. -2. Floored pass-through (Alabama, New Jersey, New Mexico, Oklahoma): the - concept moves by exactly max(estate amount, 0), so a loss never lowers it - and never offsets wages, interest or partnership income. +1. Signed pass-through (Alabama, Iowa, Mississippi): the concept moves by + exactly the estate amount, loss or gain. +2. Floored pass-through (New Jersey, New Mexico, Oklahoma): the concept moves + by exactly max(estate amount, 0), so a loss never lowers it and never + offsets wages, interest or partnership income. 3. Differential against the existing rental line: the estate amount moves the - concept exactly as the same amount of rental income does. Every state but - Alabama treats the two alike for losses too; Alabama passes a rental loss - through but not an estate or trust loss, so there the two agree only for - gains. + concept exactly as the same amount of rental income does, loss or gain. + Each state puts both on the same form line or under the same loss rule. The identities hold for this income mix. The federal EITC is set to zero because Oklahoma counts it (Form 538-S line 9) and an estate loss changes it. @@ -48,7 +47,7 @@ # (state, variable, year, whether an estate or trust loss passes through) CONCEPTS = [ - ("AL", "al_agi", 2025, False), + ("AL", "al_agi", 2025, True), ("IA", "ia_gross_income", 2022, True), ("MS", "ms_agi", 2025, True), ("NJ", "nj_gross_income", 2025, False), @@ -155,12 +154,10 @@ def _check(units): with_estate - none, expected, atol=TOLERANCE, err_msg=f"{state} {variable}" ) - # 3. Differential against the rental line. Alabama passes a rental - # loss through but not an estate or trust loss. - alike = np.ones(n, dtype=bool) if state != "AL" else estate >= 0 + # 3. Differential against the rental line. np.testing.assert_allclose( - with_estate[alike], - with_rental[alike], + with_estate, + with_rental, atol=TOLERANCE, err_msg=f"{state} {variable} against rental income", ) diff --git a/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_agi.yaml b/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_agi.yaml index d1b72912602..42ae27d40ee 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_agi.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_agi.yaml @@ -68,3 +68,27 @@ # AGI leaves all of them on the child's return. adjusted_gross_income: 40_000 al_agi: 48_500 + +- name: A beneficiary's estate or trust income is in Alabama AGI + period: 2025 + input: + state_code: AL + irs_employment_income: 30_000 + estate_income: 5_000 + output: + # Form 40, Part I, line 5 carries Schedule E estate and trust income: + # 30,000 + 5,000. + al_agi: 35_000 + +- name: A beneficiary's estate or trust loss on Schedule E reduces Alabama AGI + period: 2025 + input: + state_code: AL + irs_employment_income: 30_000 + estate_income: -5_000 + output: + # Code of Ala. § 40-18-25(b) follows federal Subchapter J for a + # beneficiary's income and deductions, so depreciation, depletion and + # amortization apportioned to the beneficiary can exceed the income: + # 30,000 - 5,000. + al_agi: 25_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml deleted file mode 100644 index d9c71fcd305..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/al/tax/income/al_estate_and_trust_income.yaml +++ /dev/null @@ -1,23 +0,0 @@ -- name: A beneficiary's estate or trust income is in Alabama AGI - period: 2025 - input: - state_code: AL - irs_employment_income: 30_000 - estate_income: 5_000 - output: - # Form 40, Part I, line 5 carries Schedule E estate and trust income: - # 30,000 + 5,000. - al_estate_and_trust_income: 5_000 - al_agi: 35_000 - -- name: An estate or trust loss does not reduce Alabama AGI - period: 2025 - input: - state_code: AL - irs_employment_income: 30_000 - estate_income: -5_000 - output: - # Code of Ala. § 40-18-25(b)(4) switches off IRC § 642(h), so the loss - # stays with the estate or trust: max(-5,000, 0) = 0 and AGI is 30,000. - al_estate_and_trust_income: 0 - al_agi: 30_000 diff --git a/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py b/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py deleted file mode 100644 index 51cf3b6feee..00000000000 --- a/policyengine_us/variables/gov/states/al/tax/income/al_estate_and_trust_income.py +++ /dev/null @@ -1,26 +0,0 @@ -from policyengine_us.model_api import * - - -class al_estate_and_trust_income(Variable): - value_type = float - entity = Person - label = "Alabama estate and trust income" - unit = USD - definition_period = YEAR - reference = ( - "https://alison.legislature.state.al.us/code-of-alabama?section=40-18-25", - "https://admincode.legislature.state.al.us/administrative-code/810-3-25", - # PDF pages 15, 24 - "https://www.revenue.alabama.gov/wp-content/uploads/2026/01/25f40bk.pdf#page=15", - ) - defined_for = StateCode.AL - - def formula(person, period, parameters): - # A beneficiary reports their share of estate or trust income on - # Form 40, Part I, line 5 (Schedule E, Part II). Code of Ala. - # § 40-18-25(b)(4) switches off IRC § 642(h), so the excess deductions - # and loss carryovers an estate or trust passes to beneficiaries on - # termination do not reach them, and Ala. Admin. Code r. - # 810-3-25-.05(8)(b) bars passing an irrevocable trust's loss on. - # Only income flows through. - return max_(0, person("estate_income", period))