Skip to content

Let farm, partnership and S corporation plans set the self-employed health insurance limit - #10120

Draft
MaxGhenis wants to merge 5 commits into
fix-sehi-earned-income-limitfrom
sehi-plan-business-base
Draft

MaxGhenis wants to merge 5 commits into
fix-sehi-earned-income-limitfrom
sehi-plan-business-base

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

WIP. Stacked on #10109 (fix-sehi-earned-income-limit); retargets to main when #10109 merges.

Problem

#10109's self_employed_health_insurance_earned_income_limit (Form 7206 lines 4–13) treats the person's Schedule C business (total_self_employment_income) as the only business under which a health plan can be established. The law and Form 7206 allow more:

  • 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."
  • 162(l)(5)(A): for an individual treated as a partner under section 1372(a) (a more-than-2% S corporation shareholder), "such individual's wages (as defined in section 3121) from the S corporation shall be treated as such individual's earned income."
  • Form 7206 instructions (2023), p. 1 list who qualifies: a net profit on Schedule C or Schedule F, a partner with net earnings on Schedule K-1 box 14 code A, or wages from an S corporation in which the person is a more-than-2% shareholder. A Schedule C or F policy can be in the business's or the individual's name.
  • One plan, one business. The form says "Use a separate Form 7206 for each trade or business under which an insurance plan is established." The instructions add: "If you have more than one health plan during the year and each plan is established under a different business, you must use a separate Form 7206 to figure each plan's net earnings limit," entering "your net profit (or wages) from that business on line 4 (or line 11)."

On #10109, a farmer or partner whose only self-employment income is Schedule F profit or K-1 box 14 code A earnings gets a $0 deduction however large their premiums. Example (2024): farm profit $20,000 and premiums $25,000 give $0, where Form 7206 gives $18,587.05.

Change

  • New input self_employed_health_insurance_plan_business (Person enum: SCHEDULE_C, SCHEDULE_F, PARTNERSHIP, S_CORPORATION, default UNSPECIFIED). It names the business under which the plan is established. The UNSPECIFIED default follows the tax_unit_role_input pattern.
  • New input s_corp_shareholder_medicare_wages (Form 7206 line 11). These are box 5 Medicare wages from an S corporation in which the person is a more-than-2% shareholder. They are part of employment_income, not in addition to it, and are net of any section 911 exclusion (line 12), like the other income inputs.
  • self_employed_health_insurance_earned_income_limit computes line 13 for each business:
    • Schedule C: total_self_employment_income.
    • Schedule F: farm_operations_income.
    • Partnership: partnership_self_employment_net_earnings.
    • Line 4 is that business's profit, floored at 0.
    • Lines 5–8: line 5 adds the three profits, leaving out losses. Each business takes Schedule 1 line 15 × its share of line 5, so the shares across businesses sum to line 15.
    • Lines 9–10: subtract Schedule 1 line 16 only from the Schedule C business. The model bases self_employed_pension_contribution_ald_person on Schedule C income, and Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 keeps Schedule C as the retirement plan's business.
    • S corporation: line 11 wages.
    • A named business selects its own amount.
    • UNSPECIFIED takes the largest of the four.

The default: why the largest business

PE has one premium input per person and no data on which business the plan sits under, so the default is a methodology choice:

  • Largest business (chosen). One plan is limited to one business's earned income, and health_insurance_premiums is one amount, most naturally one policy. A Schedule C or F filer can hold the policy in their own name under either business. A filer able to choose would pick the business with the larger limit.
  • Never lower than Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109. The largest is at least the Schedule C amount, so no deduction falls.
  • All businesses combined (rejected). Summing the businesses' limits would let one policy pool earned income across businesses, which the form forbids. That sum is reachable only with separate plans under separate businesses, with premiums split in proportion to each limit. It is an upper bound, not a default.

The impact section reports both readings.

Unchanged: line 2 (long-term care, a separate follow-up), 162(l)(2)(B) subsidized-employer-plan months, the premium tax credit interaction, and the is_self_employed gate on self_employed_health_insurance_premiums. The S corporation path, like every other path, needs is_self_employed; the input's documentation says so.

Invariants

These hold for every input and are tested with Hypothesis in tests/unit/test_self_employed_health_insurance_properties.py. Each drawn filer appears six times in one vectorized simulation over 2022, 2024 and 2026: with no named business, with higher premiums, and once naming each of the four businesses.

  1. Reference. Each named-business limit equals an independent closed-form Form 7206 line 13 for that business, with lines 15 and 16 taken from the model. Line 15 = ½ × SE tax. The unnamed limit is the largest of the four.
  2. Differential. The unnamed limit equals the largest of the model's own named-business limits.
  3. Bounds.
  4. Premiums. Raising premiums by d raises the deduction by between 0 and d, and the limit does not depend on premiums.
  5. AGI floor. For a filer with no business losses whose income is wages and self-employment income, AGI ≥ min(0, Schedule C line 10 before its floor).

The strategies draw losses in each business, S corporation wages, wages above the Social Security wage base, the $400 threshold, and large plan deductions. A local 300-example random sweep (1,779 filers, 6 copies each, 3 years) also passed. Hypothesis first failed on a float32 artifact: the model's $235,213.42 against the reference's $235,213.44, where the float32 spacing is $0.0156. The bound checks now carry a 1e-6 relative tolerance alongside the $0.01 absolute one.

Tests

  • Limit YAML (self_employed_health_insurance_earned_income_limit.yaml, 17 cases): 9 new cases plus Case 8 rewritten. Expected values are hand-computed from Form 7206.
    • Farm only.
    • Partnership only.
    • A larger farm beside a Schedule C business.
    • A named Schedule C business, and a named farm.
    • A Schedule C plan deduction that leaves the partnership larger.
    • S corporation wages, with and without a named Schedule C business.
    • A Schedule C loss beside a partnership.
  • ALD YAML (self_employed_health_insurance_ald.yaml, 10 cases): 4 new cases. Farm only and partnership only end with AGI 0; S corporation wages; a named farm.
  • Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109's Case 8 changes meaning. "A Schedule C loss leaves no limit" now names SCHEDULE_C, which still gives 0. The same inputs without a name give the partnership's $18,940.28 (new Case 9).
  • Fails on Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109. With the source files reverted in place to Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109's head 1bad2f16f6:
    • The limit file has 10 failures and 7 passes. The value cases fail by exactly the expected amounts: 0 vs 18,940.28, 18,587.05 and 27,880.57; 4,646.76 vs 37,174.09; 3,587.05 vs 9,293.52. The cases naming a business or using S corporation wages fail because those inputs are new.
    • The ALD file has 4 failures (0 vs 18,587.05 and 27,880.57, plus two new-input cases) and 6 passes.
  • Local runs at 47bba5e893, one file at a time:
    • limit YAML: 17 passed;
    • ALD YAML: 10 passed;
    • properties: 2 passed (12 Hypothesis examples, plus the fixed filers).

Impact

Pending: base (#10109 head), this PR, and the all-businesses-combined alternative on the default dataset for 2026 are queued under the shared heavy lock.

Review

Pending: independent review dispatched (subfleet run --task review --tier hard).

Follow-ups

axiom: us/statute/26/162/l queued (TheAxiomFoundation/rulespec-us#1676; to be extended for the plan business)

🤖 Generated with Claude Code

MaxGhenis and others added 5 commits October 11, 2026 16:15
…nd S corporation plans

Form 7206 allows the plan to be established under a Schedule F farm, a
partnership with K-1 box 14 code A earnings, or an S corporation in which
the person is a more-than-2% shareholder (162(l)(5), line 11), one form per
plan. Add self_employed_health_insurance_plan_business (default: the business
with the largest earned income) and s_corp_shareholder_medicare_wages.

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

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

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