diff --git a/changelog.d/fix-id-military-retirement-deduction.added.md b/changelog.d/fix-id-military-retirement-deduction.added.md new file mode 100644 index 00000000000..be082ff76a8 --- /dev/null +++ b/changelog.d/fix-id-military-retirement-deduction.added.md @@ -0,0 +1 @@ +Add the person-level amounts and classification a caller can supply: `business_gross_income_reported` (Schedule C line 7), `farm_gross_income_reported` (Schedule F line 9), `foreign_earned_income_exclusion_gross_person_reported` (the person's own Form 2555 line 43) and `id_retirement_benefits_disability_classification` (Idaho's disability classification under Idaho Code 63-3022A(4)). Each has a default that means not supplied, and an entry applies only to the year entered. Add the calculated `business_gross_income`, `farm_gross_income`, `foreign_earned_income_exclusion_gross_person` and `id_retirement_benefits_deduction_disabled`, which use those inputs or fall back for each person alone. diff --git a/changelog.d/fix-id-military-retirement-deduction.fixed.md b/changelog.d/fix-id-military-retirement-deduction.fixed.md new file mode 100644 index 00000000000..341781e0864 --- /dev/null +++ b/changelog.d/fix-id-military-retirement-deduction.fixed.md @@ -0,0 +1 @@ +Apply Idaho's 2025 eligibility tests to military retirement benefits (classified as disabled, age 62 or older, or working enough to file a federal return) and count them within the retirement benefits deduction's cap and Social Security offset, under Idaho Code 63-3022A as amended by House Bills 40 and 479. The employment test measures income from employment as federal gross income. In every year, Idaho's disability classification (Idaho Code 63-3022A(4)) now also counts Social Security disability insurance benefits and a classification supplied as `DISABLED`, for the age-62 test of the other retirement benefits and, before 2025, of military retirement benefits. diff --git a/changelog.d/fix-id-military-retirement-deduction.removed.md b/changelog.d/fix-id-military-retirement-deduction.removed.md new file mode 100644 index 00000000000..09d119cadf5 --- /dev/null +++ b/changelog.d/fix-id-military-retirement-deduction.removed.md @@ -0,0 +1 @@ +Remove `id_military_retirement_deduction` and its parameter `gov.states.id.tax.income.subtractions.military_retirement.applies`; military retirement benefits now count in `id_retirement_benefits_deduction`. diff --git a/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/income_sources.yaml b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/income_sources.yaml index f4a8c8f7f81..cd06633d930 100644 --- a/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/income_sources.yaml +++ b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/income_sources.yaml @@ -1,11 +1,10 @@ -description: Idaho counts the following income sources under the retirement benefits deduction. +description: Idaho counts these income sources, other than military retirement benefits, under the retirement benefits deduction for recipients who meet its age test. values: + # Idaho Code 63-3022A(1)(a). Military retirement benefits + # (id_eligible_military_retirement_income) have their own eligibility + # test, in id_retirement_benefits_deduction_military_eligible_person. 2021-01-01: - public_pension_income - - id_eligible_military_retirement_income - - 2025-01-01: - - public_pension_income metadata: unit: list label: Idaho retirement benefits deduction income sources diff --git a/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/disabled.yaml b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/disabled.yaml new file mode 100644 index 00000000000..d3538163e60 --- /dev/null +++ b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/disabled.yaml @@ -0,0 +1,23 @@ +description: Idaho limits the retirement benefits deduction for military retirement benefits to disabled recipients this age or older. +values: + # Before 2025, a disabled recipient qualified at 62, as for the other + # retirement benefits in Idaho Code 63-3022A(1). + 2021-01-01: 62 + # From 2025, 63-3022A(1)(b)(i) admits a recipient who "Is classified as + # disabled", at any age. + 2025-01-01: 0 +metadata: + unit: year + period: year + label: Idaho military retirement benefits deduction disabled age threshold + reference: + - title: Idaho Code 63-3022A(1)(b) and (4) + href: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - title: 2025 Idaho House Bill 40, section 2 (63-3022A as in effect for 2024, with the 2025 amendment) + href: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0040.pdf#page=5 + - title: 2025 Idaho House Bill 479, section 1 + href: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0479.pdf#page=2 + - title: Idaho Individual Income Tax Instructions Packet 2024, Form 39R line 8 + href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_10-23-2024.pdf#page=31 + - title: Idaho Individual Income Tax Instructions Packet 2025, Form 39R line 8e ("Classified as disabled (any age)") + href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 diff --git a/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/main.yaml b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/main.yaml new file mode 100644 index 00000000000..17a53423f2c --- /dev/null +++ b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/main.yaml @@ -0,0 +1,23 @@ +description: Idaho limits the retirement benefits deduction for military retirement benefits to recipients this age or older. +values: + # Before 2025, military retirement benefits shared the age test of the + # other retirement benefits in Idaho Code 63-3022A(1). + 2021-01-01: 65 + # From 2025, 63-3022A(1)(b)(ii): "Has attained the age of sixty-two (62) + # years by the end of the tax year". + 2025-01-01: 62 +metadata: + unit: year + period: year + label: Idaho military retirement benefits deduction age threshold + reference: + - title: Idaho Code 63-3022A(1)(b) + href: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - title: 2025 Idaho House Bill 40, section 2 (63-3022A as in effect for 2024, with the 2025 amendment) + href: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0040.pdf#page=5 + - title: 2025 Idaho House Bill 479, section 1 + href: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0479.pdf#page=2 + - title: Idaho Individual Income Tax Instructions Packet 2024, Form 39R line 8 + href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_10-23-2024.pdf#page=31 + - title: Idaho Individual Income Tax Instructions Packet 2025, Form 39R line 8e + href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 diff --git a/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/in_effect.yaml b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/in_effect.yaml new file mode 100644 index 00000000000..a2fb041f032 --- /dev/null +++ b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/in_effect.yaml @@ -0,0 +1,18 @@ +description: Idaho extends the retirement benefits deduction to the military retirement benefits of a recipient whose employment income requires a federal return, if this is true. +values: + 2021-01-01: false + # 2025 House Bills 40 and 479, retroactive to January 1, 2025. + 2025-01-01: true +metadata: + unit: bool + period: year + label: Idaho military retirement benefits deduction employment test in effect + reference: + - title: Idaho Code 63-3022A(1)(b)(iii) + href: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - title: "2025 Idaho House Bill 40, sections 2 and 5 #page 5,8" + href: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0040.pdf#page=5 + - title: "2025 Idaho House Bill 479, sections 1 and 9 #page 2,17" + href: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0479.pdf#page=2 + - title: Idaho Individual Income Tax Instructions Packet 2025, Form 39R line 8e + href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 diff --git a/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/income_sources.yaml b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/income_sources.yaml new file mode 100644 index 00000000000..d3becf48895 --- /dev/null +++ b/policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/income_sources.yaml @@ -0,0 +1,53 @@ +description: Idaho counts these income sources as income from employment in the employment test of the military retirement benefits deduction. +values: + # The list applies from 2021 so the formula can read it in every year; + # in_effect.yaml turns the employment test on from 2025. Each source is + # gross income as the section 6012 test that 63-3022A(1)(b)(iii) borrows + # measures it. + 2021-01-01: + # Wages (Form 1040 line 1a). irs_employment_income leaves out all + # employer dependent care benefits. + - irs_employment_income + # The taxable part of those benefits: Form 2441 line 26 (Form 1040 line + # 1e) as taxable_dependent_care_benefits computes it, the W-2 box 10 + # benefits less the excluded amount (line 25). Section 129(a)(1) + # excludes only dependent care assistance, which (e)(1) ties to + # qualified expenses (line 16, + # dependent_care_assistance_qualified_expenses); section 129(b) limits + # the exclusion to earned income; and section 129(a)(2)(B) includes the + # excess over the dollar limit of (a)(2)(A). + - taxable_dependent_care_benefits + # Idaho Code 63-3022A(1)(b)(iii) ("Was employed during the tax year and + # received sufficient income from such employment") doesn't define + # employment, and the Form 39R line 8e instructions repeat its words. + # PolicyEngine counts income from a business or farm as income from + # employment: the section 6012 gross income test that the statute + # borrows counts it, and a self-employed recipient works for the income + # as an employee does. Chart A of the Form 1040 instructions measures it + # as gross income, Schedule C line 7 and Schedule F line 9, before + # business expenses. Each person's own business_gross_income_reported + # and farm_gross_income_reported supply them; without those inputs that + # person's net profits, each floored at zero, stand in. + - business_gross_income + - farm_gross_income + # Foreign earned income and housing amounts the person excludes under + # section 911 (own Form 2555 line 43, lines 36 and 42): section 6012(c) + # computes gross income for the filing requirement without the + # exclusion. The line 50 housing deduction is a deduction under section + # 911(c)(4), not an exclusion, and doesn't count. + - foreign_earned_income_exclusion_gross_person +metadata: + unit: list + period: year + label: Idaho military retirement benefits deduction employment income sources + reference: + - title: Idaho Code 63-3022A(1)(b)(iii) + href: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - title: Idaho Individual Income Tax Instructions Packet 2025, Form 39R line 8e + href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 + - title: 26 U.S. Code § 6012(c) - gross income without the section 911 exclusion + href: https://www.law.cornell.edu/uscode/text/26/6012#c + - title: 26 U.S. Code § 129 - exclusion for dependent care assistance and its limits + href: https://www.law.cornell.edu/uscode/text/26/129 + - title: 2025 Form 1040 instructions, Chart A (gross income from a business) + href: https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9 diff --git a/policyengine_us/parameters/gov/states/id/tax/income/subtractions/military_retirement/applies.yaml b/policyengine_us/parameters/gov/states/id/tax/income/subtractions/military_retirement/applies.yaml deleted file mode 100644 index 7124a2ea60b..00000000000 --- a/policyengine_us/parameters/gov/states/id/tax/income/subtractions/military_retirement/applies.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: Idaho provides a separate military retirement deduction without age requirements. -values: - 2021-01-01: false - 2025-01-01: true - -metadata: - unit: bool - period: year - label: Idaho military retirement deduction applies - reference: - - title: Idaho Code 63-3022A - Deduction of Certain Retirement Benefits - href: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ - - title: Idaho Individual Income Tax Instructions Packet 2025 - href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 diff --git a/policyengine_us/parameters/gov/states/id/tax/income/subtractions/subtractions.yaml b/policyengine_us/parameters/gov/states/id/tax/income/subtractions/subtractions.yaml index 1051f9780fb..b04045bca2f 100644 --- a/policyengine_us/parameters/gov/states/id/tax/income/subtractions/subtractions.yaml +++ b/policyengine_us/parameters/gov/states/id/tax/income/subtractions/subtractions.yaml @@ -13,20 +13,6 @@ values: - id_529_plan_subtraction # Idaho Code 63-3022(n) - id_health_insurance_premiums_subtraction # Idaho Code 63-3022P - id_other_subtractions - 2025-01-01: - - salt_refund_income # (2) - - us_govt_interest # (3)(a) - - military_service_income # (4) - - taxable_social_security # (5) - - id_household_and_dependent_care_expense_deduction # (6) - - id_aged_or_disabled_deduction # (8) - - id_capital_gains_deduction # (10) - - workers_compensation # (13) - - id_retirement_benefits_deduction # (15) - - id_military_retirement_deduction # (15) per HB 40 - - id_529_plan_subtraction # Idaho Code 63-3022(n) - - id_health_insurance_premiums_subtraction # Idaho Code 63-3022P - - id_other_subtractions metadata: diff --git a/policyengine_us/tests/core/test_id_military_retirement_deduction_invariants.py b/policyengine_us/tests/core/test_id_military_retirement_deduction_invariants.py new file mode 100644 index 00000000000..eeb91e51da2 --- /dev/null +++ b/policyengine_us/tests/core/test_id_military_retirement_deduction_invariants.py @@ -0,0 +1,390 @@ +"""Invariants of Idaho's retirement benefits deduction on military retired pay. + +Idaho Code 63-3022A(1)(b), as amended by 2025 House Bills 40 and 479 with +effect from January 1, 2025, counts retirement benefits the United States pays +to a retired member of the military services, or to the member's unremarried +widow or widower, who: + + (i) is classified as disabled; + (ii) has attained the age of 62 by the end of the tax year; or + (iii) was employed during the tax year and received sufficient income from + such employment to be required to file a federal return under + 26 U.S.C. 6012(a)(1). + +Before 2025 the benefits had the age test of 63-3022A(1)(a): age 65, or age 62 +and classified as disabled. In every year they share the deduction's cap, +63-3022A(2) ($48,216 single and $72,324 joint for 2025, Form 39R line 8a, and +nothing on a separate return). 63-3022A(3) reduces the cap by the Social +Security and Railroad Retirement benefits of the taxpayer and spouse. The +model subtracts the head's and spouse's Social Security retirement benefits +only; the units here have no Railroad Retirement benefits. + +The reference rules below restate the law from published amounts, not from +the model's parameters. `test_grid` runs one simulation over 2024 to 2026 for +every filing status; ages on both sides of 62 and 65; disability and +blindness; wages or business profit a dollar under, at and over each year's +filing threshold; and military retired pay, Social Security and a public +pension: + +1. Differential: on a return whose only gross income is the retiree's wages + or business profit, the employment test holds exactly when + tax_unit_is_required_to_file does and the retiree has such income, in + 2025 and 2026. Both also match the published thresholds: section 6012(f) + for 2025 (more than the standard deduction, which adds amounts for age and + blindness) and section 6012(a)(1)(A) and (B) for 2026 (at least the basic + standard deduction plus amounts for age alone). +2. Eligibility: military retired pay counts for exactly the people the + statute's tests admit, restated here, in every year. +3. Cap and offset: in 2025 the deduction equals the lesser of the counted + benefits and the published cap less the head's and spouse's Social + Security retirement benefits, and never falls below zero. +4. Monotonicity: more military retired pay never lowers the deduction and + never raises it by more than the added pay. For a recipient the tests + don't admit, it doesn't change the deduction. + +`test_drawn_units` checks properties 2 to 4 on batches of units Hypothesis +draws, with any mix of these inputs and business losses. +""" + +from itertools import product + +import numpy as np +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from policyengine_us import Simulation + +YEARS = (2024, 2025, 2026) +STATUSES = ("SINGLE", "HEAD_OF_HOUSEHOLD", "SURVIVING_SPOUSE", "SEPARATE", "JOINT") +UNMARRIED = ("SINGLE", "HEAD_OF_HOUSEHOLD") + +# Basic standard deduction and the additional standard deduction for each of +# age 65 and blindness, which section 63(f) sets equal. 2025: the basic and +# age amounts in Chart A of the 2025 Form 1040 instructions, +# https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9 (Chart A itself +# says to file at "at least" its amount and has no blindness row; section +# 6012(f) uses "does not exceed" the standard deduction, blindness +# included). 2026: Rev. Proc. 2025-32, sec. 4.14, +# https://www.irs.gov/pub/irs-drop/rp-25-32.pdf#page=18 +BASIC = { + 2025: { + "SINGLE": 15_750, + "HEAD_OF_HOUSEHOLD": 23_625, + "SURVIVING_SPOUSE": 31_500, + "SEPARATE": 15_750, + "JOINT": 31_500, + }, + 2026: { + "SINGLE": 16_100, + "HEAD_OF_HOUSEHOLD": 24_150, + "SURVIVING_SPOUSE": 32_200, + "SEPARATE": 16_100, + "JOINT": 32_200, + }, +} +ADDITIONAL = { + 2025: {status: 2_000 if status in UNMARRIED else 1_600 for status in STATUSES}, + 2026: {status: 2_050 if status in UNMARRIED else 1_650 for status in STATUSES}, +} +# Form 39R line 8a for 2025: $48,216 single, $72,324 joint. 63-3022A(2)(b) +# and (c) give unmarried taxpayers and unremarried widows and widowers the +# single amount; (2)(e) gives a married taxpayer filing separately nothing. +# https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 +CAP_2025 = { + "SINGLE": 48_216, + "HEAD_OF_HOUSEHOLD": 48_216, + "SURVIVING_SPOUSE": 48_216, + "SEPARATE": 0, + "JOINT": 72_324, +} + + +def employment_test(year, status, income, aged_count, blind_count): + """63-3022A(1)(b)(iii) with the published filing thresholds.""" + if year < 2025 or income <= 0: + return False + if status == "SEPARATE": + # Any gross income requires a separate return, in both years. + return True + if year == 2025: + # Section 6012(f): gross income over the standard deduction. + threshold = BASIC[year][status] + ADDITIONAL[year][status] * ( + aged_count + blind_count + ) + return income > threshold + # Section 6012(a)(1)(A) and (B): blindness doesn't raise the threshold. + threshold = BASIC[year][status] + ADDITIONAL[year][status] * aged_count + return income >= threshold + + +def general_age_test(age, disabled): + """63-3022A(1)(a): age 65, or age 62 and classified as disabled.""" + return age >= 65 or (disabled and age >= 62) + + +def military_test(year, age, disabled, employed): + """Whether military retired pay counts toward the deduction.""" + if year < 2025: + return general_age_test(age, disabled) + return disabled or age >= 62 or employed + + +def simulate(units): + """One simulation of independent Idaho tax units. + + Each unit is {"filing_status": name, "adults": [inputs, ...]}; the first + adult is the retiree. Inputs are the same in every year. + """ + people, tax_units, households = {}, {}, {} + groups = {"marital_units": {}, "spm_units": {}, "families": {}} + for index, unit in enumerate(units): + members = [f"adult_{index}_{n}" for n in range(len(unit["adults"]))] + for name, inputs in zip(members, unit["adults"]): + people[name] = { + variable: {year: value for year in YEARS} + for variable, value in inputs.items() + } + tax_units[f"tax_unit_{index}"] = { + "members": members, + "filing_status": {year: unit["filing_status"] for year in YEARS}, + } + households[f"household_{index}"] = { + "members": members, + "state_code": {year: "ID" for year in YEARS}, + } + for name in ("marital_units", "spm_units", "families"): + groups[name][f"{name}_{index}"] = {"members": members} + return Simulation( + situation={ + "people": people, + "tax_units": tax_units, + "households": households, + **groups, + } + ) + + +def adult(age, disabled=False, blind=False, wages=0, profit=0, military=0, ss=0): + return { + "age": age, + "is_disabled": disabled, + "is_blind": blind, + "employment_income": wages, + "self_employment_income": profit, + "military_retirement_pay": military, + "social_security_retirement": ss, + } + + +def unit(status, retiree, spouse_age=None, pension=0): + adults = [dict(retiree, public_pension_income=pension)] + if status == "JOINT": + adults.append(adult(spouse_age)) + return {"filing_status": status, "adults": adults} + + +def first_rows(units): + sizes = [len(u["adults"]) for u in units] + return np.cumsum([0] + sizes[:-1]) + + +def results(simulation, units, year): + """Person results for the retiree, or every adult, and tax unit results.""" + rows = first_rows(units) + + def calculate(variable): + return np.asarray(simulation.calculate(variable, year)) + + relevant = calculate("id_retirement_benefits_deduction_relevant_income") + return { + "employment": calculate( + "id_retirement_benefits_deduction_military_employment_eligible" + )[rows], + "military": calculate( + "id_retirement_benefits_deduction_military_eligible_person" + ), + "relevant": np.add.reduceat(relevant, rows), + "deduction": calculate("id_retirement_benefits_deduction"), + "required": calculate("tax_unit_is_required_to_file"), + } + + +def reference_counted(year, u, employed): + """Benefits the statute counts toward the deduction, restated.""" + retiree = u["adults"][0] + counted = 0 + if military_test(year, retiree["age"], retiree["is_disabled"], employed): + counted += retiree["military_retirement_pay"] + if general_age_test(retiree["age"], retiree["is_disabled"]): + counted += retiree["public_pension_income"] + return counted + + +def unit_employment_reference(year, u): + retiree = u["adults"][0] + income = max(retiree["employment_income"], 0) + max( + retiree["self_employment_income"], 0 + ) + aged = sum(a["age"] >= 65 for a in u["adults"]) + blind = sum(a["is_blind"] for a in u["adults"]) + return employment_test(year, u["filing_status"], income, aged, blind) + + +def check_units(simulation, units, check_cap=True): + """Properties 2 to 4 for every unit and year.""" + rows = first_rows(units) + for year in YEARS: + r = results(simulation, units, year) + employed = [unit_employment_reference(year, u) for u in units] + np.testing.assert_array_equal(r["employment"], employed, err_msg=str(year)) + # Property 2, for every adult: the spouse has no income of their own. + expected_military = [] + for u, e in zip(units, employed): + for n, a in enumerate(u["adults"]): + own_employment = e if n == 0 else False + expected_military.append( + military_test(year, a["age"], a["is_disabled"], own_employment) + ) + np.testing.assert_array_equal( + r["military"], expected_military, err_msg=str(year) + ) + counted = np.array( + [reference_counted(year, u, e) for u, e in zip(units, employed)] + ) + np.testing.assert_allclose(r["relevant"], counted, err_msg=str(year)) + assert (r["deduction"] >= 0).all() + assert (r["deduction"] <= counted + 1e-6).all() + if year == 2025 and check_cap: + ss = np.array( + [ + sum(a["social_security_retirement"] for a in u["adults"]) + for u in units + ] + ) + cap = np.array([CAP_2025[u["filing_status"]] for u in units]) + expected = np.minimum(counted, np.maximum(cap - ss, 0)) + np.testing.assert_allclose(r["deduction"], expected, err_msg="2025 cap") + return rows + + +AGES = (45, 61, 62, 64, 65, 67) +MILITARY = (0, 30_000, 60_000) + + +def grid_units(): + """Units for properties 2 to 4, in groups that differ only in military pay.""" + units, groups = [], [] + shapes = product( + STATUSES, AGES, (False, True), (0, 10_000, 60_000), (0, 20_000), (0, 20_000) + ) + for status, age, disabled, wages, ss, pension in shapes: + group = [] + for military in MILITARY: + retiree = adult( + age, disabled=disabled, wages=wages, military=military, ss=ss + ) + group.append(len(units)) + units.append(unit(status, retiree, spouse_age=43, pension=pension)) + groups.append(group) + return units, groups + + +def differential_units(): + """Returns whose only gross income is the retiree's wages or profit.""" + units = [] + for status, age, spouse_age, blind, kind in product( + STATUSES, (45, 61), (43, 66), (False, True), ("wages", "profit") + ): + if status != "JOINT" and spouse_age == 66: + continue + aged = int(status == "JOINT" and spouse_age >= 65) + amounts = {0, 1} + for year in (2025, 2026): + threshold = BASIC[year][status] + ADDITIONAL[year][status] * ( + aged + (blind if year == 2025 else 0) + ) + amounts |= {threshold - 1, threshold, threshold + 1} + for amount in sorted(amounts): + retiree = adult(age, blind=blind, **{kind: amount}) + units.append(unit(status, retiree, spouse_age=spouse_age)) + return units + + +def test_grid(): + grid, groups = grid_units() + differential = differential_units() + units = grid + differential + simulation = simulate(units) + check_units(simulation, units) + + # Property 1, on the returns with only employment income. + offset = len(grid) + for year in (2025, 2026): + r = results(simulation, units, year) + for i, u in enumerate(differential): + retiree = u["adults"][0] + income = retiree["employment_income"] + retiree["self_employment_income"] + required = bool(r["required"][offset + i]) and income > 0 + assert bool(r["employment"][offset + i]) == required, (year, u) + assert required == unit_employment_reference(year, u), (year, u) + + # Property 4, across each group's military pay. + for year in YEARS: + r = results(simulation, units, year) + employed = [unit_employment_reference(year, u) for u in units] + for group in groups: + deductions = r["deduction"][group] + pay = np.array(MILITARY) + assert (np.diff(deductions) >= -1e-6).all(), (year, units[group[0]]) + assert (np.diff(deductions) <= np.diff(pay) + 1e-6).all() + retiree = units[group[0]]["adults"][0] + if not military_test( + year, retiree["age"], retiree["is_disabled"], employed[group[0]] + ): + assert np.ptp(deductions) == 0, (year, units[group[0]]) + + +@st.composite +def drawn_unit(draw): + status = draw(st.sampled_from(STATUSES)) + retiree = adult( + draw(st.integers(30, 90)), + disabled=draw(st.booleans()), + blind=draw(st.booleans()), + wages=draw(st.sampled_from([0, 5_000, 16_100, 32_200, 33_850, 90_000])), + profit=draw(st.integers(-20_000, 60_000)), + military=draw(st.integers(0, 90_000)), + ss=draw(st.sampled_from([0, 12_000, 30_000, 80_000])), + ) + spouse_age = draw(st.integers(30, 90)) + pension = draw(st.sampled_from([0, 20_000])) + military_extra = draw(st.integers(1, 40_000)) + base = unit(status, retiree, spouse_age=spouse_age, pension=pension) + more = unit( + status, + dict( + retiree, + military_retirement_pay=retiree["military_retirement_pay"] + military_extra, + ), + spouse_age=spouse_age, + pension=pension, + ) + return base, more, military_extra + + +@settings( + max_examples=5, + deadline=None, + derandomize=True, + suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large], +) +@given(drawn=st.lists(drawn_unit(), min_size=8, max_size=20)) +def test_drawn_units(drawn): + units = [u for base, more, _ in drawn for u in (base, more)] + simulation = simulate(units) + check_units(simulation, units) + for year in YEARS: + deductions = results(simulation, units, year)["deduction"] + for i, (base, _, extra) in enumerate(drawn): + low, high = deductions[2 * i], deductions[2 * i + 1] + assert low - 1e-6 <= high <= low + extra + 1e-6, (year, base) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person.yaml new file mode 100644 index 00000000000..c7e71e59e08 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person.yaml @@ -0,0 +1,285 @@ +# The person's own section 911 exclusions (Form 2555 line 43, lines 36 plus +# 42). A supplied foreign_earned_income_exclusion_gross_person_reported of +# zero or more is used as entered; a negative amount means not supplied. An +# entry applies only to the year entered. Otherwise a return with one head or +# spouse credits the return's line 43 (foreign_earned_income_exclusion_gross, +# as entered or from the leaves) to the head, and a joint return credits +# neither spouse. The legacy worksheet amount never stands in. + +- name: A single filer's gross exclusion is the head's own. + period: 2025 + input: + people: + head: + age: 40 + child: + age: 5 + tax_units: + tax_unit: + members: [head, child] + # Form 2555 lines 42 and 36. + foreign_earned_income_exclusion_amount: 30_000 + foreign_housing_exclusion: 5_000 + households: + household: + members: [head, child] + output: + foreign_earned_income_exclusion_gross_person: [35_000, 0] + +- name: Line 43 leaves out the line 44 deductions and the line 50 housing deduction. + period: 2025 + input: + people: + head: + age: 40 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_amount: 10_000 + foreign_housing_exclusion: 2_000 + # Line 44, deductions allocable to the excluded income. + foreign_earned_income_exclusion_allocable_deductions: 1_000 + # Line 50, a deduction under section 911(c)(4), not an exclusion. + foreign_housing_deduction: 3_000 + households: + household: + members: [head] + output: + # Worksheet line 2c is $10,000 + $2,000 - $1,000 + $3,000 = $14,000. + foreign_earned_income_exclusion: 14_000 + foreign_earned_income_exclusion_gross_person: 12_000 + +- name: A single filer's entered gross exclusion counts without leaves. + period: 2025 + input: + people: + head: + age: 40 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_gross: 10_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 10_000 + +- name: A negative entered gross exclusion counts as zero. + period: 2025 + input: + people: + head: + age: 40 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_gross: -1_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 0 + +- name: The legacy worksheet amount does not stand in for line 43. + period: 2025 + input: + people: + head: + age: 40 + tax_units: + tax_unit: + members: [head] + # Worksheet line 2c, which here is only a line 50 housing deduction. + foreign_earned_income_exclusion: 8_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 0 + +- name: A legacy worksheet amount alone does not count, even where it would equal line 43. + period: 2025 + input: + people: + head: + age: 40 + tax_units: + tax_unit: + members: [head] + # Worksheet line 2c equals line 43 when lines 44 and 50 and worksheet + # line 2b are zero, but without Form 2555 leaves nothing shows that + # they are. A filer who knows line 43 enters it as + # foreign_earned_income_exclusion_gross_person_reported. + foreign_earned_income_exclusion: 25_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 0 + +- name: A supplied zero is used, not the return's line 43. + period: 2025 + input: + people: + head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: 0 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_amount: 10_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 0 + +- name: A supplied negative amount means not supplied, so the return's line 43 stands in. + period: 2025 + input: + people: + head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: -500 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_amount: 10_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 10_000 + +- name: A joint return without each spouse's amount credits neither spouse. + period: 2025 + input: + people: + head: + age: 40 + spouse: + age: 40 + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + foreign_earned_income_exclusion_amount: 30_000 + households: + household: + members: [head, spouse] + output: + foreign_earned_income_exclusion_gross_person: [0, 0] + +- name: A joint return credits each spouse's supplied amount. + period: 2025 + input: + people: + head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: 20_000 + spouse: + age: 40 + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + foreign_earned_income_exclusion_amount: 20_000 + households: + household: + members: [head, spouse] + output: + foreign_earned_income_exclusion_gross_person: [20_000, 0] + +- name: One return's supplied amount leaves another return's head with that return's line 43. + period: 2025 + input: + people: + a_head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: 20_000 + a_spouse: + age: 40 + b_head: + age: 40 + tax_units: + a: + members: [a_head, a_spouse] + filing_status: JOINT + foreign_earned_income_exclusion_amount: 20_000 + b: + members: [b_head] + foreign_earned_income_exclusion_amount: 10_000 + households: + a_household: + members: [a_head, a_spouse] + b_household: + members: [b_head] + output: + foreign_earned_income_exclusion_gross_person: [20_000, 0, 10_000] + +- name: An amount supplied only for 2025 does not apply in 2026, so the return's line 43 stands in. + period: 2026 + input: + people: + head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: + 2025: 20_000 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_amount: 10_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person_reported: -1 + foreign_earned_income_exclusion_gross_person: 10_000 + +- name: A zero supplied for 2026 is used in 2026, not the 2025 amount or the return's line 43. + period: 2026 + input: + people: + head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: + 2025: 20_000 + 2026: 0 + tax_units: + tax_unit: + members: [head] + foreign_earned_income_exclusion_amount: 10_000 + households: + household: + members: [head] + output: + foreign_earned_income_exclusion_gross_person: 0 + +- name: One return's amount supplied only for 2025 does not apply in 2026 beside another return's 2026 amount. + period: 2026 + input: + people: + a_head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: + 2025: 20_000 + b_head: + age: 40 + foreign_earned_income_exclusion_gross_person_reported: + 2026: 4_000 + tax_units: + a: + members: [a_head] + foreign_earned_income_exclusion_amount: 10_000 + b: + members: [b_head] + foreign_earned_income_exclusion_amount: 4_000 + households: + a_household: + members: [a_head] + b_household: + members: [b_head] + output: + foreign_earned_income_exclusion_gross_person_reported: [-1, 4_000] + foreign_earned_income_exclusion_gross_person: [10_000, 4_000] diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_eligible_military_retirement_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_eligible_military_retirement_income.yaml new file mode 100644 index 00000000000..4b4d9511357 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_eligible_military_retirement_income.yaml @@ -0,0 +1,103 @@ +# Idaho Code 63-3022A(1)(b) covers retirement benefits paid to a retired +# member of the military services or to the member's unremarried widow or +# widower. + +- name: An unremarried surviving spouse counts military survivor benefits. + period: 2025 + input: + state_code: ID + age: 65 + is_surviving_spouse: true + military_retirement_pay_survivors: 25_000 + output: + id_eligible_military_retirement_income: 25_000 + id_retirement_benefits_deduction: 25_000 + +- name: A survivor who is not a surviving spouse does not count survivor benefits. + period: 2025 + input: + state_code: ID + age: 65 + is_surviving_spouse: false + military_retirement_pay_survivors: 25_000 + output: + id_eligible_military_retirement_income: 0 + id_retirement_benefits_deduction: 0 + +- name: A recipient keeps own retired pay when non-spouse survivor benefits are present. + period: 2025 + input: + state_code: ID + age: 65 + is_surviving_spouse: false + military_retirement_pay: 30_000 + military_retirement_pay_survivors: 25_000 + output: + id_eligible_military_retirement_income: 30_000 + id_retirement_benefits_deduction: 30_000 + +- name: A remarried survivor filing separately does not count survivor benefits. + period: 2025 + input: + people: + survivor: + age: 65 + is_surviving_spouse: true + military_retirement_pay_survivors: 25_000 + new_spouse: + age: 65 + families: + family: + members: [survivor, new_spouse] + marital_units: + couple: + members: [survivor, new_spouse] + tax_units: + survivor_return: + members: [survivor] + filing_status: SEPARATE + spouse_return: + members: [new_spouse] + filing_status: SEPARATE + households: + household: + members: [survivor, new_spouse] + state_code: ID + output: + id_eligible_military_retirement_income: [0, 0] + id_retirement_benefits_deduction: [0, 0] + +- name: An unmarried widow stays eligible when a married adult child shares the family. + period: 2025 + input: + people: + survivor: + age: 65 + is_surviving_spouse: true + military_retirement_pay_survivors: 25_000 + adult_child: + age: 40 + child_spouse: + age: 40 + families: + family: + members: [survivor, adult_child, child_spouse] + marital_units: + widow: + members: [survivor] + couple: + members: [adult_child, child_spouse] + tax_units: + survivor_return: + members: [survivor] + filing_status: SINGLE + child_return: + members: [adult_child, child_spouse] + filing_status: JOINT + households: + household: + members: [survivor, adult_child, child_spouse] + state_code: ID + output: + id_eligible_military_retirement_income: [25_000, 0, 0] + id_retirement_benefits_deduction: [25_000, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction.yaml index 72f0567011f..5be367692a4 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction.yaml @@ -103,6 +103,155 @@ output: id_retirement_benefits_deduction: 30_000 +# Military retirement benefits under the deduction's cap from 2025 (Idaho +# Code 63-3022A(1)(b), (2) and (3); Form 39R lines 8a to 8f). The cap is +# $48,216 single and $72,324 joint for 2025, and $0 on a separate return. The +# model reduces it by the head's and spouse's Social Security retirement +# benefits. 63-3022A(3) and line 8b also subtract Railroad Retirement Act +# benefits, which the model does not subtract yet. + +- name: 2025 military retired pay and a public pension share the $48,216 single cap. + period: 2025 + input: + state_code: ID + age: 66 + military_retirement_pay: 40_000 + public_pension_income: 20_000 + output: + id_retirement_benefits_deduction_relevant_income: 60_000 + id_retirement_benefits_deduction: 48_216 + +- name: 2025 Social Security benefits reduce the cap on military retired pay. + period: 2025 + input: + state_code: ID + age: 66 + military_retirement_pay: 40_000 + social_security_retirement: 20_000 + output: + # 48,216 - 20,000 + id_retirement_benefits_deduction: 28_216 + +- name: 2025 retired couple's Social Security reduces the $72,324 joint cap. + period: 2025 + input: + people: + retiree: + age: 67 + military_retirement_pay: 45_000 + social_security_retirement: 30_000 + spouse: + age: 65 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_relevant_income: [45_000, 0] + # 72,324 - 30,000 + id_retirement_benefits_deduction: 42_324 + +- name: 2025 a married retiree filing separately cannot deduct military retired pay. + period: 2025 + input: + people: + retiree: + # Aged 63, so the pay counts under 63-3022A(1)(b)(ii), and too young + # for the Medicare premiums that id_subtractions would otherwise + # include. + age: 63 + military_retirement_pay: 30_000 + spouse: + age: 63 + marital_units: + couple: + members: [retiree, spouse] + tax_units: + retiree_return: + members: [retiree] + filing_status: SEPARATE + spouse_return: + members: [spouse] + filing_status: SEPARATE + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_relevant_income: [30_000, 0] + id_retirement_benefits_deduction: [0, 0] + # Idaho Code 63-3022A(2)(e): nothing comes off either return. + id_subtractions: [0, 0] + +- name: 2025 an unremarried widow under 62 without a job or disability cannot deduct survivor benefits. + period: 2025 + input: + state_code: ID + age: 50 + is_surviving_spouse: true + military_retirement_pay_survivors: 25_000 + output: + id_retirement_benefits_deduction: 0 + id_subtractions: 0 + +- name: 2025 a working unremarried widow under 62 deducts survivor benefits. + period: 2025 + input: + state_code: ID + age: 50 + is_surviving_spouse: true + employment_income: 20_000 + military_retirement_pay_survivors: 25_000 + output: + # Idaho Code 63-3022A(1)(b)(iii) applies to the unremarried widow or + # widower as to the member, and $20,000 of wages exceeds the $15,750 + # single threshold. IDAPA 35.01.01.130.02 names age 65, or 62 and + # disabled, for survivors whose deceased spouse wasn't eligible, without + # making those the only routes. + id_retirement_benefits_deduction_military_eligible_person: true + id_retirement_benefits_deduction: 25_000 + id_subtractions: 25_000 + +- name: 2025 a 45-year-old receiving Social Security disability benefits deducts military retired pay. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + military_retirement_pay: 20_000 + output: + # The SSDI award is recognition as disabled by the Social Security + # Administration (Idaho Code 63-701(1)(d)), which 63-3022A(4) adopts. + # The model reduces the cap by Social Security retirement benefits only. + id_retirement_benefits_deduction_disabled: true + id_retirement_benefits_deduction: 20_000 + id_subtractions: 20_000 + +- name: 2025 an unremarried widow aged 62 deducts survivor benefits. + period: 2025 + input: + state_code: ID + age: 62 + is_surviving_spouse: true + military_retirement_pay_survivors: 25_000 + output: + id_retirement_benefits_deduction: 25_000 + +- name: 2025 the deduction reduces Idaho AGI. + period: 2025 + input: + state_code: ID + age: 40 + employment_income: 50_000 + military_retirement_pay: 30_000 + output: + id_retirement_benefits_deduction: 30_000 + id_subtractions: 30_000 + - name: Idaho general retirement deduction excludes non-spouse military survivor benefits before 2025. period: 2024 input: @@ -135,3 +284,58 @@ output: id_retirement_benefits_deduction_relevant_income: 10_000 id_retirement_benefits_deduction: 10_000 + +- name: 2024 a 63-year-old with permanent and total disability, no SSDI and no is_disabled deducts nothing. + period: 2024 + input: + state_code: ID + age: 63 + public_pension_income: 20_000 + is_permanently_and_totally_disabled: true + output: + # 26 U.S.C. 22(e)(3) is a federal tax test, not a recognition Idaho Code + # 63-701 or 49-117 lists. + id_retirement_benefits_deduction_disabled: false + id_retirement_benefits_deduction_eligible_person: false + id_retirement_benefits_deduction: 0 + +- name: 2024 a 63-year-old with the SSI disability test, no SSDI and no is_disabled deducts nothing. + period: 2024 + input: + state_code: ID + age: 63 + public_pension_income: 20_000 + meets_ssi_disability_criteria: true + output: + # The SSI disability test is the model's test, not a finding by the + # Social Security Administration. + id_retirement_benefits_deduction_disabled: false + id_retirement_benefits_deduction_eligible_person: false + id_retirement_benefits_deduction: 0 + +- name: 2024 a 63-year-old with a fully disabled service-connected veteran flag, no SSDI and no is_disabled deducts nothing. + period: 2024 + input: + state_code: ID + age: 63 + public_pension_income: 20_000 + is_fully_disabled_service_connected_veteran: true + output: + # 63-701(1)(e) also needs service in a war engaged in by the United + # States, which the model doesn't record. + id_retirement_benefits_deduction_disabled: false + id_retirement_benefits_deduction_eligible_person: false + id_retirement_benefits_deduction: 0 + +- name: 2024 a 63-year-old veteran with the supplied Idaho classification deducts a public pension. + period: 2024 + input: + state_code: ID + age: 63 + public_pension_income: 20_000 + is_fully_disabled_service_connected_veteran: true + id_retirement_benefits_disability_classification: DISABLED + output: + id_retirement_benefits_deduction_disabled: true + id_retirement_benefits_deduction_eligible_person: true + id_retirement_benefits_deduction: 20_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.yaml new file mode 100644 index 00000000000..68f5d6c6ab3 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.yaml @@ -0,0 +1,243 @@ +# Idaho Code 63-3022A(4): "disabled" means a disabled person described in +# section 63-701 (recognized as disabled by the Social Security +# Administration, the Railroad Retirement Board or "the office of management +# and budget pursuant to title 5", or, "if a person is not within the purview +# of" any other listed entity, by the person's public employee retirement +# system or disability plan; or "A disabled veteran of any war engaged in by +# the United States" with a VA service-connected disability of 10% or more or +# a VA nonservice-connected disability pension), or a person with a +# physician-certified permanent disability under section 49-117(7)(b)(iv). +# A supplied id_retirement_benefits_disability_classification decides, in the +# year it is supplied for. When it is unspecified, an SSDI award (the Social +# Security Administration's finding) or is_disabled classifies the person; +# nothing else does. + +- name: A person with no disability facts is not classified as disabled. + period: 2025 + input: + state_code: ID + age: 45 + output: + id_retirement_benefits_deduction_disabled: false + +- name: Social Security disability insurance benefits show recognition by the Social Security Administration. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + output: + id_retirement_benefits_deduction_disabled: true + +- name: Meeting the SSI disability test alone does not classify a person as disabled. + period: 2025 + input: + state_code: ID + age: 45 + meets_ssi_disability_criteria: true + output: + # The SSI disability test is the model's test, not a finding by the + # Social Security Administration. Supply DISABLED for an SSI disability + # award. + is_ssi_disabled: true + id_retirement_benefits_deduction_disabled: false + +- name: A veteran fully disabled by a service-connected disability is not classified as disabled without the Idaho classification. + period: 2025 + input: + state_code: ID + age: 45 + is_fully_disabled_service_connected_veteran: true + output: + # Section 63-701(1)(e) also needs service in a war engaged in by the + # United States, which the model doesn't record. + id_retirement_benefits_deduction_disabled: false + +- name: Permanent and total disability alone does not classify a person as disabled. + period: 2025 + input: + state_code: ID + age: 45 + is_permanently_and_totally_disabled: true + output: + # 26 U.S.C. 22(e)(3) is a federal tax test, not a recognition 63-701 or + # 49-117 lists. + id_retirement_benefits_deduction_disabled: false + +- name: The general disability input stands for the groups PolicyEngine has no input for. + period: 2025 + input: + state_code: ID + age: 45 + is_disabled: true + output: + id_retirement_benefits_deduction_disabled: true + +- name: The supplied classification admits a wartime veteran with a service-connected rating. + period: 2025 + input: + state_code: ID + age: 45 + is_fully_disabled_service_connected_veteran: true + id_retirement_benefits_disability_classification: DISABLED + output: + id_retirement_benefits_deduction_disabled: true + +- name: A supplied NOT_DISABLED overrides an SSDI award and the general disability input. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + is_disabled: true + id_retirement_benefits_disability_classification: NOT_DISABLED + output: + id_retirement_benefits_deduction_disabled: false + +- name: A supplied UNSPECIFIED gives the default. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + id_retirement_benefits_disability_classification: UNSPECIFIED + output: + id_retirement_benefits_deduction_disabled: true + +- name: One spouse's supplied classification leaves the other spouse's SSDI default in place. + period: 2025 + input: + people: + head: + age: 45 + is_disabled: true + id_retirement_benefits_disability_classification: NOT_DISABLED + spouse: + age: 45 + social_security_disability: 10_000 + military_retirement_pay: 20_000 + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + households: + household: + members: [head, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_disabled: [false, true] + # The spouse is classified as disabled (63-3022A(1)(b)(i)), so the + # spouse's $20,000 of military retired pay counts. + id_retirement_benefits_deduction_military_eligible_person: [false, true] + id_retirement_benefits_deduction: 20_000 + +- name: A classification supplied only for 2024 does not apply in 2025, so the SSDI default decides. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + id_retirement_benefits_disability_classification: + 2024: NOT_DISABLED + output: + id_retirement_benefits_disability_classification: UNSPECIFIED + id_retirement_benefits_deduction_disabled: true + +- name: A classification supplied for 2025 replaces the 2024 one in 2025. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + id_retirement_benefits_disability_classification: + 2024: DISABLED + 2025: NOT_DISABLED + output: + id_retirement_benefits_deduction_disabled: false + +- name: 2025 a spouse's DISABLED supplied only for 2024 does not admit the spouse's 2025 public pension. + period: 2025 + input: + people: + head: + age: 63 + spouse: + age: 63 + public_pension_income: 20_000 + id_retirement_benefits_disability_classification: + 2024: DISABLED + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + households: + household: + members: [head, spouse] + state_code: ID + output: + # The spouse has no 2025 classification, SSDI or is_disabled, so at 63 + # the spouse fails the (1)(a) test. The 2024 classification would admit + # the $20,000 pension if it applied in 2025. + id_retirement_benefits_disability_classification: [UNSPECIFIED, UNSPECIFIED] + id_retirement_benefits_deduction_disabled: [false, false] + id_retirement_benefits_deduction: 0 + +- name: 2025 the head's own 2025 classification leaves the spouse's 2025 classification unspecified. + period: 2025 + input: + people: + head: + age: 63 + id_retirement_benefits_disability_classification: + 2025: NOT_DISABLED + spouse: + age: 63 + public_pension_income: 20_000 + id_retirement_benefits_disability_classification: + 2024: DISABLED + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + households: + household: + members: [head, spouse] + state_code: ID + output: + # The spouse's 2025 value is the spouse's own default whether or not the + # head supplies a classification for 2025. + id_retirement_benefits_disability_classification: [NOT_DISABLED, UNSPECIFIED] + id_retirement_benefits_deduction_disabled: [false, false] + id_retirement_benefits_deduction: 0 + +- name: Blindness alone does not count. + period: 2025 + input: + state_code: ID + age: 45 + is_blind: true + output: + # Section 63-701(1)(g) lists blindness as a group of its own, not as a + # disabled person, and the Form 39R list of who is classified as + # disabled leaves it out. + id_retirement_benefits_deduction_disabled: false + +- name: Social Security survivor benefits are not a finding of disability. + period: 2025 + input: + state_code: ID + age: 45 + social_security_survivors: 10_000 + output: + id_retirement_benefits_deduction_disabled: false + +- name: Veterans benefits alone do not show a disability rating. + period: 2025 + input: + state_code: ID + age: 45 + veterans_benefits: 10_000 + output: + # veterans_benefits combines disability compensation with pensions, + # survivor benefits and education benefits. + id_retirement_benefits_deduction_disabled: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.yaml new file mode 100644 index 00000000000..5d2f3af2ee0 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.yaml @@ -0,0 +1,128 @@ +# Idaho Code 63-3022A(1)(b). Before 2025, military retirement benefits had +# the age test of 63-3022A(1)(a): age 65, or age 62 and disabled. From 2025: +# disabled at any age, age 62 by the end of the year, or the employment test. + +- name: 2024 a 64-year-old does not qualify. + period: 2024 + input: + state_code: ID + age: 64 + output: + id_retirement_benefits_deduction_military_eligible_person: false + +- name: 2024 a 65-year-old qualifies. + period: 2024 + input: + state_code: ID + age: 65 + output: + id_retirement_benefits_deduction_military_eligible_person: true + +- name: 2024 a disabled 62-year-old qualifies. + period: 2024 + input: + state_code: ID + age: 62 + is_disabled: true + output: + id_retirement_benefits_deduction_military_eligible_person: true + +- name: 2024 a disabled 61-year-old does not qualify. + period: 2024 + input: + state_code: ID + age: 61 + is_disabled: true + output: + id_retirement_benefits_deduction_military_eligible_person: false + +- name: 2024 a working 45-year-old does not qualify. + period: 2024 + input: + state_code: ID + age: 45 + employment_income: 100_000 + output: + id_retirement_benefits_deduction_military_eligible_person: false + +- name: 2025 a 62-year-old qualifies. + period: 2025 + input: + state_code: ID + age: 62 + output: + id_retirement_benefits_deduction_military_eligible_person: true + +- name: 2025 a 61-year-old without a job or disability does not qualify. + period: 2025 + input: + state_code: ID + age: 61 + output: + id_retirement_benefits_deduction_military_eligible_person: false + +- name: 2025 a disabled 40-year-old qualifies. + period: 2025 + input: + state_code: ID + age: 40 + is_disabled: true + output: + id_retirement_benefits_deduction_military_eligible_person: true + +- name: 2025 a 45-year-old receiving Social Security disability benefits qualifies. + period: 2025 + input: + state_code: ID + age: 45 + social_security_disability: 10_000 + output: + id_retirement_benefits_deduction_military_eligible_person: true + +- name: 2025 the Idaho disability classification overrides the general disability input. + period: 2025 + input: + state_code: ID + age: 45 + is_disabled: true + id_retirement_benefits_disability_classification: NOT_DISABLED + output: + id_retirement_benefits_deduction_military_eligible_person: false + +- name: 2025 a 45-year-old whose wages require a federal return qualifies. + period: 2025 + input: + state_code: ID + age: 45 + employment_income: 60_000 + output: + id_retirement_benefits_deduction_military_eligible_person: true + +- name: 2025 a 45-year-old whose wages do not require a federal return does not qualify. + period: 2025 + input: + state_code: ID + age: 45 + employment_income: 10_000 + output: + id_retirement_benefits_deduction_military_eligible_person: false + +- name: 2025 a dependent does not qualify, whatever the age. + period: 2025 + input: + people: + head: + age: 45 + parent: + age: 70 + is_tax_unit_dependent: true + tax_units: + tax_unit: + members: [head, parent] + filing_status: SINGLE + households: + household: + members: [head, parent] + state_code: ID + output: + id_retirement_benefits_deduction_military_eligible_person: [false, false] diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.yaml new file mode 100644 index 00000000000..7fb6ef95e52 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.yaml @@ -0,0 +1,743 @@ +# Idaho Code 63-3022A(1)(b)(iii): employed, with enough income from that +# employment to have to file a federal return "under section 6012(a)(1)". +# For 2025 the model applies section 6012(f), which replaces (a)(1) for 2018 +# to 2025: gross income over the standard deduction ($15,750 single and +# $31,500 joint, plus $2,000 unmarried or $1,600 married for each of age 65 +# and blindness), and any gross income on a separate return. 2026 applies +# section 6012(a)(1): gross income of at least the basic standard deduction +# ($16,100 single and $32,200 joint, Rev. Proc. 2025-32), plus $2,050 +# unmarried or $1,650 married for each spouse aged 65 or older. A separate +# return has no exception in 2026, so its threshold is the exemption amount, +# $0, and the test turns on having income from employment at all. + +- name: 2025 single filer with wages equal to the standard deduction does not meet the test. + period: 2025 + input: + state_code: ID + age: 45 + employment_income: 15_750 + output: + id_retirement_benefits_deduction_military_employment_eligible: false + +- name: 2025 single filer with wages a dollar over the standard deduction meets the test. + period: 2025 + input: + state_code: ID + age: 45 + employment_income: 15_751 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2025 blindness raises the single threshold to $17,750. + period: 2025 + input: + state_code: ID + age: 45 + is_blind: true + employment_income: 17_750 + output: + id_retirement_benefits_deduction_military_employment_eligible: false + +- name: 2026 single filer with wages a dollar under the basic standard deduction does not meet the test. + period: 2026 + input: + state_code: ID + age: 45 + employment_income: 16_099 + output: + id_retirement_benefits_deduction_military_employment_eligible: false + +- name: 2026 single filer with wages equal to the basic standard deduction meets the test. + period: 2026 + input: + state_code: ID + age: 45 + employment_income: 16_100 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2026 blindness does not raise the threshold. + period: 2026 + input: + state_code: ID + age: 45 + is_blind: true + employment_income: 16_100 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2025 a married person filing separately meets the test with any wages. + period: 2025 + input: + state_code: ID + age: 45 + filing_status: SEPARATE + employment_income: 5_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2026 a married person filing separately with no income from employment does not meet the test. + period: 2026 + input: + state_code: ID + age: 45 + filing_status: SEPARATE + output: + # The separate return's 2026 threshold is $0, which no income from + # employment would otherwise meet. + id_retirement_benefits_deduction_military_employment_eligible: false + +- name: 2026 joint return uses the joint threshold, and a dollar under it fails. + period: 2026 + input: + people: + retiree: + age: 45 + employment_income: 32_199 + spouse: + age: 43 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + +- name: 2026 joint return compares the retiree's own wages with the joint threshold, whatever the spouse earns. + period: 2026 + input: + people: + retiree: + age: 45 + employment_income: 20_000 + spouse: + age: 43 + employment_income: 40_000 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + # The couple must file ($60,000 of wages), but the retiree's $20,000 is + # under the $32,200 joint threshold. The spouse's $40,000 meets it. + id_retirement_benefits_deduction_military_employment_eligible: [false, true] + +- name: 2026 joint return with wages equal to the joint threshold meets the test for the employed spouse only. + period: 2026 + input: + people: + retiree: + age: 45 + employment_income: 32_200 + spouse: + age: 43 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + +- name: 2026 a spouse aged 65 raises the joint threshold to $33,850. + period: 2026 + input: + people: + retiree: + age: 45 + employment_income: 33_849 + spouse: + age: 66 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + +- name: 2026 joint return with wages at the $33,850 threshold meets the test. + period: 2026 + input: + people: + retiree: + age: 45 + employment_income: 33_850 + spouse: + age: 66 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + +- name: 2025 a spouse aged 65 raises the joint standard deduction to $33,100. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 33_100 + spouse: + age: 66 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + +- name: Self-employment profit counts as income from employment, standing in for gross business income. + period: 2026 + input: + state_code: ID + age: 45 + self_employment_income: 20_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: Profit from a specified service trade or business counts as income from employment. + period: 2026 + input: + state_code: ID + age: 45 + sstb_self_employment_income: 20_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: Farm profit counts as income from employment. + period: 2026 + input: + state_code: ID + age: 45 + farm_operations_income: 20_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2025 a business with $5,000 of gross income, under the section 6012 threshold, does not meet the test. + period: 2025 + input: + state_code: ID + age: 45 + # Schedule C line 7, with no business expenses. + business_gross_income_reported: 5_000 + self_employment_income: 5_000 + output: + # Section 6017 requires a self-employment tax return at $400 of net + # earnings. Idaho Code 63-3022A(1)(b)(iii) names section 6012(a)(1), so + # the test is the gross income threshold ($15,750). + id_retirement_benefits_deduction_military_employment_eligible: false + +- name: 2025 gross business income over the threshold meets the test although the net profit is under it. + period: 2025 + input: + state_code: ID + age: 45 + # Schedule C line 7 of $20,000, less $15,000 of expenses. + business_gross_income_reported: 20_000 + self_employment_income: 5_000 + output: + # Chart A counts Schedule C line 7, and $20,000 exceeds $15,750. + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2025 gross farm income over the threshold meets the test although the net farm profit is under it. + period: 2025 + input: + state_code: ID + age: 45 + # Schedule F line 9 of $16,000, less $14,000 of expenses. + farm_gross_income_reported: 16_000 + farm_operations_income: 2_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2025 taxable employer dependent care benefits count with wages. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 29_000 + # W-2 box 10 (Form 2441 line 12). + dependent_care_employer_benefits: 6_000 + military_retirement_pay: 30_000 + child: + age: 3 + tax_units: + tax_unit: + members: [retiree, child] + filing_status: HEAD_OF_HOUSEHOLD + # Form 2441 line 16: $6,000 of qualified expenses for the child. + dependent_care_assistance_qualified_expenses: 6_000 + tax_unit_childcare_expenses: 6_000 + households: + household: + members: [retiree, child] + state_code: ID + output: + # Wages less the benefits are $29,000 - $6,000 = $23,000, under the + # $23,625 head of household threshold. Form 2441 line 25 excludes the + # smallest of the $6,000 of benefits, the $6,000 of qualified expenses + # (line 16), earned income and the $5,000 cap: $5,000. Line 26 leaves + # $1,000 taxable, and $24,000 exceeds $23,625. + irs_employment_income: [23_000, 0] + dependent_care_assistance_exclusion: 5_000 + taxable_dependent_care_benefits: [1_000, 0] + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + id_retirement_benefits_deduction: 30_000 + +- name: 2025 employer dependent care benefits without reported qualified expenses count in full. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 24_000 + dependent_care_employer_benefits: 1_000 + military_retirement_pay: 30_000 + child: + age: 3 + tax_units: + tax_unit: + members: [retiree, child] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + members: [retiree, child] + state_code: ID + output: + # Without dependent_care_assistance_qualified_expenses (Form 2441 line + # 16), the federal model takes qualified expenses as zero: nothing is + # excluded and all $1,000 is taxable (line 26). Idaho counts that amount: + # $23,000 of wages plus $1,000 exceeds $23,625. + irs_employment_income: [23_000, 0] + dependent_care_assistance_exclusion: 0 + taxable_dependent_care_benefits: [1_000, 0] + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + id_retirement_benefits_deduction: 30_000 + +- name: 2025 foreign wages excluded under section 911 count for a single filer. + period: 2025 + input: + state_code: ID + age: 45 + employment_income: 10_000 + # Form 2555 line 42. + foreign_earned_income_exclusion_amount: 10_000 + output: + # Section 6012(c) counts the excluded $10,000; $20,000 exceeds $15,750. + foreign_earned_income_exclusion_gross_person: 10_000 + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: 2025 joint return counts the retiree's own excluded foreign wages. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 20_000 + foreign_earned_income_exclusion_gross_person_reported: 20_000 + spouse: + age: 43 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + foreign_earned_income_exclusion_amount: 20_000 + households: + household: + members: [retiree, spouse] + state_code: ID + output: + # $20,000 of wages and $20,000 excluded exceed the $31,500 joint + # threshold. + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + +- name: 2025 joint return does not count the spouse's excluded foreign wages for the retiree. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 20_000 + spouse: + age: 43 + foreign_earned_income_exclusion_gross_person_reported: 20_000 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + foreign_earned_income_exclusion_amount: 20_000 + households: + household: + members: [retiree, spouse] + state_code: ID + output: + # The retiree's $20,000 and the spouse's $20,000 are each under $31,500. + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + +- name: 2025 a spouse's supplied gross business income leaves the retiree's net profit in place. + period: 2025 + input: + people: + retiree: + age: 45 + self_employment_income: 35_000 + military_retirement_pay: 30_000 + spouse: + age: 43 + self_employment_income: 5_000 + business_gross_income_reported: 5_000 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + # The retiree has no supplied gross amount, so the $35,000 net profit + # stands in and exceeds the $31,500 joint threshold. + business_gross_income: [35_000, 5_000] + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + id_retirement_benefits_deduction: 30_000 + +- name: 2025 a spouse's supplied gross farm income leaves the retiree's net farm profit in place. + period: 2025 + input: + people: + retiree: + age: 45 + farm_operations_income: 35_000 + military_retirement_pay: 30_000 + spouse: + age: 43 + farm_operations_income: 5_000 + farm_gross_income_reported: 5_000 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + farm_gross_income: [35_000, 5_000] + id_retirement_benefits_deduction_military_employment_eligible: [true, false] + id_retirement_benefits_deduction: 30_000 + +- name: 2026 a retiree's gross business income supplied only for 2025 does not apply in 2026, so the retiree's net profit stands in. + period: 2026 + input: + people: + head: + age: 43 + retiree: + age: 45 + self_employment_income: 5_000 + military_retirement_pay: 30_000 + business_gross_income_reported: + 2025: 40_000 + tax_units: + tax_unit: + members: [head, retiree] + filing_status: JOINT + households: + household: + members: [head, retiree] + state_code: ID + output: + # An entry applies only to the year entered. The retiree's $5,000 net + # profit falls short of the $32,200 joint threshold; the 2025 amount + # would meet it if it applied in 2026. + business_gross_income_reported: [-1, -1] + business_gross_income: [0, 5_000] + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + id_retirement_benefits_deduction: 0 + +- name: 2026 the head's own 2026 gross business income leaves the retiree's net profit in place. + period: 2026 + input: + people: + head: + age: 43 + self_employment_income: 5_000 + business_gross_income_reported: + 2026: 5_000 + retiree: + age: 45 + self_employment_income: 5_000 + military_retirement_pay: 30_000 + business_gross_income_reported: + 2025: 40_000 + tax_units: + tax_unit: + members: [head, retiree] + filing_status: JOINT + households: + household: + members: [head, retiree] + state_code: ID + output: + # The retiree's 2026 value is the retiree's own net profit whether or + # not the head enters an amount for 2026. + business_gross_income_reported: [5_000, -1] + business_gross_income: [5_000, 5_000] + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + id_retirement_benefits_deduction: 0 + +- name: 2026 a retiree's gross farm income supplied only for 2025 does not apply in 2026, so the retiree's net farm profit stands in. + period: 2026 + input: + people: + head: + age: 43 + retiree: + age: 45 + farm_operations_income: 5_000 + military_retirement_pay: 30_000 + farm_gross_income_reported: + 2025: 40_000 + tax_units: + tax_unit: + members: [head, retiree] + filing_status: JOINT + households: + household: + members: [head, retiree] + state_code: ID + output: + # As with gross business income, the 2025 amount doesn't apply in 2026, + # and the retiree's $5,000 net farm profit falls short of the $32,200 + # joint threshold. + farm_gross_income_reported: [-1, -1] + farm_gross_income: [0, 5_000] + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + id_retirement_benefits_deduction: 0 + +- name: 2025 a supplied zero of gross business income is used, not the net profit. + period: 2025 + input: + people: + retiree: + age: 45 + self_employment_income: 35_000 + business_gross_income_reported: 0 + military_retirement_pay: 30_000 + spouse: + age: 43 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + business_gross_income: [0, 0] + id_retirement_benefits_deduction_military_employment_eligible: [false, false] + id_retirement_benefits_deduction: 0 + +- name: 2025 one return's supplied section 911 amount leaves a sole filer's excluded wages in place. + period: 2025 + input: + people: + a_retiree: + age: 45 + employment_income: 20_000 + foreign_earned_income_exclusion_gross_person_reported: 20_000 + a_spouse: + age: 43 + b_retiree: + age: 45 + employment_income: 10_000 + military_retirement_pay: 30_000 + tax_units: + a: + members: [a_retiree, a_spouse] + filing_status: JOINT + foreign_earned_income_exclusion_amount: 20_000 + b: + members: [b_retiree] + # Form 2555 line 42. + foreign_earned_income_exclusion_amount: 10_000 + households: + a_household: + members: [a_retiree, a_spouse] + state_code: ID + b_household: + members: [b_retiree] + state_code: ID + output: + # B's $10,000 of wages and $10,000 excluded exceed the $15,750 single + # threshold. + foreign_earned_income_exclusion_gross_person: [20_000, 0, 10_000] + id_retirement_benefits_deduction_military_employment_eligible: [true, false, true] + id_retirement_benefits_deduction: [0, 30_000] + +- name: 2026 section 911 amounts supplied only for 2025 do not apply in 2026, so each return's own line 43 stands in. + period: 2026 + input: + people: + a_retiree: + age: 45 + foreign_earned_income_exclusion_gross_person_reported: + 2025: 20_000 + a_spouse: + age: 43 + b_retiree: + age: 45 + employment_income: 10_000 + military_retirement_pay: 30_000 + foreign_earned_income_exclusion_gross_person_reported: + 2025: 20_000 + tax_units: + a: + members: [a_retiree, a_spouse] + filing_status: JOINT + b: + members: [b_retiree] + # Form 2555 line 42. + foreign_earned_income_exclusion_amount: 1_000 + households: + a_household: + members: [a_retiree, a_spouse] + state_code: ID + b_household: + members: [b_retiree] + state_code: ID + output: + # A's joint return credits neither spouse, and B, a sole filer, gets B's + # own $1,000 line 43. B's $10,000 of wages and $1,000 excluded fall short + # of the $16,100 single threshold; B's 2025 amount would meet it if it + # applied in 2026. + foreign_earned_income_exclusion_gross_person_reported: [-1, -1, -1] + foreign_earned_income_exclusion_gross_person: [0, 0, 1_000] + id_retirement_benefits_deduction_military_employment_eligible: [false, false, false] + id_retirement_benefits_deduction: [0, 0] + +- name: 2025 a single filer's entered gross section 911 exclusion counts without Form 2555 leaves. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 10_000 + military_retirement_pay: 30_000 + tax_units: + tax_unit: + members: [retiree] + # Form 2555 line 43. + foreign_earned_income_exclusion_gross: 10_000 + households: + household: + members: [retiree] + state_code: ID + output: + foreign_earned_income_exclusion_gross_person: 10_000 + id_retirement_benefits_deduction_military_employment_eligible: true + id_retirement_benefits_deduction: 30_000 + +- name: 2025 a legacy section 911 amount made of a line 50 housing deduction does not count. + period: 2025 + input: + people: + retiree: + age: 45 + self_employment_income: 12_000 + military_retirement_pay: 30_000 + tax_units: + tax_unit: + members: [retiree] + # Worksheet line 2c, here only the line 50 housing deduction, which + # section 911(c)(4) makes a deduction, not an exclusion. + foreign_earned_income_exclusion: 8_000 + households: + household: + members: [retiree] + state_code: ID + output: + # Section 6012(c) adds back only the exclusion. $12,000 is under + # $15,750; counting the $8,000 would give $20,000. + foreign_earned_income_exclusion_gross_person: 0 + id_retirement_benefits_deduction_military_employment_eligible: false + id_retirement_benefits_deduction: 0 + +- name: 2025 the line 50 housing deduction does not count with Form 2555 leaves. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 5_000 + military_retirement_pay: 30_000 + tax_units: + tax_unit: + members: [retiree] + foreign_earned_income_exclusion_amount: 10_000 + foreign_housing_deduction: 8_000 + households: + household: + members: [retiree] + state_code: ID + output: + # $5,000 of wages and the $10,000 line 42 exclusion are under $15,750; + # adding line 50 would give $23,000. + foreign_earned_income_exclusion_gross_person: 10_000 + id_retirement_benefits_deduction_military_employment_eligible: false + id_retirement_benefits_deduction: 0 + +- name: A business loss does not reduce wages. + period: 2026 + input: + state_code: ID + age: 45 + employment_income: 20_000 + self_employment_income: -10_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: true + +- name: Pension and investment income are not income from employment. + period: 2026 + input: + state_code: ID + age: 45 + military_retirement_pay: 30_000 + taxable_interest_income: 20_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: false + +- name: The employment test does not apply before 2025. + period: 2024 + input: + state_code: ID + age: 45 + employment_income: 100_000 + output: + id_retirement_benefits_deduction_military_employment_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.yaml new file mode 100644 index 00000000000..3b05d35f4fd --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.yaml @@ -0,0 +1,96 @@ +# Which retirement benefits count toward the Idaho retirement benefits +# deduction (Form 39R line 8e). The benefits of Idaho Code 63-3022A(1)(a) +# count for a head or spouse who is 65, or 62 and disabled. Military +# retirement benefits count on the test of 63-3022A(1)(b): before 2025 the +# same age test, and from 2025 a recipient who is disabled, is 62 or older, +# or works enough to have to file a federal return. + +- name: 2024 a 40-year-old cannot deduct military retired pay. + period: 2024 + input: + state_code: ID + age: 40 + military_retirement_pay: 30_000 + output: + id_retirement_benefits_deduction_eligible_person: false + id_retirement_benefits_deduction_military_eligible_person: false + id_retirement_benefits_deduction_relevant_income: 0 + id_retirement_benefits_deduction: 0 + +- name: 2024 a 66-year-old deducts military retired pay. + period: 2024 + input: + state_code: ID + age: 66 + military_retirement_pay: 30_000 + output: + id_retirement_benefits_deduction_military_eligible_person: true + id_retirement_benefits_deduction_relevant_income: 30_000 + id_retirement_benefits_deduction: 30_000 + +- name: 2025 a 40-year-old without a job or disability cannot deduct military retired pay. + period: 2025 + input: + state_code: ID + age: 40 + military_retirement_pay: 30_000 + output: + id_retirement_benefits_deduction_military_eligible_person: false + id_retirement_benefits_deduction_relevant_income: 0 + id_retirement_benefits_deduction: 0 + +- name: 2025 a working 40-year-old deducts military retired pay. + period: 2025 + input: + state_code: ID + age: 40 + employment_income: 50_000 + military_retirement_pay: 30_000 + output: + id_retirement_benefits_deduction_military_eligible_person: true + id_retirement_benefits_deduction_relevant_income: 30_000 + id_retirement_benefits_deduction: 30_000 + +- name: 2025 a disabled 40-year-old deducts military retired pay. + period: 2025 + input: + state_code: ID + age: 40 + is_disabled: true + military_retirement_pay: 30_000 + output: + id_retirement_benefits_deduction_relevant_income: 30_000 + id_retirement_benefits_deduction: 30_000 + +- name: 2025 a 40-year-old with a public pension still needs the general age test. + period: 2025 + input: + state_code: ID + age: 40 + employment_income: 50_000 + public_pension_income: 20_000 + output: + id_retirement_benefits_deduction_relevant_income: 0 + id_retirement_benefits_deduction: 0 + +- name: 2025 working couple deducts all of the retiree's $30,000. + period: 2025 + input: + people: + retiree: + age: 45 + employment_income: 60_000 + military_retirement_pay: 30_000 + spouse: + age: 43 + tax_units: + tax_unit: + members: [retiree, spouse] + filing_status: JOINT + households: + household: + members: [retiree, spouse] + state_code: ID + output: + id_retirement_benefits_deduction_relevant_income: [30_000, 0] + id_retirement_benefits_deduction: 30_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.yaml index b53c81721f2..00e5611133d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.yaml @@ -37,3 +37,15 @@ is_tax_unit_head_or_spouse: true output: id_retirement_benefits_deduction_eligible_person: true + +- name: Idaho 63-year-old receiving Social Security disability benefits is classified as disabled. + period: 2024 + input: + state_code: ID + age: 63 + social_security_disability: 12_000 + is_tax_unit_head_or_spouse: true + output: + # Idaho Code 63-3022A(4) adopts 63-701(1)(d): recognized as disabled by + # the Social Security Administration. + id_retirement_benefits_deduction_eligible_person: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_deduction.yaml deleted file mode 100644 index 3bb0e02ec91..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_deduction.yaml +++ /dev/null @@ -1,186 +0,0 @@ -- name: Military retirement deduction does not apply before 2025 - period: 2024 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 50_000 - age: 40 - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_military_retirement_deduction: 0 - -- name: Military retirement fully exempt for 2025 without age requirement - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 50_000 - age: 40 - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_military_retirement_deduction: 50_000 - -- name: Military retirement exempt for joint filers 2025 - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 30_000 - age: 35 - person2: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 25_000 - age: 38 - tax_units: - tax_unit: - members: [person1, person2] - filing_status: JOINT - households: - household: - members: [person1, person2] - state_code: ID - output: - id_military_retirement_deduction: 55_000 - -- name: Only head or spouse military retirement is exempt - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 30_000 - age: 35 - person2: - is_tax_unit_head_or_spouse: false - military_retirement_pay: 20_000 - age: 60 - tax_units: - tax_unit: - members: [person1, person2] - filing_status: HEAD_OF_HOUSEHOLD - households: - household: - members: [person1, person2] - state_code: ID - output: - id_military_retirement_deduction: 30_000 - -- name: Military retirement survivor benefits for qualifying survivor aged 65 under Idaho Code § 63-3022A(1)(b) - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - is_surviving_spouse: true - military_retirement_pay_survivors: 25_000 - age: 65 - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_military_retirement_deduction: 25_000 - -- name: Idaho military retirement deduction excludes a non-spouse survivor. - period: 2025 - input: - state_code: ID - age: 65 - is_surviving_spouse: false - military_retirement_pay_survivors: 25_000 - output: - id_military_retirement_deduction: 0 - -- name: Idaho military retirement deduction keeps own pay when non-spouse survivor benefits are present. - period: 2025 - input: - state_code: ID - age: 65 - is_surviving_spouse: false - military_retirement_pay: 30_000 - military_retirement_pay_survivors: 25_000 - output: - id_military_retirement_deduction: 30_000 - -- name: Idaho military survivor deduction excludes a remarried survivor filing separately. - period: 2025 - input: - people: - survivor: - is_surviving_spouse: true - military_retirement_pay_survivors: 25_000 - new_spouse: {} - families: - family: - members: [survivor, new_spouse] - marital_units: - couple: - members: [survivor, new_spouse] - tax_units: - survivor_return: - members: [survivor] - filing_status: SEPARATE - spouse_return: - members: [new_spouse] - filing_status: SEPARATE - households: - household: - members: [survivor, new_spouse] - state_code: ID - output: - id_military_retirement_deduction: [0, 0] - -- name: Idaho unmarried widow remains eligible when a married adult child shares the family. - period: 2025 - input: - people: - survivor: - age: 65 - is_surviving_spouse: true - military_retirement_pay_survivors: 25_000 - adult_child: - age: 40 - child_spouse: - age: 40 - families: - family: - members: [survivor, adult_child, child_spouse] - marital_units: - widow: - members: [survivor] - couple: - members: [adult_child, child_spouse] - tax_units: - survivor_return: - members: [survivor] - filing_status: SINGLE - child_return: - members: [adult_child, child_spouse] - filing_status: JOINT - households: - household: - members: [survivor, adult_child, child_spouse] - state_code: ID - output: - id_military_retirement_deduction: [25_000, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_hb40_integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_hb40_integration.yaml deleted file mode 100644 index 26495a91af9..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_hb40_integration.yaml +++ /dev/null @@ -1,156 +0,0 @@ -- name: Pre-2025 military retirement requires age 65+ for general retirement deduction - period: 2024 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 30_000 - public_pension_income: 0 - social_security_retirement: 0 - age: 40 - is_disabled: false - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - # Age requirement (65+) not met, so no deduction from general retirement - id_retirement_benefits_deduction_eligible_person: false - id_retirement_benefits_deduction_relevant_income: 0 - id_retirement_benefits_deduction: 0 - # Separate military deduction does not apply until 2025 - id_military_retirement_deduction: 0 - -- name: Pre-2025 military retirement deductible if age 65+ - period: 2024 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 30_000 - public_pension_income: 0 - social_security_retirement: 0 - age: 66 - is_disabled: false - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_retirement_benefits_deduction_eligible_person: true - id_retirement_benefits_deduction_relevant_income: 30_000 - id_retirement_benefits_deduction: 30_000 - id_military_retirement_deduction: 0 - -- name: 2025 military retirement fully exempt regardless of age via separate deduction - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 30_000 - public_pension_income: 0 - social_security_retirement: 0 - age: 40 - is_disabled: false - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - # Age requirement not met, so no general retirement deduction - id_retirement_benefits_deduction_eligible_person: false - # Military retirement excluded from relevant income for 2025 - id_retirement_benefits_deduction_relevant_income: 0 - id_retirement_benefits_deduction: 0 - # But military retirement fully deductible via separate HB 40 deduction - id_military_retirement_deduction: 30_000 - -- name: 2025 public pension still requires age 65+ for general retirement deduction - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 0 - public_pension_income: 20_000 - social_security_retirement: 0 - age: 40 - is_disabled: false - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_retirement_benefits_deduction_eligible_person: false - id_retirement_benefits_deduction_relevant_income: 0 - id_retirement_benefits_deduction: 0 - id_military_retirement_deduction: 0 - -- name: 2025 public pension deductible if age 65+ - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 0 - public_pension_income: 20_000 - social_security_retirement: 0 - age: 66 - is_disabled: false - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_retirement_benefits_deduction_eligible_person: true - id_retirement_benefits_deduction_relevant_income: 20_000 - id_retirement_benefits_deduction: 20_000 - id_military_retirement_deduction: 0 - -- name: 2025 combined military and public pension with age 66 - period: 2025 - input: - people: - person1: - is_tax_unit_head_or_spouse: true - military_retirement_pay: 25_000 - public_pension_income: 20_000 - social_security_retirement: 0 - age: 66 - is_disabled: false - tax_units: - tax_unit: - members: [person1] - filing_status: SINGLE - households: - household: - members: [person1] - state_code: ID - output: - id_retirement_benefits_deduction_eligible_person: true - # Only public pension in relevant income for 2025 - id_retirement_benefits_deduction_relevant_income: 20_000 - id_retirement_benefits_deduction: 20_000 - # Military retirement fully deductible separately - id_military_retirement_deduction: 25_000 diff --git a/policyengine_us/tests/policy/baseline/household/income/person/farm/farm_gross_income.yaml b/policyengine_us/tests/policy/baseline/household/income/person/farm/farm_gross_income.yaml new file mode 100644 index 00000000000..31b2b599aa6 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/household/income/person/farm/farm_gross_income.yaml @@ -0,0 +1,106 @@ +# Gross farm income: Schedule F line 9, before farm expenses. A supplied +# farm_gross_income_reported of zero or more is used as entered; a negative +# amount means not supplied. An entry applies only to the year entered. +# Without it, the person's net farm profit stands in, floored at zero. + +- name: Without an input, the net farm profit stands in. + period: 2025 + input: + farm_operations_income: 8_000 + output: + farm_gross_income: 8_000 + +- name: Without an input, a net farm loss counts as zero. + period: 2025 + input: + farm_operations_income: -8_000 + output: + farm_gross_income: 0 + +- name: A supplied amount gives Schedule F line 9 directly. + period: 2025 + input: + farm_operations_income: 2_000 + farm_gross_income_reported: 16_000 + output: + farm_gross_income: 16_000 + +- name: A supplied zero is used, not the net farm profit. + period: 2025 + input: + farm_operations_income: 8_000 + farm_gross_income_reported: 0 + output: + farm_gross_income: 0 + +- name: A supplied negative amount means not supplied, so the net farm profit stands in. + period: 2025 + input: + farm_operations_income: 8_000 + farm_gross_income_reported: -500 + output: + farm_gross_income: 8_000 + +- name: One person's supplied amount leaves another person's net farm profit in place. + period: 2025 + input: + people: + retiree: + age: 45 + farm_operations_income: 35_000 + spouse: + age: 43 + farm_operations_income: 5_000 + farm_gross_income_reported: 5_000 + tax_units: + tax_unit: + members: [retiree, spouse] + households: + household: + members: [retiree, spouse] + output: + farm_gross_income: [35_000, 5_000] + +- name: An amount supplied only for 2025 does not apply in 2026, so the net farm profit stands in. + period: 2026 + input: + farm_operations_income: 8_000 + farm_gross_income_reported: + 2025: 20_000 + output: + farm_gross_income_reported: -1 + farm_gross_income: 8_000 + +- name: A zero supplied for 2026 is used in 2026, not the 2025 amount or the net farm profit. + period: 2026 + input: + farm_operations_income: 8_000 + farm_gross_income_reported: + 2025: 20_000 + 2026: 0 + output: + farm_gross_income: 0 + +- name: One person's amount supplied only for 2025 does not apply in 2026 beside another person's 2026 amount. + period: 2026 + input: + people: + retiree: + age: 45 + farm_operations_income: 8_000 + farm_gross_income_reported: + 2025: 20_000 + spouse: + age: 43 + farm_operations_income: 1_000 + farm_gross_income_reported: + 2026: 3_000 + tax_units: + tax_unit: + members: [retiree, spouse] + households: + household: + members: [retiree, spouse] + output: + farm_gross_income_reported: [-1, 3_000] + farm_gross_income: [8_000, 3_000] diff --git a/policyengine_us/tests/policy/baseline/household/income/person/self_employment/business_gross_income.yaml b/policyengine_us/tests/policy/baseline/household/income/person/self_employment/business_gross_income.yaml new file mode 100644 index 00000000000..3e1c55275a8 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/household/income/person/self_employment/business_gross_income.yaml @@ -0,0 +1,109 @@ +# Gross income from businesses: Schedule C line 7, before business expenses. +# A supplied business_gross_income_reported of zero or more is used as +# entered; a negative amount means not supplied. An entry applies only to the +# year entered. Without it, the person's net profits stand in, each floored at +# zero. + +- name: Without an input, net self-employment profits stand in. + period: 2025 + input: + self_employment_income: 12_000 + sstb_self_employment_income: 3_000 + output: + business_gross_income: 15_000 + +- name: A net loss in one business does not reduce the other's income. + period: 2025 + input: + self_employment_income: -5_000 + sstb_self_employment_income: 3_000 + output: + business_gross_income: 3_000 + +- name: A supplied amount gives Schedule C line 7 directly. + period: 2025 + input: + self_employment_income: 5_000 + business_gross_income_reported: 20_000 + output: + business_gross_income: 20_000 + +- name: A supplied zero is used, not the net profit. + period: 2025 + input: + self_employment_income: 12_000 + business_gross_income_reported: 0 + output: + business_gross_income: 0 + +- name: A supplied negative amount means not supplied, so the net profit stands in. + period: 2025 + input: + self_employment_income: 12_000 + business_gross_income_reported: -500 + output: + business_gross_income: 12_000 + +- name: One person's supplied amount leaves another person's net profit in place. + period: 2025 + input: + people: + retiree: + age: 45 + self_employment_income: 35_000 + spouse: + age: 43 + self_employment_income: 5_000 + business_gross_income_reported: 5_000 + tax_units: + tax_unit: + members: [retiree, spouse] + households: + household: + members: [retiree, spouse] + output: + business_gross_income: [35_000, 5_000] + +- name: An amount supplied only for 2025 does not apply in 2026, so the net profit stands in. + period: 2026 + input: + self_employment_income: 12_000 + business_gross_income_reported: + 2025: 20_000 + output: + business_gross_income_reported: -1 + business_gross_income: 12_000 + +- name: A zero supplied for 2026 is used in 2026, not the 2025 amount or the net profit. + period: 2026 + input: + self_employment_income: 12_000 + business_gross_income_reported: + 2025: 20_000 + 2026: 0 + output: + business_gross_income: 0 + +- name: One person's amount supplied only for 2025 does not apply in 2026 beside another person's 2026 amount. + period: 2026 + input: + people: + retiree: + age: 45 + self_employment_income: 5_000 + business_gross_income_reported: + 2025: 40_000 + spouse: + age: 43 + self_employment_income: 1_000 + business_gross_income_reported: + 2026: 3_000 + tax_units: + tax_unit: + members: [retiree, spouse] + households: + household: + members: [retiree, spouse] + output: + business_gross_income_reported: [-1, 3_000] + business_gross_income: [5_000, 3_000] diff --git a/policyengine_us/tools/filing_requirement.py b/policyengine_us/tools/filing_requirement.py new file mode 100644 index 00000000000..bf3196ab179 --- /dev/null +++ b/policyengine_us/tools/filing_requirement.py @@ -0,0 +1,60 @@ +"""Gross income thresholds of the federal filing requirement, 26 U.S.C. 6012.""" + +import numpy as np + + +def section_6012_gross_income_thresholds(tax_unit, period, parameters): + """The two gross income thresholds of section 6012, for each return. + + `tax_unit` takes a TaxUnit population, or a person's `tax_unit` + projector, which returns each value for the person's tax unit. + tax_unit_is_required_to_file adds the tests for a filer someone can claim + as a dependent and for a spouse who loses the joint-return exception. + + Returns `(standard_deduction_threshold, basic_threshold)`: + + - Section 6012(f), for 2018 to 2025: gross income over the standard + deduction, which includes the additional standard deduction for age + and for blindness, requires a return. A married individual filing + separately must file with any gross income, so that return's threshold + equals the exemption amount. Compare with `>`. + - Section 6012(a)(1)(A) and (B), from 2026 (and before 2018): gross + income of at least the exemption amount for each spouse plus the basic + standard deduction, raised by one additional standard deduction for + each spouse aged 65 or older (section 63(f)(1)), requires a return. + Blindness doesn't raise it. The WFTCA contributed reform's bonus + guaranteed deduction increases the basic standard deduction (zero + unless that reform applies). For a filer someone can claim as a + dependent, basic_standard_deduction already gives the section 63(c)(5) + limited amount. A married individual filing separately has no + exception, and with an exemption amount of zero, (A) reaches even an + individual with no gross income, since no gross income falls "less + than" zero. Section 6012(a)(1)(C)(ii) withholds the (A) exception from + "any individual ... for whom the standard deduction is zero under + section 63(c)(6)". separate_filer_itemizes gives PE-US's only 63(c)(6) + path, so that threshold falls to the exemption amount, without the age + addition, whatever the filing status. Compare with `>=`. + """ + p = parameters(period).gov.irs + exemption_amount = 0 if p.income.exemption.suspended else p.income.exemption.amount + filing_status = tax_unit("filing_status", period) + separate = filing_status == filing_status.possible_values.SEPARATE + + standard_deduction_threshold = np.where( + separate, + exemption_amount, + tax_unit("standard_deduction", period) + exemption_amount, + ) + + aged_count = tax_unit("aged_head", period).astype(int) + tax_unit( + "aged_spouse", period + ).astype(int) + exceptions_threshold = ( + exemption_amount * tax_unit("head_spouse_count", period) + + tax_unit("basic_standard_deduction", period) + + tax_unit("bonus_guaranteed_deduction", period) + + aged_count * p.deductions.standard.aged_or_blind.amount[filing_status] + ) + no_exception = separate | tax_unit("separate_filer_itemizes", period) + basic_threshold = np.where(no_exception, exemption_amount, exceptions_threshold) + return standard_deduction_threshold, basic_threshold diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person.py new file mode 100644 index 00000000000..2aadbda0e14 --- /dev/null +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person.py @@ -0,0 +1,69 @@ +from policyengine_us.model_api import * + + +class foreign_earned_income_exclusion_gross_person(Variable): + value_type = float + entity = Person + label = "Own gross foreign earned income and housing exclusions" + unit = USD + documentation = ( + "The person's own exclusions under 26 U.S.C. 911(a): line 43 of the " + "Form 2555 the person files (the line 36 housing exclusion plus the " + "line 42 foreign earned income exclusion), before line 44 allocable " + "deductions and without the line 50 housing deduction, which section " + "911(c)(4) treats as a deduction, not an exclusion. It is " + "foreign_earned_income_exclusion_gross_person_reported when that is " + "zero or more. When it is negative (its default is -1), the head " + "of a return with one head or spouse gets the return's line 43, " + "foreign_earned_income_exclusion_gross (as entered, or lines 36 and 42 " + "from the Form 2555 leaves). On a joint return the model can't tell " + "which spouse earned the excluded income, so each spouse gets zero. " + "The legacy foreign_earned_income_exclusion (worksheet line 2c: line " + "43 less line 44, plus line 50, less line 2b) never stands in for " + "line 43: no inputs can show that it equals line 43. Without Form " + "2555 leaves nothing shows that lines 44 and 50 and worksheet line 2b " + "are zero, and once any leaf is entered, even a zero, the leaves give " + "line 43 as lines 36 and 42. A filer who knows line 43 enters it as " + "foreign_earned_income_exclusion_gross_person_reported, which applies " + "only to the year entered. Each person's value depends only on their " + "own inputs and their own return's, apart from a batch that mixes an " + "entered foreign_earned_income_exclusion_gross in one return with " + "Form 2555 leaves in another, or enters a Form 2555 leaf for " + "different years in different returns, where one return's entry for " + "a later year stops another's earlier entry carrying into it; " + "policyengine_us.Simulation rejects both. Supply " + "foreign_earned_income_exclusion_gross_person_reported rather than " + "setting this variable: an input here applies to every person in the " + "simulation, and people without a value get zero. The tax unit " + "amounts still drive federal tax." + ) + definition_period = YEAR + reference = ( + "https://www.law.cornell.edu/uscode/text/26/911#a", + # Section 911(c)(4)(A): a housing cost amount not attributable to + # employer provided amounts is a deduction (Form 2555 line 50). + "https://www.law.cornell.edu/uscode/text/26/911#c_4", + # Section 6012(c): gross income for the filing requirement is + # computed without regard to the section 911 exclusion. + "https://www.law.cornell.edu/uscode/text/26/6012#c", + "https://www.irs.gov/pub/irs-prior/f2555--2025.pdf#page=3", + # Married couples: each spouse figures the exclusion on a separate + # Form 2555, and the joint return excludes the sum. + "https://www.irs.gov/pub/irs-prior/i2555--2025.pdf#page=6", + ) + + def formula(person, period, parameters): + reported = person( + "foreign_earned_income_exclusion_gross_person_reported", period + ) + # The return's Form 2555 line 43: foreign_earned_income_exclusion_gross + # as entered, or the line 36 and line 42 leaves it adds. + return_exclusion = max_( + person.tax_unit("foreign_earned_income_exclusion_gross", period), 0 + ) + head = person("is_tax_unit_head", period) + one_filer = person.tax_unit("head_spouse_count", period) == 1 + fallback = where(head & one_filer, return_exclusion, 0) + # Any negative amount, such as the default -1, means not supplied: + # line 43 adds two exclusions and can't be negative. + return where(reported >= 0, reported, fallback) diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person_reported.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person_reported.py new file mode 100644 index 00000000000..6348d73f7a0 --- /dev/null +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/foreign_earned_income_exclusion_gross_person_reported.py @@ -0,0 +1,39 @@ +from policyengine_us.model_api import * + + +class foreign_earned_income_exclusion_gross_person_reported(Variable): + value_type = float + entity = Person + label = "Reported own gross foreign earned income and housing exclusions" + unit = USD + definition_period = YEAR + default_value = -1 + documentation = ( + "Line 43 of the Form 2555 the person files, the line 36 housing " + "exclusion plus the line 42 foreign earned income exclusion, as " + "supplied. Each spouse who claims the exclusion files a separate Form " + "2555, so on a joint return enter each spouse's own line 43. An " + "amount of zero or more is used as entered. A negative amount, such as " + "the default -1, means not supplied: " + "foreign_earned_income_exclusion_gross_person then uses the " + "return's line 43 for the head of a return with one head or spouse, " + "and zero otherwise, whatever other people report. An entry for a " + "calendar year applies only to that year, and one keyed by a period " + "of several years or by a year that starts after January, such as " + "year:2024:3 or year:2025-07, applies to no year. Because of its " + "formula, Core does not count this as an input variable, so " + "Simulation.to_input_dict() and to_input_dataframe() leave a supplied " + "amount out unless include_computed_variables=True; supply it in the " + "situation or with set_input." + ) + reference = ( + "https://www.law.cornell.edu/uscode/text/26/911#a", + "https://www.irs.gov/pub/irs-prior/f2555--2025.pdf#page=3", + # Married couples: each spouse figures the exclusion on a separate + # Form 2555, and the joint return excludes the sum. + "https://www.irs.gov/pub/irs-prior/i2555--2025.pdf#page=6", + ) + + def formula(person, period, parameters): + # The formula stops Core carrying and uprating an entry into later years. + return person.filled_array(-1) diff --git a/policyengine_us/variables/gov/irs/tax_unit_is_required_to_file.py b/policyengine_us/variables/gov/irs/tax_unit_is_required_to_file.py index 18c25df18a4..f655864c127 100644 --- a/policyengine_us/variables/gov/irs/tax_unit_is_required_to_file.py +++ b/policyengine_us/variables/gov/irs/tax_unit_is_required_to_file.py @@ -1,4 +1,7 @@ from policyengine_us.model_api import * +from policyengine_us.tools.filing_requirement import ( + section_6012_gross_income_thresholds, +) from policyengine_us.tools.section_911 import section_911_gross_exclusion @@ -69,53 +72,22 @@ def formula(tax_unit, period, parameters): 0 if p.income.exemption.suspended else p.income.exemption.amount ) filing_status = tax_unit("filing_status", period) - separate = filing_status == filing_status.possible_values.SEPARATE head_can_be_claimed = tax_unit("head_is_dependent_elsewhere", period) spouse_can_be_claimed = tax_unit("spouse_is_dependent_elsewhere", period) - # Section 6012(f), for 2018 to 2025: no return is required when gross - # income does not exceed the standard deduction, which includes the - # additional standard deduction for age and for blindness. A married - # individual filing separately must file with any gross income. - threshold = where( - separate, - exemption_amount, - tax_unit("standard_deduction", period) + exemption_amount, - ) - income_over_standard_deduction = gross_income > threshold - - # Section 6012(a)(1)(A) and (B), from 2026 (and before 2018): no return - # is required when gross income is less than the exemption amount for - # each spouse plus the basic standard deduction, raised by one - # additional standard deduction for each spouse aged 65 or older - # (section 63(f)(1)). Blindness does not raise it, and gross income - # equal to it requires a return. The WFTCA contributed reform's bonus - # guaranteed deduction is an increase to the basic standard deduction - # (zero unless that reform is on). - # - # A married individual filing separately has no exception. With an - # exemption amount of zero, (A) reaches even an individual with no - # gross income, since no gross income is "less than" zero. - # For a filer who can be claimed as a dependent, basic_standard_deduction - # is already the section 63(c)(5) limited amount. - aged_count = tax_unit("aged_head", period).astype(int) + tax_unit( - "aged_spouse", period - ).astype(int) - basic_threshold = ( - exemption_amount * tax_unit("head_spouse_count", period) - + tax_unit("basic_standard_deduction", period) - + tax_unit("bonus_guaranteed_deduction", period) - + aged_count * p.deductions.standard.aged_or_blind.amount[filing_status] - ) - # Section 6012(a)(1)(C)(ii): the (A) exception does not apply "to any - # individual ... for whom the standard deduction is zero under section - # 63(c)(6)". separate_filer_itemizes is PE-US's only 63(c)(6) path, so - # the threshold falls to the exemption amount, without the age - # addition, whatever the filing status. - no_exception = separate | tax_unit("separate_filer_itemizes", period) - income_at_least_basic_threshold = gross_income >= where( - no_exception, exemption_amount, basic_threshold + # Section 6012(f), for 2018 to 2025: gross income over the standard + # deduction requires a return, and any gross income does on a + # separate return. Section 6012(a)(1)(A) and (B), from 2026 (and + # before 2018): gross income of at least the exemption amount for + # each spouse plus the basic standard deduction and the additions for + # age requires one. section_6012_gross_income_thresholds sets out + # both thresholds; the Idaho military retirement employment test + # applies the same ones. + standard_deduction_threshold, basic_threshold = ( + section_6012_gross_income_thresholds(tax_unit, period, parameters) ) + income_over_standard_deduction = gross_income > standard_deduction_threshold + income_at_least_basic_threshold = gross_income >= basic_threshold # Section 6012(a)(1)(A)(iv), the joint-return exception, "shall not # apply if for the taxable year ... any other taxpayer is entitled to diff --git a/policyengine_us/variables/gov/states/id/tax/income/subtractions/military_retirement/id_eligible_military_retirement_income.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_eligible_military_retirement_income.py similarity index 100% rename from policyengine_us/variables/gov/states/id/tax/income/subtractions/military_retirement/id_eligible_military_retirement_income.py rename to policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_eligible_military_retirement_income.py diff --git a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.py new file mode 100644 index 00000000000..60f65861ede --- /dev/null +++ b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.py @@ -0,0 +1,87 @@ +from policyengine_us.model_api import * + + +class id_retirement_benefits_deduction_disabled(Variable): + value_type = bool + entity = Person + label = "Classified as disabled for the Idaho retirement benefits deduction" + documentation = """ + Idaho Code 63-3022A(4): "As used in this section, the word "disabled" + shall mean an individual who is a disabled person described in section + 63-701, Idaho Code, or an individual who qualifies as a person with a + "permanent disability" under section 49-117(7)(b)(iv), Idaho Code." The + definition applies to the whole section, so it governs both the test of + 63-3022A(1)(a) (age 62 and classified as disabled) and, from 2025, the + disability test for military retirement benefits in (1)(b)(i). Before + 2025 the same definition was 63-3022A(d). + + Section 63-701(1)(d) describes "A disabled person who is recognized as + disabled by the social security administration pursuant to title 42 of + the United States Code", by the Railroad Retirement Board, or by "the + office of management and budget pursuant to title 5", or, "if a person is + not within the purview of, and is therefore not recognized as disabled + by, any other entity listed in this paragraph", by the public employee + retirement system or disability plan in which the person participates; + 63-701(1)(e), "A disabled veteran of any war engaged in by the United + States" whose disability the Department of Veterans Affairs recognizes + as service-connected to a degree of 10% or more, or who has a VA pension + for nonservice-connected disabilities. Section 49-117(7)(b)(iv) + describes a person whose physician certifies a mobility disability with + "no expectation for a fundamental or marked change". The Form 39R + instructions for 2024 and 2025 list the same groups, without the public + employee plan. + + A supplied id_retirement_benefits_disability_classification (DISABLED or + NOT_DISABLED) decides. When it is UNSPECIFIED, the person is classified + as disabled if they receive Social Security disability insurance + benefits (an award is the Social Security Administration's finding of + disability under title 42) or if is_disabled is true. is_disabled stands + in for the groups PolicyEngine has no input for, as it did for this + deduction before this variable existed; it can also admit a disability + that no listed group covers. The model doesn't infer the classification + from the SSI disability test or from permanent and total disability + under 26 U.S.C. 22(e)(3); neither is a recognition the statute lists. + Nor does it infer it from is_fully_disabled_service_connected_veteran: + a VA service-connected rating of 10% or more is the recognition + 63-701(1)(e) lists, but only for "A disabled veteran of any war engaged + in by the United States", and the model doesn't record wartime service. + Blindness alone doesn't count: 63-701(1)(g) lists it as a separate + group, not as a disabled person. + + A supplied id_retirement_benefits_disability_classification applies only + to the year supplied. Each person's value depends only on their own + inputs, apart from the carry-over of is_disabled and + social_security_disability: an entry of either carries into a later + year only when no one has an entry of it for that year, so once anyone + enters one for a year, a person whose value was entered only for an + earlier year has false or zero in that year. Enter them for every year + calculated. Supply + id_retirement_benefits_disability_classification rather than setting + this variable: an input here applies to every person in the simulation, + and people without a value get false. + """ + definition_period = YEAR + defined_for = StateCode.ID + reference = ( + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/", + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch7/sect63-701/", + "https://legislature.idaho.gov/statutesrules/idstat/title49/t49ch1/sect49-117/", + "https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45", + ) + + def formula(person, period, parameters): + classification = person( + "id_retirement_benefits_disability_classification", period + ) + values = classification.possible_values + # 63-701(1)(d): recognized as disabled by the Social Security + # Administration under title 42, which the person's own disability + # insurance award shows. + receives_ssdi = person("social_security_disability", period) > 0 + # The groups PolicyEngine has no input for. + legacy = person("is_disabled", period) + return where( + classification == values.UNSPECIFIED, + receives_ssdi | legacy, + classification == values.DISABLED, + ) diff --git a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.py new file mode 100644 index 00000000000..22f3f576618 --- /dev/null +++ b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.py @@ -0,0 +1,43 @@ +from policyengine_us.model_api import * + + +class id_retirement_benefits_deduction_military_eligible_person(Variable): + value_type = bool + entity = Person + label = "Eligible person for the Idaho retirement benefits deduction on military retirement benefits" + documentation = """ + Idaho Code 63-3022A(1)(b) lets a retired member of the military, or the + member's unremarried widow or widower, count military retirement benefits + toward the retirement benefits deduction if the recipient is classified + as disabled (63-3022A(4), id_retirement_benefits_deduction_disabled), has + reached age 62 by the end of the tax year, or was employed during the tax + year with enough income from that employment to have to file a federal + return. The three tests apply to a widow or widower who receives the + benefits as they do to the member. Before 2025 these benefits had the age + test of the other retirement benefits in 63-3022A(1): age 65, or age 62 + and classified as disabled. The age parameters carry both rules. + """ + definition_period = YEAR + defined_for = StateCode.ID + reference = ( + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/", + "https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0040.pdf#page=5", + "https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0479.pdf#page=2", + "https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45", + ) + + def formula(person, period, parameters): + p = parameters( + period + ).gov.states.id.tax.income.deductions.retirement_benefits.military + age_threshold = where( + person("id_retirement_benefits_deduction_disabled", period), + p.age_eligibility.disabled, + p.age_eligibility.main, + ) + age_eligible = person("age", period) >= age_threshold + employment_eligible = person( + "id_retirement_benefits_deduction_military_employment_eligible", period + ) + head_or_spouse = person("is_tax_unit_head_or_spouse", period) + return head_or_spouse & (age_eligible | employment_eligible) diff --git a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py new file mode 100644 index 00000000000..507328eb7c5 --- /dev/null +++ b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py @@ -0,0 +1,96 @@ +from policyengine_us.model_api import * +from policyengine_us.tools.filing_requirement import ( + section_6012_gross_income_thresholds, +) + + +class id_retirement_benefits_deduction_military_employment_eligible(Variable): + value_type = bool + entity = Person + label = "Employment income requires a federal return, for the Idaho military retirement benefits deduction" + documentation = """ + Idaho Code 63-3022A(1)(b)(iii) admits the military retirement benefits of + a recipient who "Was employed during the tax year and received sufficient + income from such employment to be required to file a federal return under + section 6012(a)(1) of the Internal Revenue Code". This is true when the + person's income from employment, by itself, meets the gross income test + of the federal filing requirement for the person's return: the gross + income thresholds of tax_unit_is_required_to_file, without its tests + for a filer someone can claim as a dependent and for a spouse who loses + the joint-return exception. Income from employment is gross income as + section 6012 measures it: wages (Form 1040 line 1a), taxable employer + dependent care benefits (Form 2441 line 26 and Form 1040 line 1e: the + benefits section 129(a) and (b) don't exclude, with the exclusion + limited by the line 16 qualified expenses), gross income from a + business or farm (Schedule C line 7 and Schedule F line 9, which Chart + A of the Form 1040 instructions names), and foreign earned income and + housing amounts the + person excludes under section 911 (Form 2555 line 43, not the line 50 + housing deduction), which section 6012(c) adds back. As in the federal + gross income, a loss from one source doesn't reduce income from another. + + The statute and the Form 39R line 8e instructions, which repeat its words + without the section number, leave four points open. PolicyEngine takes + these readings: + + 1. The test for 2025. For 2018 to 2025, section 6012(f) says "subsection + (a)(1) shall not apply" and requires a return when gross income + exceeds the standard deduction, which includes the additions for age + and blindness. The model applies section 6012(f) for 2025, the federal + requirement in force that year, and section 6012(a)(1)(A) and (B) from + 2026: at least the basic standard deduction plus the additions for + age. Applying the (a)(1) thresholds to 2025 would also admit income + equal to the threshold and leave out blindness, as Chart A of the 2025 + Form 1040 instructions and Publication 501 do: both require a return + at gross income of "at least" an amount that rises for age alone. The + model follows section 6012(f), the statute, as + tax_unit_is_required_to_file does. A literal reading would admit + nobody for 2025, when (a)(1) requires no return. + 2. Self-employment. Gross income from a business or farm counts as + income from employment, as wages do. + 3. Joint returns. The person's own income from employment is compared + with the joint return's threshold, whatever the spouse earns. Section + 6012 itself combines the spouses' gross income. + 4. Self-employment tax returns. Section 6017 requires a return from an + individual with $400 of net earnings from self-employment. The statute + names section 6012(a)(1), so that requirement doesn't count here: + gross income from a business must meet the section 6012 threshold. + """ + definition_period = YEAR + defined_for = StateCode.ID + reference = ( + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/", + "https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45", + "https://www.law.cornell.edu/uscode/text/26/6012", + # Chart A: gross income from a business is Schedule C line 7 or + # Schedule F line 9. + "https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9", + ) + + def formula(person, period, parameters): + p = parameters( + period + ).gov.states.id.tax.income.deductions.retirement_benefits.military.employment + employment_income = 0 + for source in p.income_sources: + employment_income = employment_income + max_( + 0, add(person, period, [source]) + ) + employed = employment_income > 0 + + # Federal gross income thresholds for the person's tax unit. + standard_deduction_threshold, basic_threshold = ( + section_6012_gross_income_thresholds(person.tax_unit, period, parameters) + ) + p_irs = parameters(period).gov.irs + if p_irs.income.filing_requirement.standard_deduction_rule.applies: + # Section 6012(f): gross income over the standard deduction, and + # any gross income on a separate return. + requires_return = employment_income > standard_deduction_threshold + else: + # Section 6012(a)(1)(A) and (B): gross income of at least the + # basic standard deduction plus the additions for age. A separate + # return, or one whose standard deduction is zero under section + # 63(c)(6), has no exception. + requires_return = employment_income >= basic_threshold + return p.in_effect & employed & requires_return diff --git a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.py index 6ddfb492735..0b4e802b046 100644 --- a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.py +++ b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_relevant_income.py @@ -5,9 +5,31 @@ class id_retirement_benefits_deduction_relevant_income(Variable): value_type = float entity = Person label = "Idaho retirement benefits deduction income sources" + documentation = """ + The person's retirement benefits that count toward the Idaho retirement + benefits deduction (Form 39R line 8e): the benefits in Idaho Code + 63-3022A(1)(a) if the person meets that paragraph's age test, and + military retirement benefits if the person meets the test of + 63-3022A(1)(b). + """ unit = USD - reference = "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/" + reference = ( + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/", + "https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45", + ) definition_period = YEAR - defined_for = "id_retirement_benefits_deduction_eligible_person" + defined_for = StateCode.ID - adds = "gov.states.id.tax.income.deductions.retirement_benefits.income_sources" + def formula(person, period, parameters): + p = parameters(period).gov.states.id.tax.income.deductions.retirement_benefits + general_benefits = add(person, period, p.income_sources) + general_eligible = person( + "id_retirement_benefits_deduction_eligible_person", period + ) + military_benefits = person("id_eligible_military_retirement_income", period) + military_eligible = person( + "id_retirement_benefits_deduction_military_eligible_person", period + ) + return ( + general_benefits * general_eligible + military_benefits * military_eligible + ) diff --git a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_disability_classification.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_disability_classification.py new file mode 100644 index 00000000000..d5eb421d036 --- /dev/null +++ b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_disability_classification.py @@ -0,0 +1,54 @@ +from policyengine_us.model_api import * + + +class IDRetirementBenefitsDisabilityClassification(Enum): + UNSPECIFIED = "Unspecified" + DISABLED = "Classified as disabled" + NOT_DISABLED = "Not classified as disabled" + + +class id_retirement_benefits_disability_classification(Variable): + value_type = Enum + possible_values = IDRetirementBenefitsDisabilityClassification + default_value = IDRetirementBenefitsDisabilityClassification.UNSPECIFIED + entity = Person + definition_period = YEAR + label = "Idaho disability classification for the retirement benefits deduction, as supplied" + documentation = """ + Whether the person is classified as disabled under Idaho Code + 63-3022A(4), as supplied for this person. DISABLED: a person recognized + as disabled by the Social Security Administration under title 42 (for + example, a disability insurance or SSI disability award), by the Railroad + Retirement Board or by the office of management and budget under title 5, + or, if none of those has purview over the person, by the public employee + retirement system or disability plan the person participates in + (63-701(1)(d)); a veteran of a war engaged in by the United States whose + disability the Department of Veterans Affairs recognizes as + service-connected to a degree of 10% or more, or who has a VA pension for + nonservice-connected disabilities (63-701(1)(e)); or a person whose + physician certifies a permanent disability under 49-117(7)(b)(iv). + NOT_DISABLED: anyone else, including a person whose only disability + finding comes from outside those groups. UNSPECIFIED, the default, means + not supplied: id_retirement_benefits_deduction_disabled then uses this + person's own Social Security disability insurance benefits and + is_disabled, whatever other people's classifications are. A + classification supplied for a calendar year applies only to that year, + and one keyed by a period of several years or by a year that starts + after January, such as year:2024:3 or year:2025-07, applies to no year. + Because of its formula, Core does not count this as an input variable, + so Simulation.to_input_dict() and to_input_dataframe() leave a supplied + classification out unless include_computed_variables=True; supply it in + the situation or with set_input. + """ + reference = ( + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/", + "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch7/sect63-701/", + "https://legislature.idaho.gov/statutesrules/idstat/title49/t49ch1/sect49-117/", + "https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45", + ) + + def formula(person, period, parameters): + # The formula stops Core carrying a classification into later years. + return person.filled_array( + IDRetirementBenefitsDisabilityClassification.UNSPECIFIED + ) diff --git a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.py b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.py index 152bd15f367..225c7de2110 100644 --- a/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.py +++ b/policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_eligible_person.py @@ -5,6 +5,11 @@ class id_retirement_benefits_deduction_eligible_person(Variable): value_type = bool entity = Person label = "Eligible person for the Idaho retirement benefits deduction" + documentation = """ + Idaho Code 63-3022A(1)(a): a head or spouse who has attained age 65, or + age 62 and is classified as disabled under 63-3022A(4) + (id_retirement_benefits_deduction_disabled). + """ reference = "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/" definition_period = YEAR defined_for = StateCode.ID @@ -13,7 +18,7 @@ def formula(person, period, parameters): p = parameters(period).gov.states.id.tax.income.deductions.retirement_benefits age_threshold = where( - person("is_disabled", period), + person("id_retirement_benefits_deduction_disabled", period), p.age_eligibility.disabled, p.age_eligibility.main, ) diff --git a/policyengine_us/variables/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_deduction.py b/policyengine_us/variables/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_deduction.py deleted file mode 100644 index 1551022b6f8..00000000000 --- a/policyengine_us/variables/gov/states/id/tax/income/subtractions/military_retirement/id_military_retirement_deduction.py +++ /dev/null @@ -1,27 +0,0 @@ -from policyengine_us.model_api import * - - -class id_military_retirement_deduction(Variable): - value_type = float - entity = TaxUnit - label = "Idaho military retirement deduction" - unit = USD - reference = ( - "https://legislature.idaho.gov/sessioninfo/2025/legislation/H0040/", - "https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/", - ) - definition_period = YEAR - defined_for = StateCode.ID - - def formula(tax_unit, period, parameters): - p = parameters(period).gov.states.id.tax.income.subtractions.military_retirement - person = tax_unit.members - head_or_spouse = person("is_tax_unit_head_or_spouse", period) - military_retirement_income = person( - "id_eligible_military_retirement_income", period - ) - eligible_military_pay = military_retirement_income * head_or_spouse - - # Multiply by applies parameter (False when military retirement - # is already handled in general retirement benefits deduction) - return tax_unit.sum(eligible_military_pay) * p.applies diff --git a/policyengine_us/variables/household/income/person/farm/farm_gross_income.py b/policyengine_us/variables/household/income/person/farm/farm_gross_income.py new file mode 100644 index 00000000000..9531db0cfea --- /dev/null +++ b/policyengine_us/variables/household/income/person/farm/farm_gross_income.py @@ -0,0 +1,43 @@ +from policyengine_us.model_api import * + + +class farm_gross_income(Variable): + value_type = float + entity = Person + label = "Gross farm income" + unit = USD + documentation = ( + "Gross income from the person's farming before farm expenses: " + "Schedule F line 9, which Chart A of the Form 1040 instructions uses " + "as gross income from farming for the filing requirement. It is " + "farm_gross_income_reported when that is zero or more. When it is " + "negative (its default is -1), farm_operations_income floored at " + "zero stands in, which equals gross income only for a farm with no " + "expenses. An entry of farm_gross_income_reported applies only to " + "the year entered. Each person's value depends only on their own " + "inputs, apart from the carry-over of farm_operations_income: an " + "entry carries into a later year only when no one has an entry for " + "that year, so once anyone enters one for a year, a person whose " + "amount was entered only for an earlier year has zero in that year. " + "Enter it for every year calculated. " + "Supply farm_gross_income_reported rather than setting this variable: " + "an input here applies to every person in the simulation, and people " + "without a value get zero." + ) + definition_period = YEAR + reference = ( + # Section 61(a)(2): gross income derived from business. + "https://www.law.cornell.edu/uscode/text/26/61#a_2", + # Chart A: "Gross income from a business means, for example, the + # amount on Schedule C, line 7, or Schedule F, line 9." + "https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9", + "https://www.irs.gov/pub/irs-prior/f1040sf--2025.pdf#page=1", + ) + + def formula(person, period, parameters): + reported = person("farm_gross_income_reported", period) + net = max_(person("farm_operations_income", period), 0) + # Any negative amount, such as the default -1, means not supplied: + # Schedule F line 9, with a negative line counted as zero, can't be + # negative. + return where(reported >= 0, reported, net) diff --git a/policyengine_us/variables/household/income/person/farm/farm_gross_income_reported.py b/policyengine_us/variables/household/income/person/farm/farm_gross_income_reported.py new file mode 100644 index 00000000000..bea8866e856 --- /dev/null +++ b/policyengine_us/variables/household/income/person/farm/farm_gross_income_reported.py @@ -0,0 +1,37 @@ +from policyengine_us.model_api import * + + +class farm_gross_income_reported(Variable): + value_type = float + entity = Person + label = "Reported gross farm income" + unit = USD + definition_period = YEAR + default_value = -1 + documentation = ( + "The person's gross income from farming before farm expenses, as " + "supplied: the total of line 9 of each Schedule F, with a negative " + "line 9 counted as zero. As with the other income inputs, leave out " + "income excluded under section 911, which is entered separately as " + "Form 2555 amounts. An amount of zero or more is used as entered. A " + "negative amount, such as the default -1, means not supplied: " + "farm_gross_income then uses this " + "person's farm_operations_income, whatever other people report. An " + "entry for a calendar year applies only to that year, and one keyed " + "by a period of several years or by a year that starts after January, " + "such as year:2024:3 or year:2025-07, applies to no year. Because of " + "its formula, Core does not count this as an input variable, so " + "Simulation.to_input_dict() and to_input_dataframe() leave a supplied " + "amount out unless include_computed_variables=True; supply it in the " + "situation or with set_input." + ) + reference = ( + # Chart A: "Gross income from a business means, for example, the + # amount on Schedule C, line 7, or Schedule F, line 9." + "https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9", + "https://www.irs.gov/pub/irs-prior/f1040sf--2025.pdf#page=1", + ) + + def formula(person, period, parameters): + # The formula stops Core carrying and uprating an entry into later years. + return person.filled_array(-1) diff --git a/policyengine_us/variables/household/income/person/self_employment/business_gross_income.py b/policyengine_us/variables/household/income/person/self_employment/business_gross_income.py new file mode 100644 index 00000000000..12fc5f1b952 --- /dev/null +++ b/policyengine_us/variables/household/income/person/self_employment/business_gross_income.py @@ -0,0 +1,46 @@ +from policyengine_us.model_api import * + + +class business_gross_income(Variable): + value_type = float + entity = Person + label = "Gross income from businesses" + unit = USD + documentation = ( + "Gross income from the person's businesses before business expenses: " + "Schedule C line 7, which Chart A of the Form 1040 instructions uses " + "as gross income from a business for the filing requirement. It is " + "business_gross_income_reported when that is zero or more. When it " + "is negative (its default is -1), the net amounts stand in: " + "self_employment_income plus sstb_self_employment_income, each " + "floored at zero, which equal gross income only for a business with " + "no expenses. An entry of business_gross_income_reported applies " + "only to the year entered. Each person's value depends only on their " + "own inputs, apart from the carry-over of the net amounts: an entry " + "of one carries into a later year only when no one has an entry of it " + "for that year, so once anyone enters one for a year, a person whose " + "amount was entered only for an earlier year has zero in that year. " + "Enter the net amounts for every year calculated. " + "Supply business_gross_income_reported rather than setting this " + "variable: an input here applies to every person in the simulation, " + "and people without a value get zero." + ) + definition_period = YEAR + reference = ( + # Section 61(a)(2): gross income derived from business. + "https://www.law.cornell.edu/uscode/text/26/61#a_2", + # Chart A: "Gross income from a business means, for example, the + # amount on Schedule C, line 7, or Schedule F, line 9." + "https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9", + "https://www.irs.gov/pub/irs-prior/f1040sc--2025.pdf#page=1", + ) + + def formula(person, period, parameters): + reported = person("business_gross_income_reported", period) + regular = person("self_employment_income", period) + sstb = person("sstb_self_employment_income", period) + net = max_(regular, 0) + max_(sstb, 0) + # Any negative amount, such as the default -1, means not supplied: + # Schedule C line 7, with a negative line counted as zero, can't be + # negative. + return where(reported >= 0, reported, net) diff --git a/policyengine_us/variables/household/income/person/self_employment/business_gross_income_reported.py b/policyengine_us/variables/household/income/person/self_employment/business_gross_income_reported.py new file mode 100644 index 00000000000..bdb25fcdc7b --- /dev/null +++ b/policyengine_us/variables/household/income/person/self_employment/business_gross_income_reported.py @@ -0,0 +1,39 @@ +from policyengine_us.model_api import * + + +class business_gross_income_reported(Variable): + value_type = float + entity = Person + label = "Reported gross income from businesses" + unit = USD + definition_period = YEAR + default_value = -1 + documentation = ( + "The person's gross income from businesses before business expenses, " + "as supplied: the total of line 7 of each Schedule C, gross receipts " + "less returns and cost of goods sold plus other business income, " + "with a negative line 7 counted as zero. As with the other income " + "inputs, leave out income excluded under section 911, which is " + "entered separately as Form 2555 amounts. An amount of zero or more " + "is used as entered. A negative amount, such as the default -1, means " + "not supplied: " + "business_gross_income then uses this person's net profits, whatever " + "other people report. An entry for a calendar year applies only to " + "that year, and one keyed by a period of several years or by a year " + "that starts after January, such as year:2024:3 or year:2025-07, " + "applies to no year. " + "Because of its formula, Core does not count this as an input " + "variable, so Simulation.to_input_dict() and to_input_dataframe() " + "leave a supplied amount out unless include_computed_variables=True; " + "supply it in the situation or with set_input." + ) + reference = ( + # Chart A: "Gross income from a business means, for example, the + # amount on Schedule C, line 7, or Schedule F, line 9." + "https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9", + "https://www.irs.gov/pub/irs-prior/f1040sc--2025.pdf#page=1", + ) + + def formula(person, period, parameters): + # The formula stops Core carrying and uprating an entry into later years. + return person.filled_array(-1) diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 6e4b6b8b3f8..5a6079eaceb 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -4556,6 +4556,251 @@ candidates: the same checklist. The ruling covers VA benefits, general assistance, minors'' earnings and id_aabd; Part B netting under plan 1.9 and miscellaneous_income, pfml_benefits, life_insurance_benefits, gi_cash_assistance and capital_gains, which stay uncounted, are unchanged and outside it.' +- id: us-id:military-retirement-employment-2025-filing-test + program: income-tax + years: + from: 2025 + to: 2025 + type: tax + question: Idaho Code 63-3022A(1)(b)(iii) requires income from employment sufficient "to be required to file a + federal return under section 6012(a)(1) of the Internal Revenue Code". For taxable years 2018 to 2025, 26 U.S.C. + 6012(f) provides that "subsection (a)(1) shall not apply" and sets its own test. Which test decides a 2025 return? + sources: + - kind: statute + citation: Idaho Code 63-3022A(1)(b)(iii) + url: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - kind: statute + citation: 26 U.S.C. 6012(f) + url: https://www.law.cornell.edu/uscode/text/26/6012#f + - kind: statute + citation: 26 U.S.C. 6012(a)(1)(A) and (B) + url: https://www.law.cornell.edu/uscode/text/26/6012#a_1 + - kind: instructions + citation: 2025 Form 39R instructions, line 8e, PDF page 45 + url: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 + - kind: instructions + citation: 2025 Form 1040 instructions, Chart A, PDF page 9 + url: https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=9 + - kind: guidance + citation: IRS Publication 501 (2025), Table 1 and Filing Requirements for Most Taxpayers, PDF pages 2-3 + url: https://www.irs.gov/pub/irs-prior/p501--2025.pdf#page=2 + readings: + statute: Section 6012(f), the federal requirement in force for 2025. The income must exceed the standard deduction, + which includes the additions for age and blindness. Idaho Code 63-3004 defines the Internal Revenue Code as that + code "as amended and in effect" on a set date, and the code so adopted replaces the (a)(1) test with (f) for 2025. + other: Apply the thresholds of section 6012(a)(1)(A) and (B) to 2025 as though (f) didn't displace them, so income of + at least the basic standard deduction plus the additions for age, without blindness, qualifies. Or read "(a)(1)" + literally, so that nobody qualifies under (iii) for 2025, a year for which (a)(1) requires no return. The Form + 39R instructions drop the section number and say "required to file a federal return". The IRS's 2025 Chart A and + Publication 501 Table 1 give the (a)(1) thresholds for 2025, a return at gross income of "at least" an amount + that rises for age only ("Age is a factor in determining if you must file a return only if you are 65 or + older"). + example: In 2025 a single recipient aged 45 with $15,750 of wages and $30,000 of military retired pay fails under + section 6012(f), because the wages don't exceed the $15,750 standard deduction, and deducts $0. The (a)(1) + threshold admits wages equal to $15,750, for a $30,000 deduction. A blind recipient with $17,750 of wages fails + under (f), whose threshold is $17,750, and meets the (a)(1) threshold of $15,750. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10715 + state: ruled + note: Ruled 2026-11-11 for section 6012(f) under the statute-first rule (CONTRIBUTING.md#source-conflicts), the + reading David Trimmer's review recommended (https://github.com/PolicyEngine/policyengine-us/pull/10715#issuecomment-6748990819). + It is the federal filing requirement in force for 2025, the instructions' + wording points to it, and the literal reading would leave (iii) without effect for 2025, the year from which 2025 + House Bills 40 and 479 apply it. From 2026 section 6012(f) no longer applies, and the model uses section + 6012(a)(1)(A) and (B). The 2025 cases at $15,750 and $15,751 of wages and the blind filer's case at $17,750 in + id_retirement_benefits_deduction_military_employment_eligible.yaml pin the reading. Chart A of the 2025 Form 1040 + instructions and Publication 501 Table 1 would require a return of both example filers, at wages equal to the + standard deduction and without the blindness addition. That federal conflict is its own open candidate, + us:filing-chart-a-blindness-and-equality, under which tax_unit_is_required_to_file follows section 6012(f); this + entry follows the statute the same way. +- id: us-id:military-retirement-employment-includes-self-employment + program: income-tax + years: + from: 2025 + type: tax + question: Idaho Code 63-3022A(1)(b)(iii) admits the military retirement benefits of a recipient who "Was employed + during the tax year and received sufficient income from such employment to be required to file a federal return". + Does income from a business or farm count as income from such employment, or do wages alone? + sources: + - kind: statute + citation: Idaho Code 63-3022A(1)(b)(iii) + url: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - kind: instructions + citation: 2025 Form 39R instructions, line 8e, PDF page 45 + url: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 + - kind: statute + citation: 26 U.S.C. 6012(a)(1) and (f) + url: https://www.law.cornell.edu/uscode/text/26/6012 + readings: + statute: A self-employed recipient is employed, and gross income from a business or farm is income from that + employment. Section 63-3022A doesn't define "employed", and the gross income test it borrows from section 6012 + counts business and farm income, measured before business expenses (Schedule C line 7, Schedule F line 9). + other: Only an employee is employed, so wages alone count. The Form 39R instructions repeat the statute's words and + take neither side. + example: In 2025 a single recipient aged 45 with $20,000 of gross income from a business (Schedule C line 7) and + $30,000 of military retired pay deducts $30,000 when that income counts, since $20,000 exceeds the $15,750 + threshold, and $0 on the wages-only reading. + pe_us: + follows: statute + code: + - policyengine_us/parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/income_sources.yaml + - policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10715 + state: ruled + note: Ruled 2026-11-08. The model counts gross income from a business or farm (business_gross_income and + farm_gross_income, Schedule C line 7 and Schedule F line 9, the measure Chart A of the Form 1040 instructions + names for gross income from a business), as it counts wages. For a person without business_gross_income_reported + or farm_gross_income_reported (a negative amount, by default -1), that person's net profits + (self_employment_income, sstb_self_employment_income, farm_operations_income), each floored at zero, stand in. + Partnership and S corporation income doesn't count. The wages-only reading would deny the deduction to a + recipient who earns the same income from a business. The statement of purpose of 2025 House Bill 40, which under Joint Rule 18 is not + an expression of legislative intent, describes "undisabled veterans under age 62 who are also employed and earn + sufficient income to owe federal income taxes". Removing business_gross_income and farm_gross_income from + income_sources.yaml gives the wages-only reading, apart from excluded foreign self-employment income, which + foreign_earned_income_exclusion_gross_person (Form 2555 line 43) still carries. +- id: us-id:military-retirement-employment-joint-threshold + program: income-tax + years: + from: 2025 + type: tax + question: For the employment test of Idaho Code 63-3022A(1)(b)(iii) on a joint return, which amount must the + recipient's income from employment reach, the joint return's filing threshold by itself, an unmarried individual's + threshold, or any amount once the couple's combined gross income requires a return? + sources: + - kind: statute + citation: Idaho Code 63-3022A(1)(b)(iii) + url: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - kind: statute + citation: 26 U.S.C. 6012(a)(1)(A)(iv), (B) and (f)(2) + url: https://www.law.cornell.edu/uscode/text/26/6012 + - kind: instructions + citation: 2025 Form 39R instructions, line 8e, PDF page 45 + url: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 + readings: + statute: The recipient's own income from employment, by itself, must reach the threshold of the return the recipient + files, which on a joint return is the joint threshold. "Sufficient income from such employment" makes that income + the measure, and section 6012 gives an individual who files jointly no threshold but the joint one + ((a)(1)(A)(iv), and (f)(2) for 2018 to 2025). + other: Combine the spouses' gross income, as section 6012(a)(1)(A)(iv) and (f)(2)(A) do, so that any income from + employment admits a recipient whose joint return is required. Or compare the recipient's income with an unmarried + individual's threshold. The Form 39R instructions repeat the statute's words and take no side. + example: On a 2026 joint return, a recipient aged 45 with $20,000 of wages and $30,000 of military retired pay, whose + spouse earns $40,000, fails the test, because $20,000 is under the $32,200 joint threshold, and deducts $0, although + the couple must file. The combined-income reading and the unmarried threshold of $16,100 both admit the recipient, + who then deducts $30,000. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10715 + state: ruled + note: Ruled 2026-11-08. A threshold for each spouse has no footing in section 6012, and admitting any income from + employment once the couple must file would read "sufficient ... from such employment" out of the statute. The 2026 + joint cases in id_retirement_benefits_deduction_military_employment_eligible.yaml pin the reading, including the + recipient with $20,000 of wages whose spouse earns $40,000. +- id: us-id:military-retirement-employment-self-employment-tax-return + program: income-tax + years: + from: 2025 + type: tax + question: Does a recipient meet the employment test of Idaho Code 63-3022A(1)(b)(iii) with net earnings from + self-employment of $400 or more, which require a self-employment tax return under 26 U.S.C. 6017, given that the + Form 39R instructions say "required to file a federal return" without naming a section? + sources: + - kind: statute + citation: Idaho Code 63-3022A(1)(b)(iii) + url: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - kind: instructions + citation: 2025 Form 39R instructions, line 8e, PDF page 45 + url: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 + - kind: statute + citation: 26 U.S.C. 6017 + url: https://www.law.cornell.edu/uscode/text/26/6017 + readings: + statute: No. The statute requires a return "under section 6012(a)(1) of the Internal Revenue Code", the gross income + test, and net earnings of $400 don't meet that test. + other: The instructions' words, "required to file a federal return", could reach any federal return requirement, + section 6017's included. + example: In 2025 a single recipient aged 45 with $5,000 of gross income from a business, no business expenses and + $30,000 of military retired pay deducts $0 under the statute, because $5,000 doesn't exceed $15,750. If section + 6017's requirement counted, the recipient would deduct $30,000. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_employment_eligible.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10715 + state: ruled + note: Ruled 2026-11-11 for the statute, as David Trimmer's review recommended + (https://github.com/PolicyEngine/policyengine-us/pull/10715#issuecomment-6748990819). The instructions shorten the statute's words and state no different rule. The + 2025 case with $5,000 of gross business income in + id_retirement_benefits_deduction_military_employment_eligible.yaml pins the reading. +- id: us-id:military-retirement-survivor-routes + program: income-tax + years: + from: 2025 + type: tax + question: From 2025, Idaho Code 63-3022A(1)(b) counts military retirement benefits paid "to a retired member of the + military services of the United States, or the unremarried widow or widower of such member, who" is classified + as disabled, has reached 62, or meets the employment test. IDAPA 35.01.01.130.02, dated 4-6-23, says such a + survivor "who is sixty-five (65) or older, or sixty-two (62) and disabled, is eligible for the deduction, even + though the deceased spouse was not eligible at the time of death", and the 2025 Form 39R instructions' survivor + paragraph refers to "the age/disability requirements". Does an unremarried survivor qualify through the + statute's routes, including the employment test under 62, or only through the rule's age and disability + conditions? + sources: + - kind: statute + citation: Idaho Code 63-3022A(1)(b), as amended by 2025 House Bills 40 and 479 + url: https://legislature.idaho.gov/statutesrules/idstat/title63/t63ch30/sect63-3022a/ + - kind: statute + citation: 2025 House Bill 40, section 2, file page 5 + url: https://legislature.idaho.gov/wp-content/uploads/sessioninfo/2025/legislation/H0040.pdf#page=5 + - kind: regulation + citation: IDAPA 35.01.01.130.02, PDF page 22 + url: https://files.dfm.idaho.gov/dfm-admin-website/rules/current/35/350101.pdf#page=22 + - kind: instructions + citation: 2025 Form 39R instructions, line 8e and the Part One survivor paragraph, PDF pages 45-46 + url: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 + readings: + statute: The statute's three tests apply to the survivor as to the member, since "who" follows both. House Bill 40, + section 2 (file page 5), the first 2025 text, which House Bill 479 restated as (1)(b)(i)-(iii), says so plainly; + it admits the benefits "regardless of the age or disability classification of the retired member or of the + unremarried widow or widower", provided that "a person receiving such retirement benefits who is not disabled + and has not attained the age of sixty-two (62) years" was employed. The rule and the instructions can stand + with it. Rule 130.02 states a sufficient condition, adopted before the 2025 + amendment, to settle that a survivor qualifies "even though the deceased spouse was not eligible at the time + of death"; it doesn't say only those survivors qualify, and every survivor it admits, being at least 62, also + meets (1)(b)(ii). In the instructions, line 8e lists the three tests for retired service members; the + survivor paragraph, which says a survivor "might be eligible" if they meet the age and disability + requirements, sits in Part One of the two-part qualification "for all other retirees", whose Part Two lists + civil service, firefighter and police benefits but not military ones. + other: Read rule 130.02 and the survivor paragraph as the only routes for a survivor, so an unremarried widow or + widower of a military retiree qualifies only at 65, or at 62 with a disability. + example: In 2025 an unremarried widow aged 50 with $20,000 of wages and $25,000 of military survivor benefits deducts + $25,000 under the statute, since her wages exceed the $15,750 single threshold, and $0 if the rule's conditions + were the only routes. A widow aged 62 without a disability deducts her benefits under (1)(b)(ii) and would deduct + nothing under the exclusive reading. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_military_eligible_person.py + - policyengine_us/variables/gov/states/id/tax/income/deductions/retirement_benefits/id_eligible_military_retirement_income.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10715 + state: ruled + note: Ruled 2026-11-21 for the statute under the statute-first rule (CONTRIBUTING.md#source-conflicts). Read as a + sufficient condition, the rule doesn't flatly contradict the amended statute, so the reading needs no referral + to the project lead; read as exclusive, it would, and the project lead would decide. The 2025 cases in + id_retirement_benefits_deduction.yaml pin the reading, among them the working widow aged 50 and the widow aged + 62, who each deduct $25,000, and the widow aged 50 with no job or disability, who deducts nothing. Section + 63-3022A is in the Axiom corpus; the rule and the instructions pages are captured in + source_conflicts/sources/us-id/idapa-35-01-01-130-2023-p22-23.txt and form-39r-instructions-2025-p45-46.txt. - id: us-il:2022-rebate-claimed-vs-claimable program: income-tax years: diff --git a/source_conflicts/sources/us-id/form-39r-instructions-2025-p45-46.txt b/source_conflicts/sources/us-id/form-39r-instructions-2025-p45-46.txt new file mode 100644 index 00000000000..ddd2d1d5bc1 --- /dev/null +++ b/source_conflicts/sources/us-id/form-39r-instructions-2025-p45-46.txt @@ -0,0 +1,222 @@ +Source: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_03-02-2026.pdf#page=45 +Idaho Individual Income Tax Instructions Packet 2025, Form 39R instructions, lines 8 and 9. Fetched 2026-11-21 from the Internet Archive copy of that URL (sha256 952263e92f7c096b10aba50555cc7c166c78efc3b6ce6e5029d4837404553005, the same file as a copy fetched from tax.idaho.gov on 2026-11-11). Pages 45-46, text extracted with pdftotext (poppler), reading order. + +Form 39R — Instructions +Enter the taxable amount of non-Social Security +equivalent railroad benefits from Form RRB-1099R +from your federal Form 1040 or 1040-SR, +line 5b. Don’t enter the amount from Form 1040 or +1040-SR, line 5a. +If subtracting benefits from the Railroad Retirement +Board, you must include Form RRB-1099 or +RRB-1099-R with your return. +Disability pension that the federal Railroad +Retirement Act paid might be included as wages on +Form 1040 or 1040-SR, line 1 if you’re under the +minimum retirement age. +Line 8 Retirement Benefits Deduction +You might be able to deduct some of the qualifying +retirement benefits and annuities you receive. +Line 8a. The maximum amounts you can deduct for +2025 are: +Single ....................................................... $48,216 +Married filing jointly .................................. $72,324 +The retirement benefits you and your spouse +received under the federal Social Security Act and the +federal Railroad Retirement Act further reduce these +maximum amounts. The amount deducted can’t be +more than the amount of qualified benefits included +in federal income. +Line 8b. Enter the amount of retirement benefits +you (and your spouse) received under the federal +Railroad Retirement Act. +Include all of these on this line: +• The net Social Security equivalent benefit +portion from federal Form RRB-1099, Box 5. +• The amount from federal Form RRB-1099-R, +Box 7 (total gross paid), minus any amount in +Box 8 (repayments). +• Any railroad retirement disability benefit +included as wages on federal Form 1040 or +1040-SR, line 1. +Line 8c. Enter the amount of retirement benefits you +(and your spouse) received under the federal Social +Security Act, Box 5 of your Form SSA-1099s. If you +or your spouse received Canadian Social Security +benefits that you included in your federal taxable +income, also include those amounts. +Line 8e. The Idaho Retirement Benefits Deduction +for Retired Service Members. You must meet at +least one of the following: +• Classified as disabled (any age), or +• Age 62 or older, or +EIN00046 + +03-02-2026  + +2025 + +(continued) + +• Under age 62, employed during the year, and +received sufficient income from such employment +to be required to file a federal return. +The Idaho Retirement Benefits Deduction for +all other retirees has a two-part qualification. +You must qualify for both parts to receive this +deduction. +Part One – Age, Disability, and Marital/Filing +Status +The recipients must be at least age 65 or be +classified as disabled and be at least age 62. +The following individuals are classified as disabled: +• An individual recognized as disabled by +the Social Security Administration, the +Railroad Retirement Board, or the Office of +Management and Budget +• A veteran of a U.S. war with a service-connected +disability rating of 10% or more +• A veteran of a U.S. war with a +nonservice-connected disability pension +• A person who has a physician-certified +permanent disability with no expectation of +improvement +If you’re married, you can’t claim this deduction if you +file separately. +If you’re an unremarried widow or widower of a +pensioner and receive qualifying survivor benefits, +you might be eligible to claim the retirement benefit +deduction if you meet the age/disability requirements. +Part Two – Qualified Retirement Benefits +The recipients must meet the requirements in +Part One, and their qualified retirement benefits must +be one of the following: +• Civil Service Employees: Retirement annuities +paid by the U.S. Civil Service Retirement +System (CSRS), the Foreign Service +Retirement and Disability System (FSRDS), or +the offset programs of these two systems. +‚ To qualify for the deduction, the employee +must have established eligibility before +1984. +‚ Retirement annuities paid to a retired +federal employee under the Federal +Employees Retirement System (FERS) +don’t qualify for the deduction. +You can tell if your benefits are paid under the +CSRS or FERS by looking at the first digit of +the account number on your CSA-1099, if you +received one. +Page 31 of 52 + + Form 39R — Instructions +‚ If the first digit is 0, 1, 2, 3, or 4, the benefits +are paid out of CSRS. +‚ If the first digit is 7 or 9, the benefits are +paid out of FERS and don’t qualify. +‚ If the first digit is 8, look at your Notice +of Annuity Adjustment from the Office of +Personnel Management. The notice shows +how much of your benefits are paid from +CSRS and how much are paid from FERS. +Only the portion paid from CSRS qualifies +for this deduction. +• Idaho Firefighters: Retirement benefits paid by +the Public Employee Retirement System of Idaho +(PERSI) relating to the Firefighters Retirement +Fund. If you received a 1099R and your account +number includes the FRF (Firefighters Retirement +Fund) designation, your benefits might qualify +for the deduction. Benefits paid out of the PERSI +Base Plan don’t qualify for the deduction. +• Police Officers of an Idaho City: Retirement +benefits paid from the Police Retirement +Fund that no longer admits new members +and, on January 1, 2012, was administered +by an Idaho city or PERSI. Also, benefits that +PERSI paid relating to Idaho police officer +employment not included in the federal Social +Security retirement system. For example, +benefits paid out of the city police retirement +funds for the cities of Coeur d’Alene, Lewiston, +and Pocatello might qualify for the deduction. +Similarly, benefits that PERSI paid relating to +the old Idaho Falls Police Retirement Fund +might qualify for the deduction. If you received +a 1099R and your account number includes +the IFP (Idaho Falls Police) designation, your +benefits might qualify. Benefits paid out of +the PERSI Base Plan don’t qualify for the +deduction. +Disability pension that the federal Railroad +Retirement Act paid might not be included on your +Form RRB-1099 or RRB-1099-R, if you’re under +the minimum retirement age. Instead it might be +included on Form 1040 or 1040-SR, line 1 as +wages. +Line 9 Technological Equipment Donation +Enter the lesser of cost or fair market value of +technological equipment donated to one or more of +these Idaho educational institutions or libraries located +in Idaho: +• Public or nonprofit private elementary or +secondary school. +EIN00046 + +03-02-2026  + +2025 + +(continued) + +• Public or nonprofit private college or university. +• Public library or library district. +Items that qualify for this deduction are limited +to computers, computer software, and scientific +equipment or apparatus manufactured within five +years of the date of donation. The amount deducted +can’t reduce Idaho taxable income to less than zero. +You can’t carry any unused deduction to another year. +Include your distributive share from the appropriate +column of Form ID K-1, Part IV, line 26. The deduction +from a pass-through entity can’t be more than the +amount of pass-through income minus deductions of +the entity making the contribution. +Line 10 Idaho Capital Gains Deduction +You might be able to deduct 60% of the capital gain net +income reported on federal Schedule D from the sale +of any of the qualified Idaho property described below: +(a) Real property held for at least 12 months +(b) Tangible personal property used in a +revenue-producing enterprise and held for at +least 12 months. A revenue-producing enterprise +means: +• Producing, assembling, fabricating, +manufacturing, or processing any agricultural, +mineral, or manufactured product. +• Storing, warehousing, distributing, or selling +at wholesale any products of agriculture, +mining, or manufacturing. +• Feeding livestock at a feedlot. +• Operating laboratories or other facilities for +scientific, agricultural, animal husbandry, +industrial research, development, or testing. +(c) Cattle and horses held for at least 24 months and +other livestock used for breeding held for at least +12 months. +(d) Timber held for at least 24 months. +(e) Certain sales of partnership interests. (Idaho Code +section 63-3022H(3)(f)) +Note: Gains from the sale of stocks, goodwill, and +other intangibles don’t qualify. +Complete Idaho Form CG to calculate your capital +gains deduction. +Line 11 Active Duty Military Pay Earned +Outside of Idaho +If you’re serving in the U.S. military on active-duty +that’s continuous and uninterrupted for 120 days, +Idaho doesn’t tax your active-duty military wages for +service outside of Idaho. The continuous 120 days +Page 32 of 52 + + \ No newline at end of file diff --git a/source_conflicts/sources/us-id/idapa-35-01-01-130-2023-p22-23.txt b/source_conflicts/sources/us-id/idapa-35-01-01-130-2023-p22-23.txt new file mode 100644 index 00000000000..46d711d8f02 --- /dev/null +++ b/source_conflicts/sources/us-id/idapa-35-01-01-130-2023-p22-23.txt @@ -0,0 +1,184 @@ +Source: https://files.dfm.idaho.gov/dfm-admin-website/rules/current/35/350101.pdf#page=22 +IDAPA 35.01.01, Income Tax Administrative Rules, rule 130 (sections dated 4-6-23), from the current rules PDF (created 2026-06-15), fetched 2026-11-21 (sha256 e8396000dcf0b7005ca08e6bc09a22cd8fc6b0b991b40a2f602c155685ed386c). Pages 22-23, text extracted with pdftotext (poppler), reading order. + +IDAHO ADMINISTRATIVE CODE +Idaho State Tax Commission + +IDAPA 35.01.01 +Income Tax Administrative Rules + +04. +Information Provided by a Pass-Through Entity. The pass-through entity will prepare and +distribute to each partner, shareholder, or beneficiary a schedule detailing the proportionate share of each adjustment. +Copies of these schedules is to be attached to the pass-through entity’s Idaho income tax return or information return +for the taxable year that the adjustment is allowed or required. +(4-6-23) +05. +Pass-Through Entities That Pay Tax. Generally, a pass-through entity is to report the same Idaho +adjustments as those allowed to the individual partner, shareholder, or beneficiary for whom the pass-through entity is +paying the tax. However, certain deductions that may be allowed to the individual if reporting and paying the tax is +not allowed to the pass-through entity. +(4-6-23) +129. + +(RESERVED) + +130. +DEDUCTION OF CERTAIN RETIREMENT BENEFITS (RULE 130). +Section 63-3022A, Idaho Code +01. + +Qualified Benefits. Subject to limitations, the following benefits qualify for the deduction: +(4-6-23) + +a. +Retirement annuities paid to a retired civil service employee. For purposes of this deduction a +retired civil service employee is an individual who is receiving retirement annuities paid under the Civil Service +Retirement System, the Foreign Service Retirement and Disability System, or the offset programs of these systems. +An individual is entitled to benefits from this retirement system only if he established eligibility prior to 1984. +Retirement annuities paid to a retired federal employee under the Federal Employees Retirement System generally do +not qualify for the deduction. Retirement annuities received under the Federal Employees Retirement System by a +retiree previously covered under the Civil Service Retirement System qualify to the extent the retiree establishes the +portion of the annuity attributable to coverage under the Civil Service Retirement System. +(4-6-23) +b. +Retirement benefits paid as a result of participating in the firemen’s retirement fund of the state of +Idaho as authorized by Title 72, Chapter 14, Idaho Code. A fireman is entitled to benefits from this fund only if he +established eligibility as a paid fireman prior to October 1, 1980. Retirement benefits paid out of the public +employee’s retirement system do not qualify for the deduction. +(4-6-23) +c. + +Retirement benefits paid to a retired Idaho city police officer: + +(4-6-23) + +i. +By a city or its agent in regard to a policeman’s retirement fund that no longer admits new members +and on January 1, 2012, was administered by a city in this state; or +(4-6-23) +ii. +In regard to a policeman’s retirement fund that no longer admits new members and on January 1, +2012, was administered by the public employee retirement system of Idaho; or +(4-6-23) +iii. +By the public employee retirement system of Idaho to a retired police officer in regard to Idaho +employment not included in the federal social security retirement system; or +(4-6-23) +iv. +An unremarried widow or widower of a person described in Subparagraph 130.01.c.i., 130.01.c.ii., +or 130.01.c.iii. of this rule. +(4-6-23) +services. + +d. + +Retirement benefits paid by the United States Government to a retired member of the military +(4-6-23) + +02. +Unremarried Widow or Widower. An unremarried widow or widower of a retired civil service +employee, retired policeman, retired fireman, or retired member of the military services, who is sixty-five (65) or +older, or sixty-two (62) and disabled, is eligible for the deduction, even though the deceased spouse was not eligible +at the time of death. In this situation, the amount of the retirement benefits that can be considered for the deduction +for the taxable year of the spouse’s death is limited to the benefits paid to the spouse as a widow or widower. +(4-6-23) +03. +Section 130 + +Married Individuals Filing Separate Returns. Married individuals who elect to file married +Page 22 + + IDAHO ADMINISTRATIVE CODE +Idaho State Tax Commission + +IDAPA 35.01.01 +Income Tax Administrative Rules + +filing separate are not entitled to the deduction allowed by Section 63-3022A, Idaho Code. +04. +131. -- 139. + +Examples. Available at Income Tax Rules Examples. + +(4-6-23) +(4-6-23) + +(RESERVED) + +140. +DEDUCTION FOR ENERGY EFFICIENCY UPGRADES (RULE 140). +Section 63-3022B, Idaho Code +Siding is not considered an energy efficiency upgrade. If a layer of insulation is placed beneath siding, the cost of the +insulation is deductible if it otherwise qualifies. If the siding consists of an outer shell for protection against the +weather and an inner layer of insulating material, the insulating material qualifies if the cost is separately identified +by the seller. +(4-6-23) +141. -- 149. + +(RESERVED) + +150. +DEDUCTION FOR ALTERNATIVE ENERGY DEVICES (RULE 150). +Section 63-3022C, Idaho Code +01. +Qualifying Residence. The deduction applies only to a residence of an individual and does not +apply to rental housing, unless the renter, rather than the owner, installs and pays for the device. +(4-6-23) +02. +Converted Rental Unit. If a residence served by an alternative energy device is converted by the +owner from a rental unit to his residence, the owner is entitled to any remaining allowable deduction for the year of +the conversion based on the portion of the year that the residence served as his residence. For each subsequent year, +the owner is entitled to the full amount of the allowable deduction for that year assuming the residence continues to +be the owner’s residence. +(4-6-23) +03. +Destruction of Wood Burning Stove. The wood burning stove that does not meet the +environmental protection agency requirements for certification is to be surrendered to the Department of +Environmental Quality no later than thirty (30) days from the date of purchase of the qualifying alternative energy +device. Failure to surrender the wood burning stove within the thirty (30) day period will result in the new device +failing to qualify as an alternative energy device. The thirty (30) day period may be extended only if the taxpayer can +show good cause for the delay. +(4-6-23) +151. -- 169. + +(RESERVED) + +170. +IDAHO CAPITAL GAINS DEDUCTION -- IN GENERAL (RULE 170). +Section 63-3022H, Idaho Code +01. +Losses From Nonqualified Property. Losses from property not qualifying for the Idaho capital +gains deduction may not be netted against gains from property qualifying for the Idaho capital gains deduction before +the amount of the deduction is determined. +(4-6-23) +02. + +Losses From Qualified Property. + +(4-6-23) + +a. +Losses from property qualifying for the Idaho capital gains deduction are netted against gains from +property qualifying for the Idaho capital gains deduction before the amount of the deduction is determined. (4-6-23) +b. +A capital loss carryover from property qualifying for the Idaho capital gains deduction will be +netted against current year gains from property qualifying for the Idaho capital gains deduction before the amount of +the deduction is determined. If a taxpayer has a capital loss carryover consisting of qualified and nonqualified +property, the qualified capital loss carryover is the proportion that the qualified capital loss bears to the total capital +loss shown on the return in the prior year multiplied by the capital loss carryover. +(4-6-23) +03. +171. + +Examples. Available at Income Tax Rules Examples. + +IDAHO CAPITAL GAINS DEDUCTION -- QUALIFIED PROPERTY (RULE 171). + +Section 140 + +Page 23 + +(4-6-23) + + \ No newline at end of file