Skip to content

Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions - #10109

Draft
MaxGhenis wants to merge 4 commits into
mainfrom
fix-sehi-earned-income-limit
Draft

MaxGhenis wants to merge 4 commits into
mainfrom
fix-sehi-earned-income-limit

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem

self_employed_health_insurance_ald_person returned min(max(0, Schedule C net profit), premiums). The law caps the deduction at a smaller amount:

  • 26 U.S.C. 162(l)(2)(A). The deduction may not exceed "the taxpayer's earned income (within the meaning of section 401(c)) derived by the taxpayer from the trade or business with respect to which the plan providing the medical care coverage is established."
  • 401(c)(2)(A). Earned income is net earnings from self-employment determined "(v) with regard to the deductions allowed by section 404 to the taxpayer, and (vi) with regard to the deduction allowed to the taxpayer by section 164(f)."

Both texts were verified on 2026-10-11 at govinfo USCODE-2023.

The IRS computes this limit in three forms:

Example (2022). Schedule C profit $2,000, premiums $6,000.

  • Half of SE tax is 2,000 × 0.9235 × 0.153 / 2 = $141.30, so the limit is $1,858.70.
  • Main gives $2,000, which leaves AGI at −$141.30.

Change

  • New self_employed_health_insurance_earned_income_limit (Person, Form 7206 lines 4–13):
    • line 4: Schedule C net profit (total_self_employment_income, floored at 0), treated as the business under which the plan is established, as before;
    • lines 5–8: subtract the part of the deductible SE tax (self_employment_tax_ald_person, Schedule 1 line 15) attributable to that business, by its share of all profitable SE businesses. Line 5 is Schedule C + Schedule F (farm_operations_income) + K-1 box 14 A (partnership_self_employment_net_earnings), with losses left out. This is the same set of sources taxable_self_employment_income taxes;
    • lines 9–10: subtract self_employed_pension_contribution_ald_person (Schedule 1 line 16). The model bases that deduction on Schedule C income, so all of it is attributable to the plan business;
    • floored at 0.
  • self_employed_health_insurance_ald_person is now min(premiums, limit) (line 14).
  • Not modeled (documented in the variable):
    • S corporation wages (line 11);
    • qualified long-term care premiums (line 2). The SE premiums take only health_insurance_premiums; a separate follow-up covers 213(d)(10).
    • Form 2555 (line 12) is already reflected, because SE income inputs are net of the section 911 exclusion.

No circularity. self_employment_tax reads taxable_self_employment_income and social_security_taxable_self_employment_income, neither of which reads this deduction; 162(l)(4) keeps it out of net earnings. self_employed_pension_contributions reads only its desired input and total_self_employment_income.

Invariants

These hold for every input and are tested with Hypothesis in tests/unit/test_self_employed_health_insurance_properties.py. Each batch is one vectorized simulation over 2022, 2024 and 2026.

  1. The limit equals an independent closed-form Form 7206 computation (lines 4–13, with lines 15–16 taken as given), and line 15 = ½ × SE tax.
  2. 0 ≤ deduction ≤ premiums.
  3. Deduction ≤ Schedule C profit less the attributable SE tax deduction, which itself ≤ Schedule C profit.
  4. Raising premiums by d raises the deduction by between 0 and d (monotone, 1-Lipschitz), and the limit does not depend on premiums.
  5. For a filer whose only income is Schedule C profit, the deduction never makes AGI negative: AGI < 0 implies no deduction.

The strategies draw losses, the $400 threshold (434 vs 433 of profit), wages above the Social Security wage base, multiple businesses, and large plan deductions.

Tests

  • New YAML (expectations hand-computed from the forms):
    • self_employed_health_insurance_earned_income_limit.yaml, 8 cases: one business, plan deduction, farm and partnership proration, a farm loss, the wage base, the $400 threshold, a loss;
    • self_employed_health_insurance_ald.yaml, 6 cases, including the $2,000 example with AGI 0 and a couple.
  • Fails on main. With the source files reverted in place:
    • the 4 positive-deduction cases fail by exactly the expected amounts: 141.30; 4,412.96 (half SE tax + the $3,000 plan); 2,119.43; 211.94;
    • all 8 limit cases fail, because the variable is new;
    • the 2 guard cases (premiums under the limit, a loss) pass on main, as intended.
  • Updated expectations (premiums above the new limit):
    • self_employment_income.yaml (SSTB $10,000 → 9,293.52);
    • oh_medical_care_insurance_premiums.yaml and oh_uninsured_unreimbursed_medical_care_expenses.yaml ($3,000 profit, $5,000 premiums → deduction 2,788.06, Ohio premiums 2,211.94).
  • Local runs. RESULTS_PENDING

Consumers checked

These read the corrected amount and need no change:

  • federal AGI (gov.irs.ald.deductions, adjusted_gross_income_person);
  • the QBI deduction definition (199A(c)(1) reduction);
  • the Medicaid MAGI person map, dependent_taxable_ss_magi, dependents_self_employed_health_insurance_ald;
  • MO (mo_adjusted_gross_income), MS (ms_self_employed_health_insurance_adjustment), NJ (nj_medical_expense_deduction, Worksheet F);
  • the premium nets in ID (id_qualified_health_insurance_premiums) and OH (oh_medical_care_insurance_premiums);
  • SC (two-wage-earner subtractions), AL (al/tax/income/agi/deductions), MI (household resources);
  • every state that starts from federal AGI.

With a smaller deduction, consumers that net it from premiums (ID, OH, and Schedule A once #10055 lands) keep the premiums left over. Pub. 535 allows that: "any medical insurance payments not deductible on Schedule 1 … can be included as medical expenses on Schedule A".

Open PRs. #10055 (Schedule A excludes the SE deduction) and #9947 (Montana 2021–2023 lines 2–3, stacked on #10055) have two derived cases with $1,000 of profit whose expectations change: 1,000 → 929.35. Their conservation test also uses exact assert_array_equal. Values and fixes are posted on #10055 (comment); whichever lands second updates them. Montana's #9947 cases and the NJ cases are unaffected.

Impact

IMPACT_PENDING

Follow-ups (filed separately)

  • The self-employed plan contribution limit (self_employed_pension_contribution_limit) uses raw Schedule C profit, not 401(c) earned income (Pub. 560 reduced rate).
  • Plans under a farm or partnership business, and S corporation >2% shareholders (162(l)(5)), get no deduction.
  • 162(l)(2)(B) months eligible for an employer plan, and the premium tax credit interaction (Pub. 974).
  • Eligible long-term care premiums under 213(d)(10).

axiom: us/statute/26/162/l queued (TheAxiomFoundation/rulespec-us#1676)

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 11, 2026 13:07
…ncome

26 U.S.C. 162(l)(2)(A) caps the deduction at earned income within the
meaning of section 401(c), which section 401(c)(2)(A)(v) and (vi) reduce
by the section 404 plan deduction and the section 164(f) deduction for
half of self-employment tax. Form 7206 (and Pub. 535 Worksheet 6-A before
2023) subtracts the share of Schedule 1 line 15 attributable to the plan
business and the line 16 plan deduction from that business's net profit.
The model used net profit alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orm 7206

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eduction

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant