Repository navigation
Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions - #10109
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>
…expectations - The property test now computes Schedule 1 line 15 from Schedule SE (0.9235, the $400 floor, the wage base, 12.4% and 2.9%) instead of reading it from the model, draws SSTB Schedule C income, and allows float32 rounding (rtol 1e-6) on top of the cent tolerance. - The limit's documentation states that SSTB and non-SSTB Schedule C income are one plan business and that Schedule 1 line 15 is read per person; YAML cases pin both the SSTB netting and a plan deduction that floors the limit at zero. - YAML comments name Schedule 1 lines 15 and 16, and the deduction file's header names Pub. 535 Worksheet 6-A as what Form 7206 replaced. - Tests merged since the branch was cut move with the corrected limit: two Schedule A cases from #10055 (1,000 -> 929.35225), the conservation check's exact equality (now a cent), and the Michigan comment and deduction assertion (3,000 -> 2,788.05675; Michigan resources unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-2 review: add YAML cases for spouses on either side of the Social Security wage base (each uses their own Schedule 1 line 15) and for a dependent whose deduction is capped by their own earned income and stays off the filer's return, and pass rtol=0 so the conservation check allows exactly a cent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off to the US + core hub (per
🤖 Generated with Claude Code |
|
US + core hub merge audit, us#10109 at
|
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. SSTB and non-SSTB Schedule C income count as one business, so a loss in one reduces line 4 (stated in the variable; Let farm, partnership and S corporation plans set the self-employed health insurance limit #10120 takes up the choice of plan business);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. That deduction's own cap is loose (100% of Schedule C profit rather than Pub. 560's maximum; Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 fixes it), so a hand-entered contribution above the legal maximum now also cuts this limit. The default dataset has 7 such records and in none of them does it change the deduction;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
Properties 1–4 hold for every input; property 5 holds for the generated filers. All 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, SSTB and non-SSTB Schedule C income of either sign, the $400 threshold (434 vs 433 of profit), wages above the Social Security wage base, multiple businesses, and large plan deductions. Comparisons allow float32 rounding (rtol 1e-6) on top of a cent.
Tests
self_employed_health_insurance_earned_income_limit.yaml, 10 cases: one business, plan deduction, farm and partnership proration, a farm loss, the wage base, the $400 threshold, a loss, a plan deduction that floors the limit at 0, and an SSTB loss netted against non-SSTB profit;self_employed_health_insurance_ald.yaml, 8 cases, including: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);medical_expense_deduction.yaml, two cases from Exclude SE health insurance deductions from Schedule A medical expenses #10055 ($1,000 profit, $6,000 premiums → deduction 929.35, Schedule A 5,570.65, medical deduction 3,320.65);test_mi_household_resources_exclusions.py(deduction 3,000 → 2,788.06; Michigan resources unchanged, as its comment predicted) and the matching comment inmi_household_resources.yaml;test_medical_expense_premium_conservation.py(Exclude SE health insurance deductions from Schedule A medical expenses #10055): Schedule A premium use + deduction = premiums paid now holds to a cent instead of exactly, because the derived deduction has cents.medical_expense_deduction.yaml(11),mi_household_resources.yaml(67),self_employment_income.yaml(9), both Ohio files (5 and 10),test_medical_expense_premium_conservation.py(5) andtest_mi_household_resources_exclusions.py(9) all pass. After the round-2 review I reran the deduction YAML (8 cases) and the conservation test (5), and both pass. The remaining files that read SE income and premiums are left to CI: the host's heavy-run lock is reserved through 4 November.tests/unitcollection. Locally it took 35 s wall clock, 11 s of test time, and a 1.07 GB peak footprint (/usr/bin/time -l, host load about 118). There is no before figure: the file is new. Linux CI timing not measured.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".
Since merged. #10055 (Schedule A excludes the SE deduction) and #9947 (Montana 2021–2023 lines 2–3) landed after this branch was cut. This PR updates #10055's two derived cases and its conservation tolerance (listed above), as posted on #10055 (comment). #9947's Montana cases supply the deduction or keep it below the limit, so they don't move.
self_employed_health_insurance_ald_excluded_premiums(#10055) reads this deduction, so Schedule A now picks up the premiums the corrected limit leaves over.Stacked work. #10120 (plan business, including S corporation wages) and #10131 build on this branch and edit the same limit variable, YAML and property test; #10121 replaces the pension cap. Merge order #10109 → #10120 → #10121 → #10131.
Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
bf108e931aagainst this PR's head343c325710, for 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.self_employed_health_insurance_ald_personself_employed_health_insurance_aldadjusted_gross_incomequalified_business_income_deductionitemized_medical_expensesmedical_expense_deductionincome_taxstate_income_taxpremium_tax_credithousehold_net_incomeThis full pair, at this PR's final head, replaces the 2026-10-11 population run at
a885a16f12. The new limit variableself_employed_health_insurance_earned_income_limithas no counterpart on main, so it has no row.Comparison files are in
fixes/10109-impact/on the hub host.Impact
Households.
These come from runs of this branch, with the old amount supplied as
self_employed_health_insurance_ald_personfor the "main" side.Population, 2026. The hub's full-file pair at this PR's final head, above, replaces the 2026-10-11 run at
a885a16f12. Every deduction change is a decrease (largest $2,707), since the new limit never exceeds the old one. Schedule A now takes back the premiums a smaller deduction leaves over:itemized_medical_expensesrises by the same $211.36M, andmedical_expense_deductionby $124.46M for the 104 tax units where it binds.Follow-ups (filed separately)
self_employed_pension_contribution_limit) uses raw Schedule C profit, not 401(c) earned income (Pub. 560 reduced rate).impact: 2026, hub full-file pair at 343c325: self-employed health insurance deduction −$211.36M (185 tax units, 689,511 weighted), income tax +$23.03M, state income tax +$4.06M, premium tax credit −$3.14M, household net income −$27.31M
axiom: us/statute/26/162/l queued (TheAxiomFoundation/rulespec-us#1676)
🤖 Generated with Claude Code