Skip to content

Let farm and partnership plans take the self-employed plan deduction - #10131

Draft
MaxGhenis wants to merge 11 commits into
sehi-plan-business-basefrom
se-plan-business-farm-partnership
Draft

MaxGhenis wants to merge 11 commits into
sehi-plan-business-basefrom
se-plan-business-farm-partnership

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Draft. Stacked on #10120 (sehi-plan-business-base, itself on #10109), with #10121 (fix-se-pension-earned-income-limit) merged in (d48dcd8). The diff also shows #10121's files until #10121 lands. Merge order: #10109 → #10120 → #10121 → this PR. This PR touches both #10121's pension variables and #10120's Form 7206 lines 9–10, so it must land last. Both owner sessions have agreed and are not changing those lines.

Problem

#10121's self_employed_pension_earned_income (Pub. 560 worksheet step 3) and #10120's Form 7206 lines 9–10 both assume the self-employed retirement plan is established under the person's Schedule C business. So:

  • A farmer or partner with no Schedule C income gets no line 16 deduction, however much they contribute. Example (2025): farm profit $100,000 and $100,000 of desired contributions gives $0; the Pub. 560 worksheet gives $42,087.04.
  • A plan covering a Schedule C business and a farm counts only the Schedule C earned income. Example: $60,000 Schedule C + $40,000 farm gives $34,652.23 instead of $42,087.04.
  • Form 7206 line 9 subtracts all of line 16 from the Schedule C business, even when the retirement plan sits elsewhere.

The law and the IRS forms allow these plans:

  • 26 U.S.C. 404(a)(8)(C): contributions are deductible up to "the earned income of such individual … derived from the trade or business with respect to which such plan is established". 401(c)(4): "An individual who owns the entire interest in an unincorporated trade or business shall be treated as his own employer. A partnership shall be treated as the employer of each partner."
  • Pub. 560 (2025) Deduction Worksheet step 1, p. 39: "Enter your net profit from Schedule C (Form 1040), line 31; Schedule F (Form 1040), line 34; or Schedule K-1 (Form 1065), box 14, code A."
  • Pub. 560 (2025) p. 7: "If you have more than one business, but only one has a retirement plan, only the earned income from that business is considered for that plan." Under Employer: "A sole proprietor is treated as its own employer for retirement plan purposes. However, a partner isn't an employer … the partnership is treated as the employer of each partner."
  • Form 7206 line 9: "Enter the amount, if any, from Schedule 1 (Form 1040), line 16, … attributable to the same trade or business in which the insurance plan is established." 162(l)(2)(A) limits the SE health deduction to earned income from the business under which the health plan is established.

Statute text was verified on 2026-10-11 against govinfo USCODE-2023 (§§ 401(c)(4), 404(a)(8), 414(c), 415(f), 415(h)).

Choosing the plan business when a person has several

New input self_employed_pension_plan_business (Person enum): SCHEDULE_C, SCHEDULE_F, PARTNERSHIP, or ALL (default): every business with a net profit has a plan, and their earned income adds up. A business with a net loss is left out, so it doesn't reduce the plan's earned income. A named business uses that business's earned income alone, as in Pub. 560's one-plan sentence.

Why ALL is the default:

  • It is the largest limit the law allows for the person's businesses. The limit is monotone in step 3, so the default is at least each named business's limit. It is therefore never below Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121's Schedule C-only limit. This is tested.
  • It is exact for a sole proprietor's own businesses. Under 401(c)(4) the individual is the employer of each of them, so a Schedule C business and a farm are one employer. 415(f)(1)(B) makes all of one employer's DC plans one plan with one dollar limit, and 414(c) makes businesses under common control one employer.
  • It is a lower bound when a partnership is a separate employer. A partnership not under common control with the person's own business is a different employer, and its plan has its own 415(c) dollar limit. 402(g) and 414(v) room stays per individual.
    • The model applies one dollar limit.
    • Below the dollar limit this makes no difference. Two plans with the deferral room split in proportion to earned income give exactly the combined worksheet amount, because the closed form is positively homogeneous in (L, room). By concavity no split gives more.
    • So the default understates the limit only when the combined dollar limit binds: in 2025 that takes at least $232,500 of combined earned income with full deferral room ($350,000 with none). The data has no control facts.

Defined benefit plans, Schedule SE line 1b (CRP payments) and the optional methods are still not modeled.

Form 7206 lines 9–10

Line 9 is the part of line 16 attributable to the health plan's business:

  • Retirement plan under one named business: all of line 16 is attributable to that business, and none to the others.
  • Retirement plan under several businesses (ALL): each covered business takes line 16 in proportion to its line 8 amount. Line 8 is net profit less that business's share of line 15, and these amounts sum to the retirement plan's earned income.

Neither the form nor its instructions say how to split one plan's deduction across businesses. The proportional split matches lines 5–8's split of line 15. It is also exactly what separate plans under each business would give, each contributing at the same rate (the homogeneity point above). Single-business filers are unchanged.

Intended consequence: some SE health deductions fall relative to #10120. Under #10120 + #10121 the retirement plan was Schedule C's by assumption, so a health plan under a farm or partnership subtracted none of line 16. With the ALL default, those businesses now carry their share.

  • This lowers the SE health deduction only when premiums exceed the reduced limit and the person has a plan deduction and more than one profitable business.
  • Example: Let farm, partnership and S corporation plans set the self-employed health insurance limit #10120's Case 15 (2023: Schedule C $20,000, partnership $10,000, $15,000 plan) goes from $9,293.52 to $8,587.05. Its old value is kept by naming self_employed_pension_plan_business: SCHEDULE_C (now in the test).
  • Rejected alternative: pick the retirement plan's business jointly with the health plan's business to maximize the sum of both deductions. The line 16 deduction would then depend on health premiums, and plan documents are fixed before premiums are known. The named input covers filers who know their arrangement.

Change

  • New self_employed_pension_plan_business (input, default ALL).
  • self_employed_pension_earned_income (step 1–3): the plan businesses' net profit less their share of Schedule 1 line 15, split by net profit as on Form 7206 lines 5–8. With ALL this is the combined profit less all of line 15.
  • self_employed_pension_contribution_limit: formula unchanged; the docstring and references now cover the employer and dollar-limit points (414(c), 415(f), 415(h)).
  • self_employed_health_insurance_earned_income_limit (Let farm, partnership and S corporation plans set the self-employed health insurance limit #10120): line 9 is now each business's share of line 16, as above.

No circularity. The pension variables read SE income, line 15, the new input and the deferral variables. The SE health limit reads the pension deduction and pension earned income, never the reverse. Neither reads AGI or premiums.

Consumers checked; none needs a change:

Invariants

Tested with Hypothesis.

  • Pension (test_self_employed_pension_limit_properties.py). Every drawn filer runs once per plan business, over 2022, 2025 and 2026.
    1. Step 3 and the limit equal a literal Pub. 560 worksheet, maximized over deferral and catch-up grids, with IRS-published amounts; step 1 is the plan businesses' profit.
    2. Bounds: 0 ≤ deduction ≤ earned income ≤ the plan businesses' profit, and the limit ≤ dollar limit + catch-up.
    3. AGI ≥ 0 for any filer whose only income is self-employment profit with no losses (now including farm and partnership).
    4. Differential across plan businesses: ALL earned income = the sum of the named businesses' earned income; max(named limits) ≤ ALL limit ≤ sum(named limits); the ALL deduction ≥ the Schedule C deduction (never below Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121).
    5. A grid checks that the limit rises with farm profit.
  • Form 7206 (test_self_employed_health_insurance_properties.py, Let farm, partnership and S corporation plans set the self-employed health insurance limit #10120's, extended). Filers draw a retirement plan business.
    1. The reference line 9 is the proportional share, and the line 9 amounts add up to line 16.
    2. The model's pension earned income equals the reference sum of line 8 over the plan's businesses.
    3. Property 5 tightens to AGI ≥ 0 for any filer with no business losses, because line 16 never exceeds the retirement plan's earned income and the health business subtracts its share.
  • Mutations, each caught (log: ~/reviews/se-plan-business-2026-10/tests/mutations.log):
    • line 9 back to "all on Schedule C";
    • the default plan back to Schedule C only;
    • line 9 ignoring the named retirement plan business;
    • the default netting business losses.

Tests

  • self_employed_pension_contribution_limit.yaml. 8 new cases: farm only, partnership only, Schedule C + farm by default, a named farm, a named partnership, a farm loss outside the plan, a named farm with a loss, and one dollar limit across two businesses. Two Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 cases now name SCHEDULE_C to keep their meaning.

  • self_employed_pension_contribution_ald.yaml. Farm-only and partnership-only filers deduct $18,587.05 and end at AGI 0.

  • self_employed_health_insurance_earned_income_limit.yaml. Case 15 names SCHEDULE_C. New cases:

    • 18: ALL splits line 16 2/3 : 1/3, giving 8,587.045;
    • 19: retirement plan under the partnership, giving 18,587.045;
    • 20: a farm's own plan, giving 15,587.045;
    • 21: a health plan under the farm subtracting its 1,000 share, giving 8,293.5225.
  • self_employed_health_insurance_ald.yaml. Case 11: a farmer with both plans ends at AGI 0.

  • Expected values were computed independently of the model (~/reviews/se-plan-business-2026-10/tests/expected.py).

  • Fails on the base (source files reverted in place to d48dcd8, tests kept; logs in ~/reviews/se-plan-business-2026-10/fails-on-base/):

    File Fail Pass Failing cases
    limit 8 18 value cases, e.g. farm only 0 vs 92,935.22 and Schedule C + farm 55,761.14 vs 92,935.22; the rest stop at the new input
    pension ALD 2 3 0 vs 18,587.045
    SEHI limit 5 16 e.g. 9,293.52 vs 8,293.52; plan deduction 0 vs 3,000
    SEHI ALD 1 10 —

    The guards that pass on the base are a farm loss outside the plan and one dollar limit across businesses.

  • Local runs at c140181, one file at a time:

    • limit YAML: 26 passed;
    • pension ALD YAML: 5 passed;
    • SEHI limit YAML: 21 passed;
    • SEHI ALD YAML: 11 passed;
    • pension properties: 7 passed;
    • SEHI properties: 2 passed;
    • consumer files with plan contributions next to farm or partnership income, all unchanged: qualified_business_income.yaml 8, sstb_qualified_business_income.yaml 7, az_property_tax_credit_income.yaml 38, mi_household_resources.yaml 48, ira_compensation.yaml 12, test_ira_formula_differential.py 6, test_ira_invariants.py 18;
    • code health (reference URLs, dead URLs, cached-array writes, uprating placement, variable names): all pass.

Impact

Data reach (inputs only, certified populace_us_2024, 2024 values):

  • Microcosm gives self_employed_pension_contributions_desired only to people with Schedule C profit: 1,654 records, 5.38M weighted, $1.37bn. None have farm or partnership income without Schedule C profit, so the farm-only and partner-only gains do not appear in the data.
  • 191 records (0.77M weighted) have contributions and Schedule C profit plus farm or partnership profit. For them, the default can raise the limit.
  • 16 records (65k weighted) have SE health premiums, a plan deduction and more than one profitable business. For them, line 9 can move.
  • No record has a partnership beside its own business with contributions above $70,000, so the one-dollar-limit simplification binds for no one.
  • The data-side widening is a separate follow-up (chip), next to microcosm#1117 item B1.

IMPACT_PENDING. A base (d48dcd8) vs PR (c140181) pair for 2026 on the default dataset is queued under the shared heavy lock.

Review

REVIEW_PENDING (subfleet run --task review --tier hard).

axiom: pending. Addenda are drafted for TheAxiomFoundation/rulespec-us#1676 (162(l) line 9) and #1682 (404(a)(8) plan business); they will be posted after the review.

🤖 Generated with Claude Code

PavelMakarchuk and others added 11 commits October 11, 2026 14:40
…0012)

TAXSIM-35 v17 is 'Itemized Deductions in taxable income', 0 for a filer
who takes the standard deduction. The emulator maps v17 to
itemized_taxable_income_deductions, the potential amount, which differs
from TAXSIM in 12,308 of 15,000 CPS comparison records.

Co-authored-by: PavelMakarchuk <pavel@axiom.org>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#9902 made il_aabd_expense_exemption_person count only the person's own
withholding, so it no longer adds the tax-unit state_withheld_income_tax.
test_known_violations_only_shrink (#9897) then fails on main because the
entry is still listed in KNOWN_VIOLATIONS. Remove it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The limit used 100% of Schedule C net profit. Plan compensation for a
self-employed person is 401(c)(2) earned income, net of the deductible
part of self-employment tax and of the plan deduction itself, and
404(a)(8)(C) caps the deduction at that earned income before the plan
deduction (Pub. 560 Deduction Worksheet for Self-Employed).

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The farm and partnership plan business change builds on both the Pub. 560
plan limit (#10121) and the Form 7206 plan business choice (#10120).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
self_employed_pension_earned_income (Pub. 560 worksheet steps 1-3) now uses
the business or businesses under which the plan is established: by default
every profitable Schedule C, Schedule F and partnership business, or one
business named by the new self_employed_pension_plan_business input. 404(a)(8)(C)
limits the deduction to earned income from the plan's business; Pub. 560 step 1
allows Schedule F and K-1 box 14 code A profit.

Form 7206 lines 9-10 now subtract only the part of Schedule 1 line 16
attributable to each business, in proportion to its earned income.

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

Pension limit: farm only, partnership only, both businesses by default, a
named farm or partnership, a farm loss, and one dollar limit across
businesses. Two existing cases now name the Schedule C business to keep their
meaning. Form 7206: line 9 split by earned income, a retirement plan under
the partnership or the farm, and a farmer with AGI of zero.

Step 3 again subtracts the plan businesses' share of line 15, which is exact
in float32 for one business.

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

Pension: every drawn filer runs under each plan business; the reference's step
1 is the plan businesses' net profit; the default's earned income is the sum
of the named businesses', its limit is between their largest and their sum,
and it never lowers the deduction from a Schedule C plan. AGI stays at or above
zero for any filer with only self-employment profit, and a farm grid checks the
limit rises with farm profit.

Form 7206: filers draw a retirement plan business; line 9 is each business's
share of line 16 by line 8, and the shares add up to line 16. Property 5
tightens to AGI >= 0 for filers with no business losses.

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.

2 participants