From 53fe0ac7841614626494db9c274a014ecf88220d Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 11 Oct 2026 16:21:12 -0400 Subject: [PATCH 1/8] Exclude employer-plan-eligible premiums from the self-employed health insurance deduction 26 U.S.C. 162(l)(2)(B) disallows the deduction for any month the taxpayer is eligible for a subsidized plan of their own or their spouse's employer (Form 7206 line 1). The premium base now leaves out the premiums of a person who has or is offered employer coverage, whose employer pays part of the premiums, or whose spouse on a joint return does. Co-Authored-By: Claude Opus 5.5 --- .../fix-sehi-employer-plan-exclusion.fixed.md | 1 + ...ployed_health_insurance_employer_plan.yaml | 197 ++++++++++++++++++ ...health_insurance_employer_plan_eligible.py | 55 +++++ ...self_employed_health_insurance_premiums.py | 22 +- 4 files changed, 273 insertions(+), 2 deletions(-) create mode 100644 changelog.d/fix-sehi-employer-plan-exclusion.fixed.md create mode 100644 policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml create mode 100644 policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py diff --git a/changelog.d/fix-sehi-employer-plan-exclusion.fixed.md b/changelog.d/fix-sehi-employer-plan-exclusion.fixed.md new file mode 100644 index 00000000000..8382ec25a13 --- /dev/null +++ b/changelog.d/fix-sehi-employer-plan-exclusion.fixed.md @@ -0,0 +1 @@ +Leave out of the self-employed health insurance deduction the premiums of a person who, or whose spouse on a joint return, is eligible for a subsidized employer health plan (26 U.S.C. 162(l)(2)(B), Form 7206 line 1). diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml new file mode 100644 index 00000000000..cfffb247700 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml @@ -0,0 +1,197 @@ +# 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1: premiums for any month the +# taxpayer is eligible for a subsidized plan of their own or their spouse's +# employer don't count toward the self-employed health insurance deduction. +# Profit of $50,000 keeps the earned income limit (Form 7206 line 13) above the +# $6,000 of premiums, so the deduction equals the premiums that count. + +- name: No employer plan, so all premiums count. + period: 2025 + input: + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + output: + self_employed_health_insurance_employer_plan_eligible: false + self_employed_health_insurance_premiums: 6_000 + self_employed_health_insurance_ald_person: 6_000 + +- name: Enrolled in employer coverage, so no premiums count. + period: 2025 + input: + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + has_esi: true + output: + self_employed_health_insurance_employer_plan_eligible: true + self_employed_health_insurance_premiums: 0 + self_employed_health_insurance_ald_person: 0 + +- name: Offered employer coverage without enrolling, so no premiums count. + period: 2025 + input: + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + offered_aca_disqualifying_esi: true + output: + self_employed_health_insurance_employer_plan_eligible: true + self_employed_health_insurance_premiums: 0 + self_employed_health_insurance_ald_person: 0 + +- name: An employer pays part of the premiums, so no premiums count. + period: 2025 + input: + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + employer_contribution_to_health_insurance_premiums_category: SOME + output: + self_employed_health_insurance_employer_plan_eligible: true + self_employed_health_insurance_premiums: 0 + self_employed_health_insurance_ald_person: 0 + +- name: The spouse's employer plan bars a joint filer's deduction. + period: 2025 + input: + people: + head: + age: 45 + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + spouse: + age: 45 + employment_income: 40_000 + has_esi: true + tax_units: + tax_unit: + members: [head, spouse] + marital_units: + marital_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_code: TX + output: + self_employed_health_insurance_employer_plan_eligible: [true, true] + self_employed_health_insurance_premiums: [0, 0] + self_employed_health_insurance_ald: 0 + # Half of SE tax: 50,000 x 0.9235 x 0.153 / 2 = 3,532.3875. + # AGI: 50,000 + 40,000 - 3,532.3875 = 86,467.6125. + adjusted_gross_income: 86_467.61 + +- name: The spouse's employer plan also bars the deduction on a joint return without explicit marital units. + period: 2025 + input: + people: + head: + age: 45 + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + spouse: + age: 45 + employment_income: 40_000 + has_esi: true + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_code: TX + output: + self_employed_health_insurance_premiums: [0, 0] + self_employed_health_insurance_ald: 0 + +- name: A housemate's employer plan does not bar a single filer's deduction. + period: 2025 + input: + people: + filer: + age: 45 + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + housemate: + age: 45 + employment_income: 40_000 + has_esi: true + tax_units: + filer_unit: + members: [filer] + housemate_unit: + members: [housemate] + households: + household: + members: [filer, housemate] + state_code: TX + output: + self_employed_health_insurance_employer_plan_eligible: [false, true] + self_employed_health_insurance_premiums: [6_000, 0] + self_employed_health_insurance_ald: [6_000, 0] + +- name: A dependent child's own employer plan does not bar the parent's deduction. + period: 2025 + input: + people: + head: + age: 50 + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + spouse: + age: 50 + child: + age: 20 + is_tax_unit_dependent: true + is_full_time_student: true + employment_income: 5_000 + has_esi: true + tax_units: + tax_unit: + members: [head, spouse, child] + marital_units: + marital_unit: + members: [head, spouse] + child_marital_unit: + members: [child] + households: + household: + members: [head, spouse, child] + state_code: TX + output: + self_employed_health_insurance_employer_plan_eligible: [false, false, true] + self_employed_health_insurance_premiums: [6_000, 0, 0] + self_employed_health_insurance_ald: 6_000 + +- name: A parent's employer plan does not bar a self-employed dependent's own deduction. + period: 2025 + input: + people: + head: + age: 50 + employment_income: 80_000 + has_esi: true + child: + age: 22 + is_tax_unit_dependent: true + is_full_time_student: true + is_self_employed: true + self_employment_income: 3_000 + health_insurance_premiums: 1_000 + tax_units: + tax_unit: + members: [head, child] + households: + household: + members: [head, child] + state_code: TX + output: + self_employed_health_insurance_employer_plan_eligible: [true, false] + self_employed_health_insurance_premiums: [0, 1_000] + # The child's limit is 3,000 of profit (less half its SE tax after + # 401(c)), above the 1,000 of premiums either way. + self_employed_health_insurance_ald_person: [0, 1_000] diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py new file mode 100644 index 00000000000..720a8c29e41 --- /dev/null +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py @@ -0,0 +1,55 @@ +from policyengine_us.model_api import * + + +class self_employed_health_insurance_employer_plan_eligible(Variable): + value_type = bool + entity = Person + label = "Eligible for a subsidized employer health plan (self-employed health insurance deduction)" + documentation = ( + "Whether the person, or their spouse, is eligible for a subsidized " + "health plan of their employer, which bars the self-employed health " + "insurance deduction for the premiums (26 U.S.C. 162(l)(2)(B); Form " + "7206 line 1). The law applies the bar month by month; the inputs are " + "annual, so a person eligible at any point is treated as eligible for " + "the whole year. Two cases are not modeled. A spouse who files " + "separately is in another tax unit, and the model does not see their " + "employer's plan; it cannot use the filing status here, which depends " + "on dependents' incomes and so on this deduction, and the default " + "dataset has no married couple split across tax units. The plan of a " + "dependent's or under-27 child's employer bars the deduction only for " + "a taxpayer who can take part in it, and no input records that." + ) + definition_period = YEAR + reference = ( + "https://www.law.cornell.edu/uscode/text/26/162#l_2_B", + "https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1", # Line 1, first bullet + "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=2", # Other coverage + "https://www.irs.gov/pub/irs-prior/i1040gi--2022.pdf#page=88", # Line 17, before Form 7206 + ) + + def formula(person, period, parameters): + # Enrolled in, or offered, employer coverage, or the employer pays some + # or all of the premiums. Enrollment and an offer each show the person + # can take part in the plan. An employer that pays premiums subsidizes + # the plan. + contribution = person( + "employer_contribution_to_health_insurance_premiums_category", + period, + ) + contribution_status = contribution.possible_values + employer_pays = (contribution == contribution_status.SOME) | ( + contribution == contribution_status.ALL + ) + own = ( + person("has_esi", period) + | person("offered_aca_disqualifying_esi", period) + | employer_pays + ) + # The plan of the spouse's employer also bars the deduction: on a joint + # return, the other of the head and spouse. A tax unit dependent's own + # deduction is not barred by the plan of a parent's employer, which + # the statute does not list. + filer = person("is_tax_unit_head_or_spouse", period) + filer_own = own & filer + other_filer_eligible = person.tax_unit.sum(filer_own) > filer_own.astype(int) + return own | (filer & other_filer_eligible) diff --git a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py index 903b966d923..72321944561 100644 --- a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py +++ b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py @@ -6,7 +6,25 @@ class self_employed_health_insurance_premiums(Variable): entity = Person label = "Self-employed health insurance premiums" unit = USD - documentation = "Health insurance premiums for plans covering individuals who are not covered by any employer-sponsored health insurance." + documentation = ( + "Health insurance premiums that count toward the self-employed health " + "insurance deduction (Form 7206 line 1). Premiums are left out when " + "the person or their spouse is eligible for a subsidized employer " + "plan (26 U.S.C. 162(l)(2)(B)). Premiums are taken as supplied: for a " + "Marketplace plan, 26 U.S.C. 280C(g) allows no deduction for the part " + "the premium tax credit pays, and the model does not net the credit " + "it calculates out of these premiums." + ) definition_period = YEAR defined_for = "is_self_employed" - adds = ["health_insurance_premiums"] + reference = ( + "https://www.law.cornell.edu/uscode/text/26/162#l", + "https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1", # Line 1 + ) + + def formula(person, period, parameters): + premiums = person("health_insurance_premiums", period) + employer_plan_eligible = person( + "self_employed_health_insurance_employer_plan_eligible", period + ) + return where(employer_plan_eligible, 0, premiums) From 508d09200cdf9d21133f2b1c8502001cfd9c024b Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 11 Oct 2026 16:29:25 -0400 Subject: [PATCH 2/8] Add Hypothesis properties for the self-employed health insurance employer-plan bar Co-Authored-By: Claude Opus 5.5 --- ...alth_insurance_employer_plan_properties.py | 275 ++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py diff --git a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py new file mode 100644 index 00000000000..2d5cf440b9b --- /dev/null +++ b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py @@ -0,0 +1,275 @@ +"""Properties of the employer-plan bar on the self-employed health insurance deduction. + +26 U.S.C. 162(l)(2)(B) and Form 7206 line 1 leave out premiums for any month +the taxpayer is eligible for a subsidized plan of their own or their spouse's +employer. The model's inputs are annual, so a person who has or is offered +employer coverage (`has_esi`, `offered_aca_disqualifying_esi`), or whose +employer pays some or all of the premiums, is eligible for the year, and so is +the other of the head and spouse on a joint return. A tax unit dependent is +barred only by their own coverage, never by a parent's. + +Each batch places every drawn tax unit twice, once as drawn and once with every +coverage flag cleared, and runs as one vectorized baseline simulation. For +every tax unit and year: + +1. Reference: each person's premium base equals a closed-form reference on + the inputs: the person's premiums if they are self-employed and neither + they nor (for the head and spouse) the other of the two is eligible, and 0 + otherwise. +2. Bounds: 0 <= deduction <= premium base <= premiums. +3. Monotone: clearing the coverage flags never lowers a person's premium base + or deduction. +4. Differential: the flags move AGI only through the deduction, so the + twins' AGI difference equals the difference in the head's and spouse's + deductions. + +A deterministic grid runs every combination of the head's, the spouse's and a +dependent's flags for a joint couple with a self-employed head. +Sources: https://www.law.cornell.edu/uscode/text/26/162#l_2_B and +https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1 (line 1). +""" + +import itertools + +import numpy as np +import pytest +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from policyengine_us import Simulation + +YEARS = [2024, 2025, 2026] +TOLERANCE = 0.01 +CONTRIBUTIONS = ["NONE", "SOME", "ALL", "NA"] +EMPLOYER_PAYS = {"SOME", "ALL"} +NO_FLAGS = {"has_esi": False, "offered": False, "contribution": "NONE"} + + +def every_year(value): + return {year: value for year in YEARS} + + +def own_eligible(flags): + return ( + flags["has_esi"] or flags["offered"] or flags["contribution"] in EMPLOYER_PAYS + ) + + +def person_inputs(age, member, flags, dependent=False): + inputs = { + "age": every_year(age), + "is_self_employed": every_year(member["self_employed"]), + "self_employment_income": every_year(member["profit"]), + "employment_income": every_year(member["wages"]), + "health_insurance_premiums": every_year(member["premiums"]), + "has_esi": every_year(flags["has_esi"]), + "offered_aca_disqualifying_esi": every_year(flags["offered"]), + "employer_contribution_to_health_insurance_premiums_category": every_year( + flags["contribution"] + ), + } + if dependent: + inputs["is_tax_unit_dependent"] = every_year(True) + return inputs + + +def build_situation(units): + """Each unit twice: as drawn, then with every coverage flag cleared.""" + people, tax_units, households = {}, {}, {} + rows = [] # per person: (premiums, self-employed, expected base, unit, twin) + unit_index = 0 + for twin in (False, True): + for i, unit in enumerate(units): + name = f"u{i}_{'twin' if twin else 'drawn'}" + members = unit["members"] + flags = [NO_FLAGS if twin else m["flags"] for m in members] + filers = [True, unit["joint"]][: min(2, len(members))] + filers += [False] * (len(members) - len(filers)) + names = [] + for j, (member, member_flags) in enumerate(zip(members, flags)): + person = f"{name}_p{j}" + names.append(person) + is_dependent = not filers[j] + people[person] = person_inputs( + member["age"], member, member_flags, dependent=is_dependent + ) + for j, member in enumerate(members): + own = own_eligible(flags[j]) + other_filer = any( + own_eligible(flags[k]) + for k in range(len(members)) + if k != j and filers[k] + ) + eligible = own or (filers[j] and other_filer) + base = ( + member["premiums"] + if member["self_employed"] and not eligible + else 0.0 + ) + rows.append( + ( + member["premiums"], + member["self_employed"], + base, + unit_index, + twin, + ) + ) + tax_units[name] = {"members": names} + households[name] = {"members": names, "state_code": every_year("TX")} + unit_index += 1 + situation = {"people": people, "tax_units": tax_units, "households": households} + premiums, self_employed, base, unit, twin = (np.array(c) for c in zip(*rows)) + return situation, premiums.astype(float), base.astype(float), unit, twin + + +def check_batch(units): + situation, premiums, expected_base, unit, twin = build_situation(units) + sim = Simulation(situation=situation) + n = len(units) + for year in YEARS: + base = sim.calculate("self_employed_health_insurance_premiums", year) + deduction = sim.calculate("self_employed_health_insurance_ald_person", year) + # 1. Reference. + np.testing.assert_allclose(base, expected_base, atol=TOLERANCE) + # 2. Bounds. + assert np.all(deduction >= -TOLERANCE) + assert np.all(deduction <= base + TOLERANCE) + assert np.all(base <= premiums + TOLERANCE) + # 3. Monotone: the twin (no flags) of each person has at least as much. + drawn, cleared = ~twin, twin + assert np.all(base[cleared] >= base[drawn] - TOLERANCE) + assert np.all(deduction[cleared] >= deduction[drawn] - TOLERANCE) + # 4. Differential: AGI moves only through the head's and spouse's + # deductions, which `self_employed_health_insurance_ald` sums. + agi = sim.calculate("adjusted_gross_income", year) + filer_deduction = sim.calculate("self_employed_health_insurance_ald", year) + np.testing.assert_allclose( + agi[:n] - agi[n:], + filer_deduction[n:] - filer_deduction[:n], + atol=TOLERANCE, + ) + + +flags_strategy = st.fixed_dictionaries( + { + "has_esi": st.booleans(), + "offered": st.booleans(), + "contribution": st.sampled_from(CONTRIBUTIONS), + } +) +money = st.one_of(st.sampled_from([0, 1, 6_000]), st.integers(0, 40_000)).map(float) +profit = st.one_of( + st.sampled_from([-5_000, 0, 433, 434, 50_000]), st.integers(-20_000, 250_000) +).map(float) + + +def member_strategy(age): + return st.fixed_dictionaries( + { + "age": st.just(age), + "self_employed": st.booleans(), + "profit": profit, + "wages": st.one_of(st.just(0.0), money), + "premiums": money, + "flags": flags_strategy, + } + ) + + +unit_strategy = st.builds( + lambda joint, head, spouse, dependents: { + "joint": joint, + "members": [head] + ([spouse] if joint else []) + dependents, + }, + st.booleans(), + member_strategy(45), + member_strategy(43), + st.lists(member_strategy(19), max_size=2), +) +SETTINGS = dict( + max_examples=15, + deadline=None, + derandomize=True, + suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large], +) + + +@settings(**SETTINGS) +@given(st.lists(unit_strategy, min_size=4, max_size=12)) +def test_premium_base_matches_the_form_7206_reference(units): + check_batch(units) + + +ALL_FLAGS = [ + {"has_esi": has_esi, "offered": offered, "contribution": contribution} + for has_esi, offered, contribution in itertools.product( + [False, True], [False, True], CONTRIBUTIONS + ) +] + + +def grid_units(): + def member(age, self_employed, flags, premiums): + return { + "age": age, + "self_employed": self_employed, + "profit": 50_000.0 if self_employed else 0.0, + "wages": 0.0 if self_employed else 30_000.0, + "premiums": premiums, + "flags": flags, + } + + return [ + { + "joint": True, + "members": [ + member(45, True, head, 6_000.0), + member(43, False, spouse, 0.0), + member(19, False, dependent, 0.0), + ], + } + for head, spouse, dependent in itertools.product( + ALL_FLAGS, ALL_FLAGS, [NO_FLAGS, {**NO_FLAGS, "has_esi": True}] + ) + ] + + +@pytest.fixture(scope="module") +def grid(): + units = grid_units() + situation, premiums, expected_base, unit, twin = build_situation(units) + return Simulation(situation=situation), units, expected_base, twin + + +@pytest.mark.parametrize("year", YEARS) +def test_grid_bars_on_head_or_spouse_coverage_only(grid, year): + sim, units, expected_base, twin = grid + base = sim.calculate("self_employed_health_insurance_premiums", year) + np.testing.assert_allclose(base, expected_base, atol=TOLERANCE) + head_base = base[~twin].reshape(len(units), 3)[:, 0] + barred = np.array( + [ + own_eligible(u["members"][0]["flags"]) + or own_eligible(u["members"][1]["flags"]) + for u in units + ] + ) + # The head's premiums count exactly when neither filer is eligible; the + # dependent's coverage never matters. + np.testing.assert_allclose(head_base, np.where(barred, 0, 6_000), atol=TOLERANCE) + # Guard against a vacuous pass. + assert barred.any() and (~barred).any() + + +@pytest.mark.parametrize("year", YEARS) +def test_grid_deduction_moves_agi_one_for_one(grid, year): + sim, units, _, twin = grid + n = len(units) + agi = sim.calculate("adjusted_gross_income", year) + deduction = sim.calculate("self_employed_health_insurance_ald", year) + np.testing.assert_allclose( + agi[:n] - agi[n:], deduction[n:] - deduction[:n], atol=TOLERANCE + ) + # The twins all deduct the full $6,000; the earned income limit is higher. + np.testing.assert_allclose(deduction[n:], 6_000, atol=TOLERANCE) From 7cebc0f41b872754a38650bb9c2db4de51659759 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 11 Oct 2026 16:38:26 -0400 Subject: [PATCH 3/8] Point the self-employed premium documentation at the PTC interaction issue (#10124) Co-Authored-By: Claude Opus 5.5 --- .../self_employed_health_insurance_premiums.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py index 72321944561..17289966e8c 100644 --- a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py +++ b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py @@ -9,11 +9,13 @@ class self_employed_health_insurance_premiums(Variable): documentation = ( "Health insurance premiums that count toward the self-employed health " "insurance deduction (Form 7206 line 1). Premiums are left out when " - "the person or their spouse is eligible for a subsidized employer " - "plan (26 U.S.C. 162(l)(2)(B)). Premiums are taken as supplied: for a " - "Marketplace plan, 26 U.S.C. 280C(g) allows no deduction for the part " - "the premium tax credit pays, and the model does not net the credit " - "it calculates out of these premiums." + "the person, or their spouse on a joint return, is eligible for a " + "subsidized employer plan (26 U.S.C. 162(l)(2)(B)). Premiums are " + "taken as supplied: for a Marketplace plan, 26 U.S.C. 280C(g) allows " + "no deduction for the part the premium tax credit pays, and the model " + "does not net the credit it calculates out of these premiums: the " + "credit depends on AGI, and so on this deduction (policyengine-us " + "#10124)." ) definition_period = YEAR defined_for = "is_self_employed" From add2d865c79823221e5bd28c0c721780cee4ce0c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 5 Nov 2026 21:20:16 -0500 Subject: [PATCH 4/8] Preserve dependent deductions under employer coverage flags Co-Authored-By: Claude Opus 5.5 --- ...lth_insurance_employer_plan_eligible.yaml} | 110 +++++++++++++++++- ...alth_insurance_employer_plan_properties.py | 46 +++++--- ...health_insurance_employer_plan_eligible.py | 63 +++++----- 3 files changed, 169 insertions(+), 50 deletions(-) rename policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/{self_employed_health_insurance_employer_plan.yaml => self_employed_health_insurance_employer_plan_eligible.yaml} (59%) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml similarity index 59% rename from policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml rename to policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml index cfffb247700..dae51b737b1 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml @@ -133,7 +133,7 @@ self_employed_health_insurance_premiums: [6_000, 0] self_employed_health_insurance_ald: [6_000, 0] -- name: A dependent child's own employer plan does not bar the parent's deduction. +- name: A dependent's ESI flag leaves the parents' employer-plan eligibility clear. period: 2025 input: people: @@ -163,7 +163,9 @@ members: [head, spouse, child] state_code: TX output: - self_employed_health_insurance_employer_plan_eligible: [false, false, true] + # A dependent's ESI flag can describe a parent's employer plan, so it + # does not establish access through the dependent's own employer. + self_employed_health_insurance_employer_plan_eligible: [false, false, false] self_employed_health_insurance_premiums: [6_000, 0, 0] self_employed_health_insurance_ald: 6_000 @@ -192,6 +194,106 @@ output: self_employed_health_insurance_employer_plan_eligible: [true, false] self_employed_health_insurance_premiums: [0, 1_000] - # The child's limit is 3,000 of profit (less half its SE tax after - # 401(c)), above the 1,000 of premiums either way. + # Half of the child's SE tax: 3,000 x 0.9235 x 0.153 / 2 = 211.94325. + # The earned income limit is 3,000 - 211.94325 = 2,788.05675. + # The child deducts min(1,000, 2,788.05675) = 1,000. self_employed_health_insurance_ald_person: [0, 1_000] + +- name: A dependent's employer offer flag leaves premiums for their own policy deductible. + period: 2025 + input: + people: + head: + age: 50 + employment_income: 80_000 + has_esi: true + child: + age: 22 + is_tax_unit_dependent: true + is_full_time_student: true + is_self_employed: true + self_employment_income: 3_000 + health_insurance_premiums: 1_000 + offered_aca_disqualifying_esi: true + tax_units: + tax_unit: + members: [head, child] + households: + household: + members: [head, child] + state_code: TX + output: + # The parent's ESI flag counts; the dependent's offer or enrollment + # flag does not. The parent has no self-employed premiums: base = 0. + # Half of the child's SE tax: 3,000 x 0.9235 x 0.153 / 2 = 211.94325. + # Earned income limit: 3,000 - 211.94325 = 2,788.05675. + # The child's base is 1,000; min(1,000, 2,788.05675) = 1,000. + self_employed_health_insurance_employer_plan_eligible: [true, false] + self_employed_health_insurance_premiums: [0, 1_000] + self_employed_health_insurance_ald_person: [0, 1_000] + +- name: A dependent's ESI flag leaves premiums for their own policy deductible. + period: 2025 + input: + people: + head: + age: 50 + employment_income: 80_000 + has_esi: true + child: + age: 22 + is_tax_unit_dependent: true + is_full_time_student: true + is_self_employed: true + self_employment_income: 3_000 + health_insurance_premiums: 1_000 + has_esi: true + tax_units: + tax_unit: + members: [head, child] + households: + household: + members: [head, child] + state_code: TX + output: + # The parent's ESI flag counts; the dependent's offer or enrollment + # flag does not. The parent has no self-employed premiums: base = 0. + # Half of the child's SE tax: 3,000 x 0.9235 x 0.153 / 2 = 211.94325. + # Earned income limit: 3,000 - 211.94325 = 2,788.05675. + # The child's base is 1,000; min(1,000, 2,788.05675) = 1,000. + self_employed_health_insurance_employer_plan_eligible: [true, false] + self_employed_health_insurance_premiums: [0, 1_000] + self_employed_health_insurance_ald_person: [0, 1_000] + +- name: A dependent's own employer contribution bars their deduction without barring the parent. + period: 2025 + input: + people: + head: + age: 50 + employment_income: 80_000 + child: + age: 22 + is_tax_unit_dependent: true + is_full_time_student: true + is_self_employed: true + self_employment_income: 3_000 + health_insurance_premiums: 1_000 + employer_contribution_to_health_insurance_premiums_category: SOME + tax_units: + tax_unit: + members: [head, child] + households: + household: + members: [head, child] + state_code: TX + output: + # The parent has no coverage flags and no self-employed premiums. + # SOME establishes the dependent's own employer contribution, so + # their 1,000 of premiums yield a base of 0 and a deduction of 0. + # Half of SE tax: 3,000 x 0.9235 x 0.153 / 2 = 211.94325. + # The earned income limit, 3,000 - 211.94325 = 2,788.05675, + # exceeds the base; min(0, 2,788.05675) = 0. + self_employed_health_insurance_employer_plan_eligible: [false, true] + self_employed_health_insurance_premiums: [0, 0] + self_employed_health_insurance_ald_person: [0, 0] diff --git a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py index 2d5cf440b9b..c56cca7621c 100644 --- a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py +++ b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py @@ -2,26 +2,29 @@ 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1 leave out premiums for any month the taxpayer is eligible for a subsidized plan of their own or their spouse's -employer. The model's inputs are annual, so a person who has or is offered -employer coverage (`has_esi`, `offered_aca_disqualifying_esi`), or whose -employer pays some or all of the premiums, is eligible for the year, and so is -the other of the head and spouse on a joint return. A tax unit dependent is -barred only by their own coverage, never by a parent's. +employer. The model treats annual eligibility as full-year eligibility. For +the head and spouse, ESI, an offer or an employer contribution of SOME or ALL +counts as access through their own or their spouse's employer. Either filer's flags +bar both filers on a joint return. For tax unit dependents, only an employer +contribution of SOME or ALL counts; ESI and offer flags can describe a +parent's employer plan. Each batch places every drawn tax unit twice, once as drawn and once with every coverage flag cleared, and runs as one vectorized baseline simulation. For every tax unit and year: -1. Reference: each person's premium base equals a closed-form reference on - the inputs: the person's premiums if they are self-employed and neither - they nor (for the head and spouse) the other of the two is eligible, and 0 - otherwise. +1. Reference: each person's premium base follows the flag interpretation + above: their premiums if they are self-employed and neither their own + eligibility nor a spouse's eligibility bars them, and 0 otherwise. Only + the head and spouse can pass eligibility to each other. 2. Bounds: 0 <= deduction <= premium base <= premiums. 3. Monotone: clearing the coverage flags never lowers a person's premium base or deduction. -4. Differential: the flags move AGI only through the deduction, so the - twins' AGI difference equals the difference in the head's and spouse's - deductions. +4. Differential: the generated units have wages and self-employment income + only, so the twins' AGI difference equals the difference in the head's + and spouse's deductions. This identity does not hold in general. With + Social Security income, taxable benefits can also change when the + deduction changes, so AGI can move by a different amount. A deterministic grid runs every combination of the head's, the spouse's and a dependent's flags for a joint couple with a self-employed head. @@ -49,9 +52,9 @@ def every_year(value): return {year: value for year in YEARS} -def own_eligible(flags): - return ( - flags["has_esi"] or flags["offered"] or flags["contribution"] in EMPLOYER_PAYS +def own_eligible(flags, filer=True): + return flags["contribution"] in EMPLOYER_PAYS or ( + filer and (flags["has_esi"] or flags["offered"]) ) @@ -94,7 +97,7 @@ def build_situation(units): member["age"], member, member_flags, dependent=is_dependent ) for j, member in enumerate(members): - own = own_eligible(flags[j]) + own = own_eligible(flags[j], filers[j]) other_filer = any( own_eligible(flags[k]) for k in range(len(members)) @@ -140,8 +143,9 @@ def check_batch(units): drawn, cleared = ~twin, twin assert np.all(base[cleared] >= base[drawn] - TOLERANCE) assert np.all(deduction[cleared] >= deduction[drawn] - TOLERANCE) - # 4. Differential: AGI moves only through the head's and spouse's - # deductions, which `self_employed_health_insurance_ald` sums. + # 4. Differential: with wages and self-employment income only, + # AGI moves through the head's and spouse's deductions, which + # `self_employed_health_insurance_ald` sums. agi = sim.calculate("adjusted_gross_income", year) filer_deduction = sim.calculate("self_employed_health_insurance_ald", year) np.testing.assert_allclose( @@ -226,7 +230,11 @@ def member(age, self_employed, flags, premiums): "members": [ member(45, True, head, 6_000.0), member(43, False, spouse, 0.0), - member(19, False, dependent, 0.0), + # Half of SE tax: 50,000 x 0.9235 x 0.153 / 2 = 3,532.3875. + # Earned income limit: 50,000 - 3,532.3875 = 46,467.6125. + # A dependent's ESI flag leaves the 1,000 of premiums + # deductible: min(1,000, 46,467.6125) = 1,000. + member(19, True, dependent, 1_000.0), ], } for head, spouse, dependent in itertools.product( diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py index 720a8c29e41..ba3d37ab75d 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py @@ -6,18 +6,28 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): entity = Person label = "Eligible for a subsidized employer health plan (self-employed health insurance deduction)" documentation = ( - "Whether the person, or their spouse, is eligible for a subsidized " - "health plan of their employer, which bars the self-employed health " - "insurance deduction for the premiums (26 U.S.C. 162(l)(2)(B); Form " - "7206 line 1). The law applies the bar month by month; the inputs are " - "annual, so a person eligible at any point is treated as eligible for " - "the whole year. Two cases are not modeled. A spouse who files " - "separately is in another tax unit, and the model does not see their " - "employer's plan; it cannot use the filing status here, which depends " - "on dependents' incomes and so on this deduction, and the default " - "dataset has no married couple split across tax units. The plan of a " - "dependent's or under-27 child's employer bars the deduction only for " - "a taxpayer who can take part in it, and no input records that." + "Employer-plan eligibility that bars the self-employed health insurance " + "deduction under 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1. For the " + "head and spouse, the model reads has_esi, offered_aca_disqualifying_esi, " + "or employer contributions of SOME or ALL as access to a subsidized " + "plan of the person's own or spouse's employer. Either joint filer's " + "flags bar both filers. For tax unit dependents, only their own employer " + "contributions of SOME or ALL count. Their enrollment and offer flags " + "can describe a parent's employer plan: 26 CFR 1.36B-2(c)(3)(i)(A) " + "includes related individuals, while section 162(l)(2)(B) does not " + "list a parent's employer for the dependent's deduction. The inputs " + "identify neither the employer that maintains a plan nor its subsidy. " + "The model cannot distinguish an unsubsidized plan, a spouse's plan " + "the taxpayer cannot join, or a parent's plan for a nondependent filer, " + "such as a 25-year-old. An unaffordable subsidized offer can bar the " + "deduction even though offered_aca_disqualifying_esi leaves it out. " + "A QSEHRA counts only if entered through the contribution input. The " + "law applies the bar month by month; the model applies annual " + "eligibility to the whole year. It does not model a spouse who files " + "separately in another tax unit, or the taxpayer's access to a " + "dependent's or under-27 child's employer plan. Filing status depends " + "on dependents' incomes and this deduction, so reading it here would " + "create a cycle." ) definition_period = YEAR reference = ( @@ -25,13 +35,10 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): "https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1", # Line 1, first bullet "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=2", # Other coverage "https://www.irs.gov/pub/irs-prior/i1040gi--2022.pdf#page=88", # Line 17, before Form 7206 + "https://www.ecfr.gov/current/title-26/section-1.36B-2#p-1.36B-2(c)(3)(i)(A)", ) def formula(person, period, parameters): - # Enrolled in, or offered, employer coverage, or the employer pays some - # or all of the premiums. Enrollment and an offer each show the person - # can take part in the plan. An employer that pays premiums subsidizes - # the plan. contribution = person( "employer_contribution_to_health_insurance_premiums_category", period, @@ -40,16 +47,18 @@ def formula(person, period, parameters): employer_pays = (contribution == contribution_status.SOME) | ( contribution == contribution_status.ALL ) - own = ( - person("has_esi", period) - | person("offered_aca_disqualifying_esi", period) - | employer_pays - ) - # The plan of the spouse's employer also bars the deduction: on a joint - # return, the other of the head and spouse. A tax unit dependent's own - # deduction is not barred by the plan of a parent's employer, which - # the statute does not list. filer = person("is_tax_unit_head_or_spouse", period) + # Read filers' enrollment and offer flags as access through their own + # or spouse's employer. A dependent's flags can describe a parent's + # plan, so require their own employer's contribution instead. + own = employer_pays | ( + filer + & ( + person("has_esi", period) + | person("offered_aca_disqualifying_esi", period) + ) + ) + # Either joint filer's eligibility bars both filers. A dependent's + # employer contribution does not establish a parent's access. filer_own = own & filer - other_filer_eligible = person.tax_unit.sum(filer_own) > filer_own.astype(int) - return own | (filer & other_filer_eligible) + return own | (filer & person.tax_unit.any(filer_own)) From b184b86cdaef2e525f448ab46ebf5dccb3458f43 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 5 Nov 2026 21:25:29 -0500 Subject: [PATCH 5/8] Cover full employer contributions and long-term care premiums Co-Authored-By: Claude Opus 5.5 --- ...alth_insurance_employer_plan_eligible.yaml | 57 +++++++++++++++++++ ...alth_insurance_employer_plan_properties.py | 4 +- ...health_insurance_employer_plan_eligible.py | 53 ++++++++++------- 3 files changed, 90 insertions(+), 24 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml index dae51b737b1..a7793628cd5 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml @@ -297,3 +297,60 @@ self_employed_health_insurance_employer_plan_eligible: [false, true] self_employed_health_insurance_premiums: [0, 0] self_employed_health_insurance_ald_person: [0, 0] + +- name: An employer pays all premiums for a plan, so the filer's own-policy premiums do not count. + period: 2025 + input: + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + employer_contribution_to_health_insurance_premiums_category: ALL + output: + # ALL establishes employer support, so the filer excludes all 6,000. + # Half of SE tax: 50,000 x 0.9235 x 0.153 / 2 = 3,532.3875. + # The limit, 50,000 - 3,532.3875 = 46,467.6125, exceeds the base. + # The filer deducts min(0, 46,467.6125) = 0. + self_employed_health_insurance_employer_plan_eligible: true + self_employed_health_insurance_premiums: 0 + self_employed_health_insurance_ald_person: 0 + +- name: The spouse's medical plan bars medical premiums while long-term care premiums remain deductible. + period: 2025 + input: + people: + head: + age: 45 + is_self_employed: true + self_employment_income: 50_000 + health_insurance_premiums: 6_000 + long_term_health_insurance_premiums: 500 + spouse: + age: 43 + employment_income: 40_000 + has_esi: true + tax_units: + tax_unit: + members: [head, spouse] + marital_units: + marital_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_code: TX + output: + # The spouse's ESI bars both filers' medical premiums: line 1 = 0. + self_employed_health_insurance_employer_plan_eligible: [true, true] + self_employed_health_insurance_premiums: [0, 0] + # At age 45, the head's 2025 long-term care limit exceeds 500. + # Line 2 = 500; half of SE tax = 50,000 x 0.9235 x 0.153 / 2 + # = 3,532.3875; earned income limit = 46,467.6125. + # The head deducts min(0 + 500, 46,467.6125) = 500. + self_employed_health_insurance_ald_person: [500, 0] + self_employed_health_insurance_ald: 500 + # The head deducts 500 - min(0, 500) = 500 of long-term care premiums. + self_employed_health_insurance_ald_long_term_care_part: [500, 0] + # AGI = 50,000 + 40,000 - 3,532.3875 - 500 = 85,967.6125. + adjusted_gross_income: 85_967.61 + # Schedule A retains 6,000 + 500 - 500 = 6,000 before its floor. + itemized_medical_expenses: 6_000 diff --git a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py index c56cca7621c..4c2901ae567 100644 --- a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py +++ b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py @@ -26,8 +26,8 @@ Social Security income, taxable benefits can also change when the deduction changes, so AGI can move by a different amount. -A deterministic grid runs every combination of the head's, the spouse's and a -dependent's flags for a joint couple with a self-employed head. +The deterministic grid combines every head and spouse flag setting with a +dependent's ESI flag both clear and set, for a couple with a self-employed head. Sources: https://www.law.cornell.edu/uscode/text/26/162#l_2_B and https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1 (line 1). """ diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py index ba3d37ab75d..a7ac005f975 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py @@ -6,28 +6,37 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): entity = Person label = "Eligible for a subsidized employer health plan (self-employed health insurance deduction)" documentation = ( - "Employer-plan eligibility that bars the self-employed health insurance " - "deduction under 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1. For the " - "head and spouse, the model reads has_esi, offered_aca_disqualifying_esi, " - "or employer contributions of SOME or ALL as access to a subsidized " - "plan of the person's own or spouse's employer. Either joint filer's " - "flags bar both filers. For tax unit dependents, only their own employer " - "contributions of SOME or ALL count. Their enrollment and offer flags " - "can describe a parent's employer plan: 26 CFR 1.36B-2(c)(3)(i)(A) " - "includes related individuals, while section 162(l)(2)(B) does not " - "list a parent's employer for the dependent's deduction. The inputs " - "identify neither the employer that maintains a plan nor its subsidy. " - "The model cannot distinguish an unsubsidized plan, a spouse's plan " - "the taxpayer cannot join, or a parent's plan for a nondependent filer, " - "such as a 25-year-old. An unaffordable subsidized offer can bar the " - "deduction even though offered_aca_disqualifying_esi leaves it out. " - "A QSEHRA counts only if entered through the contribution input. The " - "law applies the bar month by month; the model applies annual " - "eligibility to the whole year. It does not model a spouse who files " - "separately in another tax unit, or the taxpayer's access to a " - "dependent's or under-27 child's employer plan. Filing status depends " - "on dependents' incomes and this deduction, so reading it here would " - "create a cycle." + "The model identifies people whose employer-plan eligibility bars " + "their Form 7206 line 1 deduction under 26 U.S.C. 162(l)(2)(B). For " + "the head and spouse, the model counts has_esi, " + "offered_aca_disqualifying_esi, or employer contributions of SOME or " + "ALL as access through their own or their spouse's employer. The " + "model bars both joint filers if either meets that test. For tax unit " + "dependents, the model counts only their own employer contributions " + "of SOME or ALL. It ignores their enrollment and offer flags because " + "those inputs can describe a parent's plan. Treasury includes related " + "individuals in employer offers under 26 CFR 1.36B-2(c)(3)(i)(A); " + "Congress does not list a parent's employer for the dependent's " + "deduction. The model assumes a subsidy when a filer has ESI or an " + "ACA-disqualifying offer, and assumes that each joint filer can join " + "the other's plan. The inputs identify neither the employer " + "maintaining a plan nor its subsidy or family eligibility. The model " + "cannot distinguish an unsubsidized plan, a spouse's plan the " + "taxpayer cannot join, or a parent's plan for a nondependent filer, " + "such as a 25-year-old. It misses unaffordable subsidized offers " + "because offered_aca_disqualifying_esi covers only affordable, " + "minimum-value offers. No input records a QSEHRA; the model counts " + "one only through the contribution category. Congress bars premiums " + "month by month; the model applies annual eligibility to the whole " + "year. The model cannot see a separately filing spouse in another tax " + "unit or establish the taxpayer's access to a dependent's or under-27 " + "child's employer plan. The model would create a cycle if it read " + "filing status here, because that status depends on dependents' " + "incomes and this deduction. Congress applies separate eligibility " + "tests to medical and long-term care plans under section " + "162(l)(2)(B)(i)-(ii). The model bars only line 1 premiums because no " + "input records employer long-term care plan eligibility; eligible " + "long-term care premiums still enter the deduction on line 2." ) definition_period = YEAR reference = ( From cdc49fb58a3bdfeabd8c92637e4f5b8e23c32321 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 14 Nov 2026 18:49:34 -0500 Subject: [PATCH 6/8] Document own-business health plans and coverage limits Distinguish partnership and shareholder premiums from unrelated employer support. Cover the S corporation inputs, retain the employer-plan bar, and describe the dependent and ACA input limits. Co-Authored-By: Claude Opus 5.5 --- ...alth_insurance_employer_plan_eligible.yaml | 61 +++++++++++++++++++ ...health_insurance_employer_plan_eligible.py | 20 +++++- ...n_to_health_insurance_premiums_category.py | 16 +++++ .../health/health_insurance_premiums.py | 14 ++++- ...employed_health_insurance_plan_business.py | 11 +++- ...self_employed_health_insurance_premiums.py | 32 ++++++---- 6 files changed, 137 insertions(+), 17 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml index a7793628cd5..8d4ad3aac02 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml @@ -354,3 +354,64 @@ adjusted_gross_income: 85_967.61 # Schedule A retains 6,000 + 500 - 500 = 6,000 before its floor. itemized_medical_expenses: 6_000 + +# Notice 2008-1, examples 2-4, and Form 7206 lines 1, 11 and 14: +# a more-than-2% shareholder can deduct premiums paid by their S corporation. +# The 66,000 of box 1 wages include 6,000 of premiums; box 5 excludes them. +- name: A shareholder deducts own-business premiums when coverage flags are clear. + period: 2025 + input: + is_self_employed: true + employment_income: 66_000 + s_corp_shareholder_medicare_wages: 60_000 + self_employed_health_insurance_plan_business: S_CORPORATION + health_insurance_premiums: 6_000 + employer_contribution_to_health_insurance_premiums_category: NONE + has_esi: false + offered_aca_disqualifying_esi: false + output: + self_employed_health_insurance_employer_plan_eligible: false + self_employed_health_insurance_premiums: 6_000 + self_employed_health_insurance_earned_income_limit: 60_000 + # Line 14 = min(6,000, 60,000) = 6,000; no self-employment tax. + self_employed_health_insurance_ald_person: 6_000 + # AGI = box 1 wages 66,000 - deduction 6,000 = 60,000. + adjusted_gross_income: 60_000 + +- name: An unrelated employer's contribution bars a shareholder's own-business premiums. + period: 2025 + input: + is_self_employed: true + employment_income: 66_000 + s_corp_shareholder_medicare_wages: 60_000 + self_employed_health_insurance_plan_business: S_CORPORATION + health_insurance_premiums: 6_000 + employer_contribution_to_health_insurance_premiums_category: ALL + output: + # ALL describes another employer's subsidized plan, not the corporation's + # own payment. Section 162(l)(2)(B) bars line 1; min(0, 60,000) = 0. + self_employed_health_insurance_employer_plan_eligible: true + self_employed_health_insurance_premiums: 0 + self_employed_health_insurance_earned_income_limit: 60_000 + self_employed_health_insurance_ald_person: 0 + adjusted_gross_income: 66_000 + +- name: The model bars a shareholder who sets ESI for their own S corporation's plan. + period: 2025 + input: + is_self_employed: true + employment_income: 66_000 + s_corp_shareholder_medicare_wages: 60_000 + self_employed_health_insurance_plan_business: S_CORPORATION + health_insurance_premiums: 6_000 + employer_contribution_to_health_insurance_premiums_category: NONE + has_esi: true + output: + # Known input limitation: has_esi does not identify whose plan covers the + # filer. The model bars line 1 even for the qualifying own-business plan, + # which Notice 2008-1 permits: base = 0; min(0, 60,000) = 0. + self_employed_health_insurance_employer_plan_eligible: true + self_employed_health_insurance_premiums: 0 + self_employed_health_insurance_earned_income_limit: 60_000 + self_employed_health_insurance_ald_person: 0 + adjusted_gross_income: 66_000 diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py index a7ac005f975..17ed94524f4 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py @@ -17,7 +17,23 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): "those inputs can describe a parent's plan. Treasury includes related " "individuals in employer offers under 26 CFR 1.36B-2(c)(3)(i)(A); " "Congress does not list a parent's employer for the dependent's " - "deduction. The model assumes a subsidy when a filer has ESI or an " + "deduction. The model misses a dependent's own subsidized employer " + "enrollment or offer without contributions of SOME or ALL. Entering " + "a parent's family-plan contribution on the dependent instead bars " + "the dependent, because the model reads it as their own employer's " + "contribution. A qualifying plan established by the person's own " + "partnership, or S corporation in which they own more than 2%, does " + "not trigger the statutory employer-plan bar (sections 162(l)(5) " + "and 1372(a); Notice 2008-1). Enter that business's eligible premium " + "payments or reimbursements in health_insurance_premiums, without " + "recording those payments as employer contributions of SOME or ALL. " + "Setting has_esi or offered_aca_disqualifying_esi for that plan still " + "bars a filer's deduction in the model, because the inputs cannot " + "distinguish it from another employer's plan. Retain flags for " + "subsidized coverage through an unrelated employer. Keep coverage " + "flags accurate for ACA calculations; the current inputs cannot " + "represent every own-business plan for both calculations. " + "The model assumes a subsidy when a filer has ESI or an " "ACA-disqualifying offer, and assumes that each joint filer can join " "the other's plan. The inputs identify neither the employer " "maintaining a plan nor its subsidy or family eligibility. The model " @@ -45,6 +61,8 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=2", # Other coverage "https://www.irs.gov/pub/irs-prior/i1040gi--2022.pdf#page=88", # Line 17, before Form 7206 "https://www.ecfr.gov/current/title-26/section-1.36B-2#p-1.36B-2(c)(3)(i)(A)", + # PDF pages 3-4: own-business plans and the other-coverage condition + "https://www.irs.gov/pub/irs-drop/n-08-01.pdf#page=3", ) def formula(person, period, parameters): diff --git a/policyengine_us/variables/household/expense/health/employer_contribution_to_health_insurance_premiums_category.py b/policyengine_us/variables/household/expense/health/employer_contribution_to_health_insurance_premiums_category.py index 6ca48d23a44..d7daa46f69f 100644 --- a/policyengine_us/variables/household/expense/health/employer_contribution_to_health_insurance_premiums_category.py +++ b/policyengine_us/variables/household/expense/health/employer_contribution_to_health_insurance_premiums_category.py @@ -15,3 +15,19 @@ class employer_contribution_to_health_insurance_premiums_category(Variable): definition_period = YEAR possible_values = EmployerPremiumContribution default_value = EmployerPremiumContribution.NONE + documentation = ( + "The share of health insurance premiums paid by the person's employer. " + "For the self-employed health insurance deduction, enter a qualifying " + "plan's payments or reimbursements from the person's own partnership " + "or S corporation in health_insurance_premiums, without recording " + "those payments as employer contributions of SOME or ALL. This S " + "corporation treatment applies to shareholders who own more than 2%. " + "Retain contributions from an unrelated employer. See " + "self_employed_health_insurance_employer_plan_eligible for the " + "remaining coverage-flag limitations." + ) + reference = ( + "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=1", + # PDF pages 3-4 + "https://www.irs.gov/pub/irs-drop/n-08-01.pdf#page=3", + ) diff --git a/policyengine_us/variables/household/expense/health/health_insurance_premiums.py b/policyengine_us/variables/household/expense/health/health_insurance_premiums.py index 2dd3643c801..96b74e2e394 100644 --- a/policyengine_us/variables/household/expense/health/health_insurance_premiums.py +++ b/policyengine_us/variables/household/expense/health/health_insurance_premiums.py @@ -13,10 +13,20 @@ class health_insurance_premiums(Variable): uprating = "calibration.gov.hhs.cms.direct_purchase_premium_per_enrollee" documentation = ( "Annual person-paid health insurance premiums supplied directly as an " - "input, excluding premiums paid through pretax payroll deductions and " - "employer-paid premiums. Pretax payroll payments belong only in " + "input. Include eligible premium payments or reimbursements from " + "the person's own partnership or S corporation in which they own " + "more than 2%, as described in " + "self_employed_health_insurance_plan_business. The model treats " + "those payments as the person's own premiums. Exclude other " + "employer-paid premiums and pretax payroll deductions. Pretax " + "payroll payments belong only in " "pre_tax_health_insurance_premiums; the two sets are disjoint and total " "person-paid premiums equal their sum. This direct non-pretax amount is " "an alternative to the applicable decomposed non-pretax inputs, not an " "additional expense." ) + reference = ( + "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=1", + # PDF pages 3-4 + "https://www.irs.gov/pub/irs-drop/n-08-01.pdf#page=3", + ) diff --git a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_plan_business.py b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_plan_business.py index ce86f4cde10..21317654907 100644 --- a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_plan_business.py +++ b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_plan_business.py @@ -35,7 +35,16 @@ class self_employed_health_insurance_plan_business(Variable): "counts as established under the partnership or S corporation only " "when that business pays or reimburses the premiums and reports them " "as guaranteed payments or wages; enter those premiums in " - "health_insurance_premiums. A partner also includes those guaranteed " + "health_insurance_premiums. Do not record that business's payment " + "as an employer contribution of SOME or ALL for the self-employed " + "health insurance deduction. Setting has_esi or " + "offered_aca_disqualifying_esi for that plan still bars a filer's " + "deduction in the model; the inputs cannot distinguish it from " + "another employer's plan. Retain eligibility flags and contributions " + "for an unrelated employer's subsidized plan. Keep coverage flags " + "accurate for ACA calculations; the current inputs cannot represent " + "every own-business plan for both calculations. A partner also " + "includes those guaranteed " "payments in partnership_income, and in " "partnership_self_employment_net_earnings when the partnership " "reports them in K-1 box 14 code A; a shareholder includes the wages " diff --git a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py index aa2449ab2d5..ee62d18b999 100644 --- a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py +++ b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py @@ -7,25 +7,31 @@ class self_employed_health_insurance_premiums(Variable): label = "Self-employed health insurance premiums" unit = USD documentation = ( - "Health insurance premiums that count toward the self-employed health " - "insurance deduction (Form 7206 line 1), from the person-paid, " - "non-pretax health_insurance_premiums input. Excludes pretax payroll " - "deductions and employer-paid premiums; pretax payroll payments belong " - "only in pre_tax_health_insurance_premiums. The pretax and non-pretax " - "sets are disjoint. Premiums are left out when " - "the person, or their spouse on a joint return, is eligible for a " - "subsidized employer plan (26 U.S.C. 162(l)(2)(B)). Premiums are " - "taken as supplied: for a Marketplace plan, 26 U.S.C. 280C(g) allows " - "no deduction for the part the premium tax credit pays, and the model " - "does not net the credit it calculates out of these premiums: the " - "credit depends on AGI, and so on this deduction (policyengine-us " - "#10124)." + "The model takes Form 7206 line 1 premiums from the non-pretax " + "health_insurance_premiums input. It excludes pretax payroll " + "deductions and employer-paid premiums, except eligible payments or " + "reimbursements from the person's own partnership or S corporation " + "in which they own more than 2% (Notice 2008-1). Enter those " + "payments in health_insurance_premiums, without recording them as " + "employer contributions of SOME or ALL. Pretax payroll payments " + "belong only in pre_tax_health_insurance_premiums; the pretax and " + "non-pretax sets remain disjoint. The model excludes premiums when " + "self_employed_health_insurance_employer_plan_eligible holds. That " + "variable documents the annual coverage assumptions and the " + "own-business coverage flags that still trigger the model's bar. " + "Congress disallows a deduction for the part of Marketplace " + "premiums the premium tax credit pays under 26 U.S.C. 280C(g). " + "The model takes premiums as supplied and does not net the credit " + "it calculates out of them. Calculating the credit depends on AGI " + "and this deduction (policyengine-us #10124)." ) definition_period = YEAR defined_for = "is_self_employed" reference = ( "https://www.law.cornell.edu/uscode/text/26/162#l", "https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1", # Line 1 + # PDF pages 3-4 + "https://www.irs.gov/pub/irs-drop/n-08-01.pdf#page=3", ) def formula(person, period, parameters): From 74a3ac2e6bdf652da06cfff57346f2c18bbcb28a Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 14 Nov 2026 19:17:50 -0500 Subject: [PATCH 7/8] Clarify the statutory actors in health plan test comments Co-Authored-By: Claude Opus 5.5 --- ...elf_employed_health_insurance_employer_plan_eligible.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml index 8d4ad3aac02..b8af70640b2 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml @@ -389,7 +389,8 @@ employer_contribution_to_health_insurance_premiums_category: ALL output: # ALL describes another employer's subsidized plan, not the corporation's - # own payment. Section 162(l)(2)(B) bars line 1; min(0, 60,000) = 0. + # own payment. Congress bars line 1 under section 162(l)(2)(B); + # min(0, 60,000) = 0. self_employed_health_insurance_employer_plan_eligible: true self_employed_health_insurance_premiums: 0 self_employed_health_insurance_earned_income_limit: 60_000 @@ -409,7 +410,7 @@ output: # Known input limitation: has_esi does not identify whose plan covers the # filer. The model bars line 1 even for the qualifying own-business plan, - # which Notice 2008-1 permits: base = 0; min(0, 60,000) = 0. + # which the IRS permits in Notice 2008-1: base = 0; min(0, 60,000) = 0. self_employed_health_insurance_employer_plan_eligible: true self_employed_health_insurance_premiums: 0 self_employed_health_insurance_earned_income_limit: 60_000 From 36f945c6615b7f8d1d6d8c6c5832bdfabff0cfd9 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 15 Nov 2026 17:41:22 -0500 Subject: [PATCH 8/8] Cite partner sources and list every employer Congress names Congress bars the deduction for any month the taxpayer can join a subsidized plan of an employer of the taxpayer, their spouse, a dependent or a child under 27 (26 U.S.C. 162(l)(2)(B)), and the IRS repeats that list on Form 7206 line 1. The YAML header and the property-test docstring give the full list and say that the model covers the taxpayer's and spouse's employers. The own-business sentences cited S corporation sources for partners. They cite sections 162(l)(5) and 1372(a) and Notice 2008-1 for S corporations and the Form 7206 instructions for partners, and each reference tuple links page 1 of those instructions. Co-Authored-By: Claude Fable 5.2 --- ...yed_health_insurance_employer_plan_eligible.yaml | 7 ++++--- ...yed_health_insurance_employer_plan_properties.py | 13 +++++++------ ...loyed_health_insurance_employer_plan_eligible.py | 7 +++++-- .../self_employed_health_insurance_premiums.py | 5 ++++- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml index b8af70640b2..f6699e1a4c1 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.yaml @@ -1,6 +1,7 @@ -# 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1: premiums for any month the -# taxpayer is eligible for a subsidized plan of their own or their spouse's -# employer don't count toward the self-employed health insurance deduction. +# 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1 leave out premiums for any month +# the taxpayer can join a subsidized plan of an employer of the taxpayer, their +# spouse, a dependent or a child under 27. The model covers the taxpayer's and +# spouse's employers. # Profit of $50,000 keeps the earned income limit (Form 7206 line 13) above the # $6,000 of premiums, so the deduction equals the premiums that count. diff --git a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py index 4c2901ae567..32a1ea786a3 100644 --- a/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py +++ b/policyengine_us/tests/unit/test_self_employed_health_insurance_employer_plan_properties.py @@ -1,13 +1,14 @@ """Properties of the employer-plan bar on the self-employed health insurance deduction. 26 U.S.C. 162(l)(2)(B) and Form 7206 line 1 leave out premiums for any month -the taxpayer is eligible for a subsidized plan of their own or their spouse's -employer. The model treats annual eligibility as full-year eligibility. For +the taxpayer can join a subsidized plan of an employer of the taxpayer, their +spouse, a dependent or a child under 27. The model covers the taxpayer's and +spouse's employers and treats annual eligibility as full-year eligibility. For the head and spouse, ESI, an offer or an employer contribution of SOME or ALL -counts as access through their own or their spouse's employer. Either filer's flags -bar both filers on a joint return. For tax unit dependents, only an employer -contribution of SOME or ALL counts; ESI and offer flags can describe a -parent's employer plan. +counts as access through their own or their spouse's employer. Either filer's +flags bar both filers on a joint return. For tax unit dependents, only an +employer contribution of SOME or ALL counts; ESI and offer flags can describe +a parent's employer plan. Each batch places every drawn tax unit twice, once as drawn and once with every coverage flag cleared, and runs as one vectorized baseline simulation. For diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py index 17ed94524f4..fd7aebe9ab9 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/self_employed_health_insurance_employer_plan_eligible.py @@ -23,8 +23,9 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): "the dependent, because the model reads it as their own employer's " "contribution. A qualifying plan established by the person's own " "partnership, or S corporation in which they own more than 2%, does " - "not trigger the statutory employer-plan bar (sections 162(l)(5) " - "and 1372(a); Notice 2008-1). Enter that business's eligible premium " + "not trigger the statutory employer-plan bar (sections 162(l)(5) and " + "1372(a) and Notice 2008-1 for S corporations; the Form 7206 " + "instructions for partners). Enter that business's eligible premium " "payments or reimbursements in health_insurance_premiums, without " "recording those payments as employer contributions of SOME or ALL. " "Setting has_esi or offered_aca_disqualifying_esi for that plan still " @@ -58,6 +59,8 @@ class self_employed_health_insurance_employer_plan_eligible(Variable): reference = ( "https://www.law.cornell.edu/uscode/text/26/162#l_2_B", "https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1", # Line 1, first bullet + # Plans established under a partnership or an S corporation + "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=1", "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=2", # Other coverage "https://www.irs.gov/pub/irs-prior/i1040gi--2022.pdf#page=88", # Line 17, before Form 7206 "https://www.ecfr.gov/current/title-26/section-1.36B-2#p-1.36B-2(c)(3)(i)(A)", diff --git a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py index ee62d18b999..e9194938bc5 100644 --- a/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py +++ b/policyengine_us/variables/household/expense/health/self_employed_health_insurance_premiums.py @@ -11,7 +11,8 @@ class self_employed_health_insurance_premiums(Variable): "health_insurance_premiums input. It excludes pretax payroll " "deductions and employer-paid premiums, except eligible payments or " "reimbursements from the person's own partnership or S corporation " - "in which they own more than 2% (Notice 2008-1). Enter those " + "in which they own more than 2% (Notice 2008-1 for S corporations; " + "the Form 7206 instructions for partners). Enter those " "payments in health_insurance_premiums, without recording them as " "employer contributions of SOME or ALL. Pretax payroll payments " "belong only in pre_tax_health_insurance_premiums; the pretax and " @@ -30,6 +31,8 @@ class self_employed_health_insurance_premiums(Variable): reference = ( "https://www.law.cornell.edu/uscode/text/26/162#l", "https://www.irs.gov/pub/irs-prior/f7206--2025.pdf#page=1", # Line 1 + # Plans established under a partnership or an S corporation + "https://www.irs.gov/pub/irs-prior/i7206--2025.pdf#page=1", # PDF pages 3-4 "https://www.irs.gov/pub/irs-drop/n-08-01.pdf#page=3", )