Add or update student loan interest deduction from Form 1098-E. Accepts a dollar amount or path to a 1098-E document.
The user wants to add a student loan interest deduction to their return. This is an above-the-line deduction (Schedule 1, Line 21) that reduces AGI -- it helps even with the standard deduction.
$ARGUMENTS -- either:
1800 or $1,800.00)If a dollar amount was provided:
$, commas, whitespace)If a file path was provided:
Read reference/tax-year-2025.md for the student loan interest deduction rules.
raw_deduction = min(interest_paid, 2500) # Max deduction is $2,500
# Estimate MAGI (use total wages if return not yet calculated,
# or Line 11 AGI if return exists)
MAGI = estimated_or_calculated_AGI
if MAGI <= 85000:
deduction = raw_deduction
elif MAGI >= 100000:
deduction = 0
# Inform user they're over the phaseout