Skip to content

Limit self-employed plan contributions to the Pub. 560 maximum deduction - #10121

Draft
MaxGhenis wants to merge 5 commits into
mainfrom
fix-se-pension-earned-income-limit
Draft

MaxGhenis wants to merge 5 commits into
mainfrom
fix-se-pension-earned-income-limit

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Draft: waiting on the local test batches, the impact run and the independent review.

Problem

self_employed_pension_contribution_limit returned min(415(c) dollar limit, max(0, Schedule C profit)), and self_employed_pension_contribution_ald_person returned min(max(0, Schedule C profit), contributions). So contributions could reach 100% of net profit, and AGI could go negative from this deduction alone: $20,000 of profit with $20,000 of contributions gave AGI = −$1,412.96.

The law caps the deduction lower:

  • 26 U.S.C. 404(a)(8)(C). Contributions on behalf of a self-employed individual are deductible "to the extent that such contributions do not exceed the earned income of such individual (determined without regard to the deductions allowed by this section) derived from the trade or business with respect to which such plan is established". 404(h)(1) and 404(m)(1) bring SEPs and SIMPLE IRAs under section 404.
  • 401(c)(2)(A)(v)–(vi). Earned income is net earnings from self-employment determined "with regard to the deductions allowed by section 404" and "with regard to the deduction allowed … by section 164(f)".
  • 404(a)(3)(A)(i)(I), 404(h)(1)(C), 404(a)(8)(D). Employer contributions to a profit-sharing plan or SEP are deductible up to 25% of compensation, and a self-employed person's compensation is that earned income. Because it is net of the contribution itself, the 25% rate becomes 25/125 = 20% of earned income before the contribution.
  • 415(c)(1), (c)(3)(B), (c)(3)(D). Annual additions are capped at the dollar limit and at 100% of compensation (earned income, including elective deferrals).
  • 404(n), 414(v)(3)(A). Elective deferrals are outside the 25% limit, and catch-up contributions are outside 415(c).

Statute text verified on 2026-10-11 against govinfo USCODE-2023 (§§ 401, 404, 414, 415).

The IRS computation is Pub. 560's Deduction Worksheet for Self-Employed, identical in structure in the 2025 edition (p. 39) and the 2022 edition (p. 34), with the Rate Table for Self-Employed (2025 p. 40, 2022 p. 35: a 25% plan rate gives 0.200000):

  • Steps 1–3: net profit less the deduction for self-employment tax (Schedule 1 line 15).
  • Steps 4–8: step 3 × the reduced rate, capped at 401(a)(17) × plan rate and at the 415(c) dollar limit.
  • Steps 9–15: elective deferrals D; employer contributions = min(step 7, dollar limit − D, (step 3 − D) / 2); deferrals = min(D, step 3 − employer contributions).
  • Steps 16–19: catch-up contributions on top, up to what is left of step 3.

The worksheet's worked examples match the model's step 2: net profit $200,000 gives an SE tax deduction of $13,596 in 2025 (step 3 = $186,404), and 0.078 × step 3 = $14,680 in 2022.

Which plan the input represents

self_employed_pension_contributions_desired is the person's total Schedule 1 line 16 contribution. It doesn't say whether the plan is a SEP, a SIMPLE IRA, or a profit-sharing plan with a 401(k) arrangement, and the limits differ:

  • A SEP or profit-sharing plan without deferrals allows 20% of step 3.
  • A 401(k) arrangement also allows elective deferrals up to the 402(g) limit, which are outside the 25% limit. With low profit, deferrals can reach all of step 3.
  • A SIMPLE IRA's limits (lower deferral limit, 3% match) are below the 401(k) arrangement's.

Choice: the limit is the most any line-16 defined contribution plan allows, which is the 401(k) arrangement into which the person defers all of the 402(g) room their deferrals to other employers' 401(k)/403(b) plans leave. Those deferrals use the regular limit first, then the catch-up amount. With no room left, the limit is the SEP and profit-sharing limit, min(dollar limit, 20% of step 3).

Why this choice:

  • It never cuts a deduction the law allows for some plan the person could have. A SEP-only rule would cut solo 401(k) deductions, which reach 100% of step 3 at low profit.
  • It still enforces every hard ceiling: 404(a)(8)(C) (never above step 3), 415(c), 402(g) and 414(v).
  • The data can't tell plans apart. Microcosm doesn't carry plan type; its SE pension inputs are also far off SOI (Tax-input coverage gaps surfaced by the reform-validation registry on us-6.2.1 (tracker) microcosm#1117 item B1: 3.4% of SOI dollars on 5.6× the claimants). I checked the certified 2024 dataset: 27% of weighted contributors have desired contributions above step 3 and 41% above 20% of it, so the inputs aren't coherent with Schedule C either.

Defined benefit plans are not modeled, as before.

Change

  • New self_employed_pension_earned_income (Person, worksheet step 3): Schedule C net profit (total_self_employment_income, floored at 0) less the part of self_employment_tax_ald_person attributable to it. That part is split by the business's share of the positive net profits of Schedule C, Schedule F and partnership SE earnings, as on Form 7206 lines 5–8. This is the same split Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109 uses for the SE health insurance limit. The model keeps the Schedule C business as the plan's business, as before.
  • New parameter gov.irs.gross_income.retirement_contributions.limit.profit_sharing_deduction_rate: 25% from 2002 (EGTRRA § 616 raised it from 15% for years beginning after 2001).
  • self_employed_pension_contribution_limit is now the closed form of the worksheet maximum: min(L, catch-up room + min(dollar limit, 0.2 L + regular room, (L + regular room) / 2)), where L is step 3.
    • Steps 6–7 (the 401(a)(17) compensation limit × plan rate) never bind. Pub. 560 shows $305,000, $350,000 and $360,000 against dollar limits of $61,000, $70,000 and $72,000 for 2022, 2025 and 2026 (25% of each is exactly 1.25× the dollar limit). Both amounts index from a 5:1 base ($200,000 and $40,000) under section 415(d). So the code documents this rather than adding a parameter.
  • self_employed_pension_contribution_ald_person = min(contributions, limit). The limit is applied again so directly supplied contributions are capped too.

No circularity.

Invariants

policyengine_us/tests/unit/test_self_employed_pension_limit_properties.py tests these with Hypothesis. Each draw is a batch of single filers over 2022, 2025 and 2026, run as one vectorized simulation.

  1. Differential. The limit equals a literal implementation of worksheet steps 4–19, maximized over a grid of elective deferrals and catch-up contributions in the person's room. The reference uses the IRS-published amounts (Notices 2021-61, 2024-80, 2025-67; 414(v)(2)(E)), not model parameters; only step 2 (the SE tax deduction) comes from the model. Step 3 equals Schedule C profit less the attributable part of the SE tax deduction.
  2. Bounds. deduction = min(desired, limit) ≥ 0. Also deduction ≤ earned income ≤ Schedule C profit (404(a)(8)(C)), and limit ≤ dollar limit + the person's catch-up amount.
  3. AGI. For a filer whose only income is a non-negative Schedule C profit, AGI is never negative.
  4. Monotonicity and the SEP path (deterministic grid). The limit rises with Schedule C profit and falls as deferrals to an employer's plan use up the room. With no room, it equals min(dollar limit, 20% of step 3).

Mutation check: dropping the halving in the 100%-of-compensation term, or adding catch-up outside the earned income cap, each fails the suite.

Tests

  • self_employed_pension_contribution_limit.yaml (18 cases, expectations hand-computed from the worksheet, each with the steps in comments):
    • the Pub. 560 2025 and 2022 example profits;
    • the SEP path (no deferral room);
    • catch-up at ages 55 and 61, including above the dollar limit;
    • low profit, where the limit is all of step 3, and the 100%-of-compensation region;
    • partial room after W-2 deferrals;
    • farm proration, partnership-only, the $400 SE tax threshold, and a loss.
    • The five existing cases are kept. Their expectations change, because $100,000 or $50,000 of profit no longer supports $72,000. One was renamed because its premise ("employee deferrals do not reduce the limit") no longer holds: they do, through 402(g).
  • self_employed_pension_contribution_ald.yaml (new, 3 cases): the $20,000 example (deduction $18,587.05, AGI 0), directly supplied contributions, and a couple.
  • self_employment_income.yaml: the SSTB case changes from $8,000 to $7,434.82.
  • Fails on main (source reverted in place, tests kept; logs in ~/reviews/se-pension-401c-2026-10/fails-on-main/):
    • limit file: 17 of 18 fail. Value failures include 50,000 vs 33,793.52, 72,000 vs 51,087.05, 72,000 vs 43,087.05, 70,000 vs 68,280.73 and 72,000 vs 80,000; the rest stop at the new variable. The one that passes is the dollar-limit case ($500,000 profit → $72,000), a guard;
    • ALD file: 3 of 3 fail (20,000 vs 18,587.05; 70,000/30,000 vs 60,780.73/25,690.28);
    • self_employment_income.yaml: the SSTB case fails (8,000 vs 7,434.82); the other 5 pass.
    • On main the limit was 70,000 for every 2025 case with $200,000 of profit; the guard cases (loss, partnership only, $400) give the same values as this branch.
  • Local runs. Pending: the affected YAML files and Python tests are queued as two targeted batches under heavy_run.sh (snapshot of 3fd9f1f).

Consumers checked

These read the corrected amounts and need no change:

  • federal AGI (gov.irs.ald.deductions, tax-unit sum over head and spouse);
  • the Medicaid MAGI person map and dependent_taxable_ss_magi;
  • the QBI deduction definition: Treas. Reg. 1.199A-3(b)(1)(vi) reduces QBI by deductions attributable to the business, including this one;
  • IRA compensation (219(f)(1) via 401(c)(2)(A)(v): a smaller deduction raises compensation) and ira_active_participant (positive contributions);
  • MO (mo_adjusted_gross_income), MS (ms_self_employed_retirement_adjustment), SC two-wage-earner subtractions, MI household resources line 16, AL AGI line 9, MN homestead household income, UT homeowner/renter relief, AZ property tax credit income.

Limitation (chipped, not changed here). The saver's credit list counts all of self_employed_pension_contributions. 25B(d)(1) counts elective deferrals but not SEP or profit-sharing employer contributions; the follow-up chip decides how to model the deferral share.

Open PRs. #10109's tests with plan contributions ($20,000 of 2023 profit, $3,000 contributed) are within the new limit ($18,587.05), so their expectations hold. Its property tests take the plan deduction from the simulation.

Impact

Pending: a base-vs-PR microsimulation pair for 2026 is queued for the heavy lock.

Follow-ups (chipped)

axiom: TheAxiomFoundation/rulespec-us#1682 queued (§§404 and 414 are not in the corpus yet: TheAxiomFoundation/axiom-corpus#817)

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 11, 2026 16:16
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>
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