Repository navigation
Conversation
…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 was referenced Oct 11, 2026
Draft
Draft
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
self_employed_health_insurance_ald_personreturned min(max(0, Schedule C net profit), premiums). The law caps the deduction at a smaller amount: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.
Change
self_employed_health_insurance_earned_income_limit(Person, Form 7206 lines 4–13):total_self_employment_income, floored at 0), treated as the business under which the plan is established, as before;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 sourcestaxable_self_employment_incometaxes;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;self_employed_health_insurance_ald_personis now min(premiums, limit) (line 14).health_insurance_premiums; a separate follow-up covers 213(d)(10).No circularity.
self_employment_taxreadstaxable_self_employment_incomeandsocial_security_taxable_self_employment_income, neither of which reads this deduction; 162(l)(4) keeps it out of net earnings.self_employed_pension_contributionsreads only its desired input andtotal_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.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
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.self_employment_income.yaml(SSTB $10,000 → 9,293.52);oh_medical_care_insurance_premiums.yamlandoh_uninsured_unreimbursed_medical_care_expenses.yaml($3,000 profit, $5,000 premiums → deduction 2,788.06, Ohio premiums 2,211.94).Consumers checked
These read the corrected amount and need no change:
gov.irs.ald.deductions,adjusted_gross_income_person);dependent_taxable_ss_magi,dependents_self_employed_health_insurance_ald;mo_adjusted_gross_income), MS (ms_self_employed_health_insurance_adjustment), NJ (nj_medical_expense_deduction, Worksheet F);id_qualified_health_insurance_premiums) and OH (oh_medical_care_insurance_premiums);al/tax/income/agi/deductions), MI (household resources);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)
self_employed_pension_contribution_limit) uses raw Schedule C profit, not 401(c) earned income (Pub. 560 reduced rate).axiom: us/statute/26/162/l queued (TheAxiomFoundation/rulespec-us#1676)
🤖 Generated with Claude Code