Inputs
- State allocation array: 1–5 entries of { stateCode, qbiAllocation: USD }
- Entity type: S-corp / partnership / LLC-as-S / LLC-as-partnership
- Federal marginal bracket: 32% / 35% / 37%
- Optional: owner residency state, number of owners
Per-state formula
entityTax = qbiAllocation × stateEntityRate
federalDeduction = entityTax × federalBracket
creditCaptured = entityTax × creditMultiplier(ownerCreditType)
qbiOffset = entityTax × 0.20 × federalBracket
netBenefit = federalDeduction − qbiOffset
recommendation = elect if netBenefit / entityTax ≥ 0.20
borderline if netBenefit / entityTax ≥ 0.05
don't elect otherwiseThe creditMultipliervalues are a scaffolding heuristic: refundable = 1.0; partial-refundable = 0.5; non-refundable = 0.85 (most owners exhaust state liability eventually); carry-forward-only = 0.6 (time-value-of-money discount). Per-state ownership-share refinements (e.g., CA's 12.5%-per-unpaid-share rule) appear in the state-specific note rather than the multiplier itself.
Worked examples (state-DOR-pinned)
The build-time fixture suite reproduces the following state-DOR-published or IRS-Notice-2020-75-aligned scenarios. Each must reproduce to the dollar before any release.
California — single-owner S-corp with $500,000 qualified net income
A CA single-owner S-corp with $500,000 of qualified net income elects PTET. Entity pays $46,500 (9.3% × $500K) to FTB. At a 37% federal bracket, the entity-level deduction saves $17,205 in federal tax. After QBI offset (~20% × 37%), net benefit is ~$13,764 — versus zero deduction without the election (SALT cap blocks personal-tax deduction).
Massachusetts — partnership with $500,000 qualified taxable income
A MA partnership with $500K of qualified taxable income elects the PTE excise. Entity pays $25,000 (5% flat × $500K). Federal deduction at 37% saves $9,250. Owners receive a 90% refundable credit ($22,500) against MA personal income tax.
Known engine gaps (transparent)
- Owner-residency credit allocation. The engine currently applies a uniform
creditMultiplierper state; in reality, refundability is owner-residency-specific. The picker flags this in the per-state output note when an owner-residency state is specified. - State coverage.Any field not yet checked against the state's own revenue department or statute shows as Pending.
- OBBBA $500K MAGI phaseout. The federal comparison-scenario math on /salt-cap-explained assumes the user is above the phaseout (effectively a $10K floor). Owners with MAGI between the SALT-cap raise and the phaseout boundary should run their numbers with their preparer.