PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
95 stars 167 forks source link

Correct student loan interest deduction calculation #4593

Closed martinholmer closed 5 days ago

martinholmer commented 1 month ago

The federal income tax allows an above-the-line deduction related to student loan interest. The 2021 IRS Publication 970 describes it this way:

Screenshot 2024-06-03 at 8 23 52 AM

So, the deduction amount is both capped and phased-out for tax units with high income.

The 0.778.0 version of Policyengine-US incorrectly uses the student_loan_interest as the above-the-line deduction amount, omitting the capping and phase-out logic of the law. What is needed is the addition of a new student_loan_interest_deduction variable that implements the capping and phasing-out rules, and the use of this new student_loan_interest_deduction variable in the list of above-the-line deductions.

This bug also affects a number of state income taxes.

MaxGhenis commented 1 month ago

Here that is in the IRC: https://www.law.cornell.edu/uscode/text/26/221

Phases out starting at $50k/100k then indexed from 2002 on, rounded down in $5k increments.

The IRS shows indexed parameters in their data releases under Interest on Education Loans, e.g. here for 2024: https://www.irs.gov/pub/irs-drop/rp-23-34.pdf#page=16