I think the right question to ask is, what do you anticipate your overall tax rate to be on the IRA (not just your marginal rate, your overall tax rate on the portion coming out of the IRA after deductions, etc.) and how much do you value the immediate savings over the long term savings? It's very hard for the student loans to beat the IRA in terms of immediate savings since you're taxed at 15% on the student loan payments. Either the IRA investment would need to perform very poorly or inflation would need to be incredibly high, or both. In this post, I'll focus on the first part of my question since it's the more quantifiable question. We need to compute the tax rate in retirement necessary to make one option more advantageous in the long run than the other. To highlight the differences in payment to an IRA versus the student loans, I'll compare a student loan only payment schedule to an IRA only payment schedule. None of the following will be risk-adjusted, so draw conclusions at your own peril.

A cursory investigation of the approximate value of one over the other led me to the formulas:

FVSL = (10.439742*R-5217.4385)/(1+i)

FVIRA = -5255.81/(1+i)+R*((1+r')^12-1)/r') where r' = ((1+r)/(1+i))^(1/12)-1

where R is the (pre-tax) monthly payment, r is the annual effective return on the IRA investment, i is the annual effective inflation rate, FVSL is the value of the portfolio at the end of the year if all payments are directed to the student loans (after 15% tax on each payment and a rebate of 15% of the total interest paid reducing principle at the end of the year), and FVIRA is the value of the portfolio at the end of the year if all payments are directed to the IRA. Note that the formulas will not work properly if the monthly payment exceeds $499.76. Results are approximate since growth rates and inflation are assumed to be constant throughout the year. Also note that the full student loan debt plus interest still exists at the end of the year when all payments go towards the IRA, and no minimum payments have been paid on the student loan (one weakness of my calculations is that I never take the difference in amount owed on the student loan at the end of the year between these two payment schedules into account which will favor the IRA only payment schedule, anyone want to attempt to fix that for me?).

If FVSL > FVIRA, then it is obvious that we should pay as much as we can to the student loans, but how can we decide which account to focus on if FVSL < FVIRA? To compare the accounts we should project forward to find the approximate break even tax rate on the IRA. To do this we can use the following formula:

TR =((FVIRA-FVSL)*(1+fi)/((R*((1+r')^12-1)/r')*(1+fr))^n

where fi is the future annual effective inflation rate, fr is the future annual effective return rate, n is the number of years until the money will be withdrawn, and TR is the approximate break even effective tax rate when the money is withdrawn.

Let's do an example. Assuming constant 2% inflation (both this year and until retirement), 7% returns, 200 monthly payments, and 15 years to retirement, FVSL = -3068.13 and FVIRA = -2699.30. Since the future value of the IRA only payments is bigger than the future value of the student loan only payments, we'll use the TR formula to find that the break even tax rate on the IRA is 7.33%. If we anticipate the effective tax rate to exceed 7.33% when we withdraw the funds, then the student loan only payment schedule will have a better return. If we anticipate the effective tax rate to be less than 7.33% when we withdraw the funds, then the IRA only payment schedule will have a better return.

Increasing inflation to a very high 4% for just the first year during which we're making payments (and keeping the longer term 2% rate) will increase the tax rate threshold to 7.76% which makes the IRA only schedule more likely to be the better option. Increasing the long term inflation rate to 4% (as well as the first year inflation rate) raises the threshold even further to 10.39% making the IRA only payment schedule an even better wager.