Impact of Tax-Deferred Retirement Contributions on RAP-Style Student Loan Repayment
How 401(k) and HSA Contributions Affect Adjusted Gross Income, Loan Payment Size, and Total Cost Compared to Roth Saving
Abstract
This study analyzes how retirement-saving choices influence student loan repayment under the Repayment Assistance Plan (RAP).
Borrowers who contribute to conventional 401(k) plans and Health Savings Accounts (HSAs) lower their Adjusted Gross Income (AGI), which reduces early RAP payments but lengthens the repayment period and increases total lifetime payments.
By contrast, a borrower contributing to a Roth account faces higher initial payments but pays off the loan faster and at a lower total cost.
1. Introduction
A common question faced by borrowers under income-driven repayment plans is how their choices about saving for retirement affect the speed and cost of paying off their student loans.
Tax-deferred contributions to retirement accounts such as a conventional 401(k) and pre-tax contributions to a Health Savings Account (HSA) lower Adjusted Gross Income (AGI).
Because payments under the Repayment Assistance Plan (RAP) are calculated as a percentage of AGI, lowering AGI reduces the required monthly loan payments.
This raises a trade-off: lower-AGI contributions allow borrowers to keep more cash flow and build retirement savings, but they slow the payoff of the loan and increase the total amount paid overtime due to accumulating interest.
This paper compares three representative borrowers who are identical in all respects except for their retirement-saving choices.
We examine how these choices affect:
The initial monthly loan payment,
The total lifetime payments, and
The length of time to pay off the loan.
2. Situation, Model, and Inputs
This section describes the modeling framework and input assumptions used for all three borrowers.
Loan Characteristics:
Initial student loan balance: $40,000
Interest rate: 6.39% per year (current federal Direct Loan rate for undergraduates)
Loan payments calculated using RAP: payment brackets based on annual AGI;
monthly payment = (annual base payment ÷ 12), rounded to the nearest whole dollarDependents: 0
Gross Income and Growth:
Starting gross income at repayment: $65,000
Gross income grows at 2% per year
Factors Affecting AGI:
Person 1: deductible contributions to both a conventional 401(k) and an HSA
Person 2: deductible contributions to a conventional 401(k) only
Person 3: contributions to a Roth retirement account (no AGI reduction)
401(k) contributions start at 3% of gross income and rise by 1 percentage point each year until reaching 7%
Person 1’s HSA contributions fixed at $4,300 per year
No other deductions or adjustments to AGI.
3. Modeling Approach and Calculation Steps
We implemented a year-by-year, month-by-month simulation of the loan balance to measure how retirement-saving choices affect loan payoff.
Key steps:
Initialize starting conditions (loan balance $40,000; interest 6.39%; gross income $65,000; 401(k) starting at 3%; Person 1 includes $4,300 HSA; 0 dependents).
For each borrower and each year:
a. Compute AGI = Gross income – 401(k) – HSA (if applicable).
b. Determine RAP base payment from AGI.
c. Compute monthly payment = (annual base ÷ 12), rounded to nearest whole dollar.
d. For each month: add interest, subtract payment (or remaining balance).
e. Update income and 401(k) contributions annually.Continue until loan fully repaid.
The approach mirrors the real-life recalculation of RAP payments annually based on AGI.
We used Python for computation, which can be replicated exactly in Excel.
4. Key Results
Table 2 summarizes the key outputs for all three borrowers at a 6.39% loan interest rate.
5. Interpretation of Results
The simulation highlights the trade-offs faced by borrowers under income-driven repayment plans:
Tax-deferred saving vs. loan repayment: contributions to deductible accounts lower AGI and thus required RAP payments, but slow loan amortization and increase total interest paid.
Borrower cash flow: higher AGI (Roth case) means higher early payments but faster payoff and less total interest; lower AGI (401k + HSA) means more cash available early but slower payoff and higher total cost.
Policy sensitivity: any factor reducing AGI — savings contributions, deductions, dependents — shifts repayment timing and cost.
Impact on Roth holdings in retirement: Typically, younger people in low marginal tax brackets should contribute to a Roth and move towards deductible retirement accounts when their marginal tax rates rise. The RAP student loan could discourage Roth contributions by younger adults leading to worse outcomes in retirement.
6. Conclusion
We developed a transparent month-by-month RAP repayment simulation for three borrowers differing only in retirement-saving choices.
The results quantify how AGI-reducing contributions slow repayment and raise total loan costs, while Roth contributions accelerate payoff.
This study demonstrates the value of explicit modeling to understand repayment outcomes under income-driven plans.
Appendix A. Simulation Prompt
CHAT GPT can change interest rate formulas and be quirky. One way to check results is to compare Python calculations with Excel calculations and ask CHAT to explain differences. CHAT can generate fairly complex spreadsheet faster than I can.
I am giving paid subscribes access to a prompt which should be able to generate results from both Excel and python.
CHAT can be quirky and sometimes inconsistent. if you don’t give CHAT precise definitions it can give different results in Excel and Python. As they say in Hill Street Blues Be careful out there.


