PolicyEngine / PolicyEngine/policyengine-us
SALT cap phaseout uses AGI instead of §164(b)(7)(B)(iv) modified AGI (§§911/931/933 addbacks)
- Dominant language
- Python
- Stars
- 162
- Forks
- 212
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 97
Description
**Versions:** policyengine-us 1.767.3 (source pin `49d19b239a593dbac8920ac6fd80cfe33372343a`), policyengine-core 3.30.3.
**Summary:** §164(b)(7)(B)(iv) phases the 2026 SALT cap down by 30% of the excess of **modified** adjusted gross income over $505,000, where MAGI is AGI *increased by amounts excluded under §911, §931, and §933*. `salt_cap` phases on plain AGI: a 2026 single filer with AGI $500,000 and a $10,000 §911 foreign earned income exclusion has statutory MAGI $510,000 → cap $40,400 − 0.30 × $5,000 = **$38,900**; PE returns **$40,400**.
**Repro** (note `foreign_earned_income_exclusion` is a TaxUnit/year variable):
```python
from policyengine_us import Simulation
sim = Simulation(situation={
"people": {"p": {"age": {"2026": 40}}},
"tax_units": {"t": {"members": ["p"],
"adjusted_gross_income": {"2026": 500_000},
"foreign_earned_income_exclusion": {"2026": 10_000},
"state_and_local_sales_or_income_tax": {"2026": 50_000}}},
"households": {"h": {"members": ["p"]}},
})
print(sim.calculate("foreign_earned_income_exclusion", 2026), sim.calculate("salt_cap", 2026))
# [10000.] [40400.] — statutory cap is 38900
```
**Code path:** `variables/gov/irs/income/taxable_income/deductions/itemizing/salt_cap.py` reduces from `adjusted_gross_income` with `parameters/gov/irs/deductions/itemized/salt_and_real_estate/phase_out/{threshold,rate}.yaml`; no §911/§931/§933 addback is applied. Statute: 26 USC 164(b)(7)(B)(iv) (Pub. L. 119-21). Found via Axiom Foundation cross-engine validation (`us-salt-deduction-grid`, case `salt-magi-911-addback`).
*Edited: the original repro bound the exclusion under `people` (raises `SituationParsingError`; it is a TaxUnit variable) and cited §164(b)(7)(D) — the MAGI definition is §164(b)(7)(B)(iv).*
Contributor guide
Research direction
Start in variables/gov/irs/income/taxable_income/deductions/itemizing/salt_cap.py and inspect the phase_out threshold and rate YAML parameters. Reproduce the supplied 2026 Simulation with the TaxUnit-level foreign_earned_income_exclusion, then verify that salt_cap uses the statutory modified AGI and returns $38,900 for the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100