Repository navigation
Open
Description
What the model does
The self-employed health insurance deduction counts only the direct premium input, so Medicare premiums the model itself computes never reach it.
self_employed_health_insurance_premiums.pysetsdefined_for = "is_self_employed"andadds = ["health_insurance_premiums"], and nothing else.- The model computes
medicare_part_b_premiumfor every enrollee: the gross premium with any IRMAA, less Medicare Savings Program coverage (medicare_part_b_premium.py,gross_medicare_part_b_premium.py). medical_expense_health_insurance_premiums.pyalready adds that premium for enrollees when the direct input is zero (lines 21-28). No formula passes it to the self-employed deduction.medicare_part_b_premiums_reportedexists as an input, but no formula reads it.- The comment in
health_insurance_premiums.pysays survey data put premiums in the direct input "only for self-employed people under 65 without employer-sponsored coverage". So in survey data, every self-employed Medicare enrollee gets no deduction for Medicare premiums.
What the law says
- 26 USC 162(l)(1) allows a deduction for amounts paid for insurance that constitutes medical care for the taxpayer, the spouse, dependents and children under 27.
- The Form 7206 instructions say that Medicare premiums a person voluntarily pays for insurance in their own name "can be used to figure the deduction".
- The earned-income limit in 162(l)(2)(A) still applies, as does the employer-plan rule in 162(l)(2)(B). Medicare isn't an employer plan.
Hand-computed case
A single filer in Texas, age 67, in 2026: Schedule C profit $60,000, is_self_employed true, and no other income or premium inputs.
- The model enrolls them in Medicare and computes a Part B premium of $2,434.80 (12 × $202.90), with no Savings Program coverage at this income.
- Half of SE tax: 60,000 × 0.9235 × 0.153 / 2 = 4,238.865. The model gives 4,238.8647.
- Law: the deduction is min(2,434.80, 60,000 − 4,238.865) = $2,434.80, so AGI is 60,000 − 4,238.865 − 2,434.80 = $53,326.335.
- Model:
self_employed_health_insurance_premiumsis 0 and so is the deduction, so AGI is $55,761.1367. Meanwhilemedical_expense_health_insurance_premiumsis $2,434.80, so the model counts the same premium as a medical expense.
These model values come from a run at 035a1570. Main's formula hasn't changed since #10046 (61fa3e1).
Possible fix
- Add the enrollee's modeled Medicare premiums to
self_employed_health_insurance_premiumswhen the direct input is zero, asmedical_expense_health_insurance_premiumsalready does. - Keep the non-Medicare decomposed input (
health_insurance_premiums_without_medicare_part_b) out of it for now. Its own comment says most of it is paid by people with employer coverage, whom 162(l)(2)(B) excludes. Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122 handles those months. self_employed_health_insurance_ald_excluded_premiumsalready removes the deducted amount from the medical expense premiums, so the premium won't count twice.- Part D premiums and Medigap premiums qualify too, but the model has no inputs for them (see Atomic inputs: one fact, one input — eliminate arbitration between redundant input variables #9275 on premium inputs).
Related
- Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109 (merged): the 401(c) earned-income limit.
- Cap the self-employed health insurance deduction at the earnings of the business that established the plan, including a farm or partnership (26 U.S.C. 162(l)(2)(A)) #10528: plans under a farm or partnership business.
- Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122: months eligible for a subsidized employer plan.
- Net the premium tax credit out of the self-employed health insurance deduction (26 U.S.C. 280C(g), Rev. Proc. 2014-41) #10124: premium tax credit netting.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity