The Money Mustache Community
Learning, Sharing, and Teaching => Investor Alley => Topic started by: SanDiegoFIRE on May 20, 2015, 09:39:13 PM

would like some opinions on this please
I currently have a sizable 401k that is entirely invested in a (lowcost) stable value fund (think short term bonds). The equity investment funds available in the 401k are all high fee (>1%) with no index options, so I park the balance in the low fee stable value and use it as the cash/shortterm bond portion of our asset allocation.
The interest rate on a 401k loan is 4.125%. Taking a loan does not affect ability to contribute to 401k, which I max every year due to being in highest tax bracket. My job is stable and I have no plans to leave it in the near future. If I were to get laid off I would receive a huge severance package as well as deferred comp that vests immediately, so I would easily be able to pay off any 401k loan balance and have a big amount left over.
We have various fixed rate mortgages on investment properties, the highest being 4.625%. We also have many taxable accounts with large balances fully invested in equity index funds. Given the current 0% rate environment, I try to keep as little cash as possible, except in the 401k due to the lack of low cost investment options.
The question I have is, does it make sense to take a loan on the 401k at 4.125% and use proceeds to pay down the highest rate (4.625%) mortgage? I figured that since the 4.125% 401k loan interest would be paid to myself, using loan proceeds to pay off higher rate debt would make sense since I have no plans to invest the 401k balance in anything other than cashlike equivalents, and have no concerns about ability to repay the loan if my employment situation were to change.
Are there any other considerations I am missing? One thought was that the interest I pay myself which accrues in the 401k account would be paid with aftertax dollars, but would then again be taxed upon eventual withdrawal  is this correct?
Thanks in advance

Sounds like a lot of work and some added risk (or at least hassle, if your job is that stable) to save .5% interest. How much is left to pay off the mortgage? How fast would you repay the loan?

Sounds like a lot of work and some added risk (or at least hassle, if your job is that stable) to save .5% interest. How much is left to pay off the mortgage? How fast would you repay the loan?
Your 401k is the recipient of the interest, so the savings is a lot more than 0.5%. And on larger amounts it can really add up over the course of a working career.

Off topic, but I think you'd be better off having your money invested in some type of stock fund even with a 1% expense ratio.

I don't think the 0.5% spread is worth the hassle. Also, I believe you have to pay the 401k interest back into your account, right? So you're paying taxes on money, using that money to pay your interest, and then when you pull it back out, you're paying taxes on it again. This sounds like a bad idea.

The 401k interest rate is irrelevant to the question. The comparison that needs to be made is the mortgage rate versus the return in the stable value fund.

The 401k interest rate is irrelevant to the question. The comparison that needs to be made is the mortgage rate versus the return in the stable value fund.
+1
Some people aren't understanding that the interest rate on the 401k loan isn't money you're losing. You are paying yourself the interest, so it's like forcing extra savings.

The 401k interest rate is irrelevant to the question. The comparison that needs to be made is the mortgage rate versus the return in the stable value fund.
+1
Some people aren't understanding that the interest rate on the 401k loan isn't money you're losing. You are paying yourself the interest, so it's like forcing extra savings.
But taxing yourself twice on that savings.

The double taxation is a myth. You're not being taxed any more by doing this than you would be otherwise. You would repay the 401(k) loan with aftertax funds just like you're repaying your current loan with aftertax funds. Nothing is changing on that side of equation. Within the 401(k), the treatment of the interest is no different than if you loaned money to a third party (aka you bought a bond). In effect, the OP is proposing to do exactly this with their 401(k): buy the loan from the bank and collect interest on it.
So the question is whether buying that loan is a good investment. Sure, you won't be paying interest to the bank anymore, and you'll be increasing the value of your 401(k) as you make payments. But you have to remember that the amount you loaned out is no longer invested in index funds, so you're deciding to accept a fixed return of 4.25% on that money rather than a likely higher return from the market.
Really this is just a more complicated version of the "should I pay off my mortgage sooner or invest my excess cash?" question. The end result is that by taking out the 401(k) loan and paying off the mortgage, you have less invested in the market than you otherwise would. If you're willing to accept lower likely returns in exchange for knowing you don't owe anyone anything, go right ahead. Just do so with the knowledge that the odds are against you with respect to this being a good idea from a net worth perspective.

Actually OP would not be getting a 4.125% fixed return. Paying yourself 4.125% interest is not the same as collecting 4.125% interest from someone else. OP would be accepting a .5% fixed return (4.6254.125).
The double taxation is not entirely a myth. That 4.125% interest will be double taxed. It's paid with taxable money deposited into the 401k and will again be subject to taxation upon withdrawal. Assume OP took a $100k loan, so in the first year the interest was ~$4k. That $4k is taxed this year, deposited into the 401k, then taxed again upon withdrawal. Additionally, as you mentioned, the foregone investment gains on the amount of the loan will not enjoy tax deferred growth. Since OP is in a cash equivalent, the foregone gain is probably minimal for his/her case. But assuming the stable value fund is paying 2%, that's another $2kish this year and compounded over a lifetime that will the OP will not get to enjoy tax deferrals on.
Furthermore, the investment interest is tax deductible already. The 401k interest is not. Based on this observation alone, the OP would need an effective tax rate below 10% to make these numbers work. Adding that consideration to the other tax inefficiencies described above, this move would be suboptimal, IMO.

The double taxation is a myth. You're not being taxed any more by doing this than you would be otherwise. You would repay the 401(k) loan with aftertax funds just like you're repaying your current loan with aftertax funds. Nothing is changing on that side of equation. Within the 401(k), the treatment of the interest is no different than if you loaned money to a third party (aka you bought a bond). In effect, the OP is proposing to do exactly this with their 401(k): buy the loan from the bank and collect interest on it.
This is exactly right.
So the question is whether buying that loan is a good investment. Sure, you won't be paying interest to the bank anymore, and you'll be increasing the value of your 401(k) as you make payments. But you have to remember that the amount you loaned out is no longer invested in index funds, so you're deciding to accept a fixed return of 4.25% on that money rather than a likely higher return from the market.
This would be right if the OP were using this money to invest in index funds. But he/she isn't; that money is currently invested in a stable value fund. I fully support investigating whether the OP would be better off in index funds instead of the stable value, and that's an interesting question. But it's not what the OP is asking. So it comes back to my last comment, which is that you just need to compare the cost of the mortgage with the return of the stable value fund.
If we're bringing other factors into the mix, beyond whether the OP should be invested in the highfee equity options in their 401(k), then I think the biggest issue is liquidity vs. benefit. By that I mean that the benefit on relatively small amounts is small: 5000 * (4.625  rate on stable value fund) is maybe $200. On large amounts, it could be significant: $100,000 * rate difference could be $4000$5000 per year. But it then exposes you to liquidity risk: if you lost your job, you'd have to pay back the 401k loan immediately, and if you didn't have the liquid funds to do so you'd pay taxes and fees. So, the liquidity vs. benefit question gets my vote for the most important.

It looks like you got a good answer from your thread on the Bogleheads forum (https://www.bogleheads.org/forum/viewtopic.php?f=2&t=166181&newpost=2497886#p2497623).

Actually OP would not be getting a 4.125% fixed return. Paying yourself 4.125% interest is not the same as collecting 4.125% interest from someone else. OP would be accepting a .5% fixed return (4.6254.125).
This is utterly wrong, see my above comments for an explanation why.
The double taxation is not entirely a myth. That 4.125% interest will be double taxed. It's paid with taxable money deposited into the 401k and will again be subject to taxation upon withdrawal. Assume OP took a $100k loan, so in the first year the interest was ~$4k. That $4k is taxed this year, deposited into the 401k, then taxed again upon withdrawal.
Well.. this is technically true. But depending on the individual tax situation it could be positive, negative or neutral. Sure, the $4k must be paid with after tax income. But it is then placed in a taxdeferred account, where upon withdrawal it will be taxed at ordinary income rates. In contrast, investing that $4k in a taxable account would also be using after tax income, but would pay investment taxes as appropriate (anything from 0% capital gains to ordinary income tax rates, depending on what it was invested in and when the gains were realized). So whether this would be beneficial or not depends on the particular investments and timeframes.

Actually OP would not be getting a 4.125% fixed return. Paying yourself 4.125% interest is not the same as collecting 4.125% interest from someone else. OP would be accepting a .5% fixed return (4.6254.125).
This is utterly wrong, see my above comments for an explanation why.
How is paying yourself 4% the same as getting paid 4% from a bond? I could pull money out of my savings account today & pay it back plus interest for x yrs, and I haven't made a cent. I've just saved more. Since I forewent interest on that money for x yrs I actually lost a little. Now, add in that I get double taxed on the extra interest and the situation is worsened further.
Bbub
The double taxation is not entirely a myth. That 4.125% interest will be double taxed. It's paid with taxable money deposited into the 401k and will again be subject to taxation upon withdrawal. Assume OP took a $100k loan, so in the first year the interest was ~$4k. That $4k is taxed this year, deposited into the 401k, then taxed again upon withdrawal.
Beltim
Well.. this is technically true. But depending on the individual tax situation it could be positive, negative or neutral. Sure, the $4k must be paid with after tax income. But it is then placed in a taxdeferred account, where upon withdrawal it will be taxed at ordinary income rates. In contrast, investing that $4k in a taxable account would also be using after tax income, but would pay investment taxes as appropriate (anything from 0% capital gains to ordinary income tax rates, depending on what it was invested in and when the gains were realized). So whether this would be beneficial or not depends on the particular investments and timeframes.
By investing the $4k in a taxable account that $4k principal would never again be subject to taxation and the gains could be taxed more favorably than ordinary income with minimal effort. Putting the $4k back into the 401k would subject that $4k plus gains to double taxation at ordinary income levels. Guaranteed.
**also, look back up at my first post. I added in another consideration:
Furthermore, the investment interest is tax deductible already. The 401k interest is not. Based on this observation alone, the OP would need an effective tax rate below 10% to make these numbers work. Adding that consideration to the other tax inefficiencies described above, this move would be suboptimal, IMO.

OP would be accepting a .5% fixed return (4.6254.125).
This is utterly wrong, see my above comments for an explanation why.
How is paying yourself 4% the same as getting paid 4% from a bond? I could pull money out of my savings account today & pay it back plus interest for x yrs, and I haven't made a cent. I've just saved more. Since I forewent interest on that money for x yrs I actually lost a little. Now, add in that I get double taxed on the extra interest and the situation is worsened further.
That's not the part I highlighted. I've deleted anything extraneous. The 401k interest rate is totally, completely irrelevant to the discussion of the return earned on the 401k loan.

The 401k interest rate is entirely relevant because that interest is subject to double taxation.

Bbub
The double taxation is not entirely a myth. That 4.125% interest will be double taxed. It's paid with taxable money deposited into the 401k and will again be subject to taxation upon withdrawal. Assume OP took a $100k loan, so in the first year the interest was ~$4k. That $4k is taxed this year, deposited into the 401k, then taxed again upon withdrawal.
Beltim
Well.. this is technically true. But depending on the individual tax situation it could be positive, negative or neutral. Sure, the $4k must be paid with after tax income. But it is then placed in a taxdeferred account, where upon withdrawal it will be taxed at ordinary income rates. In contrast, investing that $4k in a taxable account would also be using after tax income, but would pay investment taxes as appropriate (anything from 0% capital gains to ordinary income tax rates, depending on what it was invested in and when the gains were realized). So whether this would be beneficial or not depends on the particular investments and timeframes.
By investing the $4k in a taxable account that $4k principal would never again be subject to taxation and the gains could be taxed more favorably than ordinary income with minimal effort. Putting the $4k back into the 401k would subject that $4k plus gains to double taxation at ordinary income levels. Guaranteed.
Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.

Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
How could it be good? To be taxed twice on the same money at ordinary income rates. Please explain how that could ever be good, assuming the current tax laws.

The 401k interest rate is entirely relevant because that interest is subject to double taxation.
Are you deliberately ignoring my words?
The 401k interest rate is totally, completely irrelevant to the discussion of the return earned on the 401k loan.
You said the following incorrect statement:
Actually OP would not be getting a 4.125% fixed return. … OP would be accepting a .5% fixed return (4.6254.125).
This is wrong.
Edit: for hopefully an easier to see example of why this calculation is wrong, consider: Let's say I have $100, and will give you the interest received from that $100. I have an awesome investment that returns 10% every year, and so I give you $10 this year. Your marginal tax rate is, say, 15%. What is your return?
Your math above would suggest the answer is 10%  15%, so by your math you'd lose 5%. This is obviously wrong. You're comparing two fractions with different denominators.

Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
How could it be good? To be taxed twice on the same amount of money at ordinary income rates. Please explain how that could ever be good, assuming the current tax laws.
Good question! The easiest example is if your retirement income is not taxable, then you'll owe $0 on withdrawals from your 401k.
If you had invested that $4k in a taxable account, and ever had to pay taxes on capital gains or dividends, then it would have been good for you to have put that aftertax money in your 401k.

Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
How could it be good? To be taxed twice on the same amount of money at ordinary income rates. Please explain how that could ever be good, assuming the current tax laws.
Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
How could it be good? To be taxed twice on the same amount of money at ordinary income rates. Please explain how that could ever be good, assuming the current tax laws.
Good question! The easiest example is if your retirement income is not taxable, then you'll owe $0 on withdrawals from your 401k.
If you had invested that $4k in a taxable account, and ever had to pay taxes on capital gains or dividends, then it would have been good for you to have put that aftertax money in your 401k.
Good question! The easiest example is if your retirement income is not taxable, then you'll owe $0 on withdrawals from your 401k.
If you had invested that $4k in a taxable account, and ever had to pay taxes on capital gains or dividends, then it would have been good for you to have put that aftertax money in your 401k.
If you are in a 0% ordinary income tax bracket, you would also pay 0% on cap gains and dividends. I would classify this example as neutral, but not good. I'm inclined to lean slightly towards bad because a taxable acct provides more more control and flexibility w/ taxes, but I'll concede and give it a neutral.
I'll save you the trouble: There isn't a situation where being subject to double taxation at ordinary rates is good.

No I'm not ignoring your words.
What is your counterpoint to my assertion that the 401k loan interest rate is entirely relevant since it's subject to double taxation? I truly want to know why you think that is "totally, completely irrelevant".
You said the following incorrect statement:
Actually OP would not be getting a 4.125% fixed return. … OP would be accepting a .5% fixed return (4.6254.125).
This is wrong.
Edit: for hopefully an easier to see example of why this calculation is wrong, consider: Let's say I have $100, and will give you the interest received from that $100. I have an awesome investment that returns 10% every year, and so I give you $10 this year. Your marginal tax rate is, say, 15%. What is your return?
Your math above would suggest the answer is 10%  15%, so by your math you'd lose 5%. This is obviously wrong. You're comparing two fractions with different denominators.
Yes, but the OP didn't mention an awesome investment returning 10%. The OP had a tax deductible loan at 4.65%. The situation, as OP described, would actually be much worse than my above statement of .5% because I didn't factor in the foregone gains on stable value or the negative tax consequences associated with taking out a 401k loan subject to double taxation on the interest to pay off a tax deductible investment loan.

Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
How could it be good? To be taxed twice on the same amount of money at ordinary income rates. Please explain how that could ever be good, assuming the current tax laws.
Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
How could it be good? To be taxed twice on the same amount of money at ordinary income rates. Please explain how that could ever be good, assuming the current tax laws.
Good question! The easiest example is if your retirement income is not taxable, then you'll owe $0 on withdrawals from your 401k.
If you had invested that $4k in a taxable account, and ever had to pay taxes on capital gains or dividends, then it would have been good for you to have put that aftertax money in your 401k.
Good question! The easiest example is if your retirement income is not taxable, then you'll owe $0 on withdrawals from your 401k.
If you had invested that $4k in a taxable account, and ever had to pay taxes on capital gains or dividends, then it would have been good for you to have put that aftertax money in your 401k.
If you are in a 0% ordinary income tax bracket, you would also pay 0% on cap gains and dividends. I would classify this example as neutral, but not good. I'm inclined to lean slightly towards bad because a taxable acct provides more more control and flexibility w/ taxes, but I'll concede and give it a neutral.
I'll save you the trouble: There isn't a situation where being subject to double taxation at ordinary rates is good.
Please, please read what I said. Just because you're in a 0% bracket in retirement doesn't mean you were in a 0% cap gains bracket during your working years.

Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
So if you are not in the 0% bracket for your income (i.e. exemptions plus deductions exceed income), it's double taxation.

No I'm not ignoring your words.
What is your counterpoint to my assertion that the 401k loan interest rate is entirely relevant since it's subject to double taxation? I truly want to know why you think that is "totally, completely irrelevant".
What is the cost of the loan to the OP? You're subtracting the 401k interest from the mortgage return. But the OP KEEPS THAT MONEY. It's ridiculous to subtract that as a cost.
If you want to figure out the opportunity cost of putting that money into the 401k instead of a taxable account, that's fine – and it's what we're doing in the parallel conversation. But subtracting the whole amount makes no sense whatsoever.

BBub, suppose we lived in a world where you were allowed to loan your 401(k) money to others, but not to yourself. You want to pay off your higherrate debt, and your friend is willing to loan you the money out of her 401(k) at a lower rate. You take her up on her offer, she makes some interest off of the deal (which she will eventually have to pay tax on), and you pay less interest than on your current loan. You have another friend who wants to borrow money, so you loan him some of it and collect interest in your own 401(k), which you will eventually have to pay tax on.
Is this "double taxation?" If so, why? Nobody is paying any more tax in their 401(k) than if they invested in stocks that returned the same amount as the loan interest. Nobody is paying any more tax out of their paycheck than if they borrowed money from a non401(k) source.
If this scenario isn't "double taxation," how exactly does it differ from the situation where you loan yourself money out of your 401(k)? In both scenarios, one person is paying off a debt out of posttax funds and one person is receiving interest in a taxdeferred account.

Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
So if you are not in the 0% bracket for your income (i.e. exemptions plus deductions exceed income), it's double taxation.
That $4k will be "double taxed" regardless of whether it's put in the 401k or not. Either ordinary income + ordinary income (tax deferred), or ordinary income + capital gains/dividends (not tax deferred).
The first time I read your earlier comment I thought you were talking about double taxation of the 401k loan – I misread it.

I had no idea that this seemingly boring topic would get so many posts in just one day. :)

I had no idea that this seemingly boring topic would get so many posts in just one day. :)
(http://imgs.xkcd.com/comics/duty_calls.png)

I had no idea that this seemingly boring topic would get so many posts in just one day. :)
(http://imgs.xkcd.com/comics/duty_calls.png)
This cartoon is an occasional topic at our household.

Are there any other considerations I am missing?
For me, the issue would be the opportunity cost. You can use the funds from the 401k loan for anything  so is paying down (already historically low rate) mortgages the best use of the funds? You could get a higher return with more liquidity by investing that money in your taxable brokerage account. Or, if your allocation is light in real estate, you could use it as the down payment for another rental property.

I had no idea that this seemingly boring topic would get so many posts in just one day. :)
Normal people would say the same thing about every topic in this forum.
Yet here I sit, spectating in this thread on the intricacies of 401(k) loans as if it were the Super Bowl.
Look around you, forummm. We are nerds. We are all nerds.

I had no idea that this seemingly boring topic would get so many posts in just one day. :)
Normal people would say the same thing about every topic in this forum.
Yet here I sit, spectating in this thread on the intricacies of 401(k) loans as if it were the Super Bowl.
Look around you, forummm. We are nerds. We are all nerds.
We are all nerds. And that's why I'm here. But a lot of these threads get 5 or 10 posts the first day. This has 31 in a few hours.

We are all nerds. And that's why I'm here. But a lot of these threads get 5 or 10 posts the first day. This has 31 in a few hours.
That's because this thread just happened to become the venue of a nerdoff.

I'll save you the trouble: There isn't a situation where being subject to double taxation at ordinary rates is good.
Let me introduce you to Al. Al is in the 25% tax bracket and lives in the halcyon days when a Roth IRA was a Roth IRA, a traditional IRA was a traditional IRA, and there was no conversion between the two. Al was single, covered by a 401k at work, and made too much money to deduct traditional IRA contributions or to contribute to a Roth. Should Al invest in a taxable account or a nondeductible IRA?
The answer is complicated and depends on the investment, Al's future earnings, and Al's taxes in retirement. But there are many cases where Al would be better off putting money in the nondeductible IRA. For example:
Al has decided that this year's contribution of $4000 (after tax) would go into a corporate bond fund in accordance with his asset allocation plan. He does a quick calculation to see whether he should put the money in a nondeductible IRA or a taxable account. In a nondeductible IRA, the $4000 would grow taxdeferred would withdrawals taxes at ordinary income rates in retirement. Al estimates that his bond fund will return 5% annually, and plans to withdraw the whole amount in 10 years, when he will be retired, and have an effective tax rate of 5%. Al calculates that his aftertax amount in retirement will be:
$4000 * (1.05) ^ 10 * (1  0.05) = $6189.80
In contrast, in a taxable account, the interest Al receives each year is taxable at his marginal tax rate. His after tax amount received from the $4k investment is:
$4000 * (1 + .05*.75) ^ 9 * (1 + .05 * .95) = $5835.89
The nondeductible IRA (directly analogous to the OP's situation) is better by $353.91!

Here has how the double taxation issue has been explained to me. It is not really a double taxation situation because you are removing taxes for a third situation where you would normally pay them.
Let's say I want new counter tops. If I pay for them from my checking account, the money in my checking account came from my salary and was taxed. I would be buying my counters with after tax dollars. I didn't touch my 401k.
If I used money from my 401k, I'm using taxfree dollars to buy my counter tops. I'm paying taxes on the money that goes back in because I would have used after tax dollars for my counter tops otherwise. If I took out a home depot loan for the counter tops, I would be using after tax money to pay off that loan. It is basically the same thing.

Thanks to all who responded
It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
We already have equity index investments in other tax deferred and taxable accounts, I am simply trying to optimize this very specific stable value part of our asset allocation

would like some opinions on this please
I currently have a sizable 401k that is entirely invested in a (lowcost) stable value fund (think short term bonds). The equity investment funds available in the 401k are all high fee (>1%) with no index options, so I park the balance in the low fee stable value and use it as the cash/shortterm bond portion of our asset allocation.
The interest rate on a 401k loan is 4.125%. Taking a loan does not affect ability to contribute to 401k, which I max every year due to being in highest tax bracket. My job is stable and I have no plans to leave it in the near future. If I were to get laid off I would receive a huge severance package as well as deferred comp that vests immediately, so I would easily be able to pay off any 401k loan balance and have a big amount left over.
We have various fixed rate mortgages on investment properties, the highest being 4.625%. We also have many taxable accounts with large balances fully invested in equity index funds. Given the current 0% rate environment, I try to keep as little cash as possible, except in the 401k due to the lack of low cost investment options.
The question I have is, does it make sense to take a loan on the 401k at 4.125% and use proceeds to pay down the highest rate (4.625%) mortgage? I figured that since the 4.125% 401k loan interest would be paid to myself, using loan proceeds to pay off higher rate debt would make sense since I have no plans to invest the 401k balance in anything other than cashlike equivalents, and have no concerns about ability to repay the loan if my employment situation were to change.
Are there any other considerations I am missing? One thought was that the interest I pay myself which accrues in the 401k account would be paid with aftertax dollars, but would then again be taxed upon eventual withdrawal  is this correct?
Thanks in advance
The "interest rate" on the 401k loan is irrelevant. In most 401k plans, this "interest" is fully repaid into the 401k. So, effectively, you are paying yourself from your checking out into your 401k at some amount... 4.125% of what you withdraw from the 401k in this case.
In order to determine if this is good/bad, you have to look at it from a Net Worth perspective... meaning, "how does my overall asset and liability picture change as a result of this."
To simplify, let's assume this is a 1 yr loan of $10,000 from the 401k (you can change the amounts, but the point will be the same).
Your current situation:
 some income level at a 25% marginal total tax rate
 10k 401k "loan" @ 4.125%
 existing mortgage @ 4.625%, let's call it 200k outstanding (the amount is only relevant to calculate your net of income tax mortgage rate, because it will change every year if you decide to repeat this)
 80k gross taxable income (net of all pretax deductions... HSA, 401k ,whatever)
Before we get started, let's clarify that the "net" mortgage rate will be different for everyone. For this example, you can deduct ~9.25k as a mortgage interest deduction... assuming you itemize. Note that this benefit will be gone before the mortgage is paid off, because the std deduction will be higher once the mortgage interest reaches ~6k/yr. So, the tax savings in this given year will be 9.25k  6.2k (std deduction for single status), so a net tax savings of 3.05 x .25 = $762.50 when you file taxes. In the current year, that means you are effectively paying $8,487.50 in mortgage interest after tax... or an effective net of tax mortgage rate of 4.24375%. Some people mistakenly think the entire amount is a deduction... technically, it is, but we all get the std deduction anyway... so it's most accurate to only consider the marginal benefit over the std deduction when calculating your net of income tax mortgage interest rate.
Afterwards, you earn money on your 80k pretax salary. Whether you had a loan outstanding to yourself or not, you would pay the same amount of taxes here. So, it doesn't matter. What effectively changes is that you will accelerate paydown on a net of tax mortgage @ 4.24375% (above). Whether the cash is coming out of your 401k or not doesn't really matter. If you prefer to lock in a return of 4.125% into your 401k for the 10k, then so be it, but you are just transferring the money in your checking account to your 401k. Deduct from checking, add to 401k. Net worth is flat from the "401k loan" payment alone!
Of course, there are usually fees associated with taking out the loan, and also the case of whether or not you want to accelerate payment on a 4.24375% mortgage debt (4.625% nominal rate). That's a different story entirely.
In my view, the only reason to take out a "401k loan", is if you are short on cash and want to aggressively pay something off. A 4.625% mortgage is likely not a huge benefit. If you had credit card balances at 15%, then maybe you should consider it. Again, you're not "paying" anything to yourself. That rate of the 401k loan is just a transfer from checking to the 401k. The savings is by accelerating payoff of the debt itself. In the above example, the payer will save 10k @ 4.24375% (net of income tax mortgage rate) so ~$424.38 in the first year.
To clarify, that is the explicit savings. Other alternatives will make the decision very different, as it is based on many different assumptions:
 expected return in 401k investments
 expected return on taxable investments
 expected future interest rates
 other outstanding debts and related interest cost
 liquidity available from other sources
... and so on.
From a net perspective, and not including assumed rates of return, the only "savings" is the saving of mortgage interest. The rest is a decision on how aggressively you'd like to become debt free, and the expected return on your various investments and your liquidity costs.
Short answer: You only save the mortgage interest. The rest is paid from yourself... to yourself (from checking account cash to 401k). You'll have to consider the opportunity costs separately... as that is a very different and highly judgmental process.
Hope that helps.

What is the cost of the loan to the OP? You're subtracting the 401k interest from the mortgage return. But the OP KEEPS THAT MONEY. It's ridiculous to subtract that as a cost.
If you want to figure out the opportunity cost of putting that money into the 401k instead of a taxable account, that's fine – and it's what we're doing in the parallel conversation. But subtracting the whole amount makes no sense whatsoever.
Got it. I concede that subtracting the 4.125 alone of no consequence all else being equal. However, all else is not equal in this situation. The 4.125 is double taxed  we've established that. The 4.625 investment interest that OP is considering refinancing is tax deductible. Then there's the opportunity cost on the foregone stable value investment. So, the correct formula would be
Loan Balance*[4.625*(1t)  (r)(4.125*(t)^n], then run again for n+1, +2, and so on for the number of years on the 401k loan.
t = tax rate
r = rate of return on investments, or stable value
n = tims
Assuming a tax rate of 25% and a stable value of return, OP would gain 0.44% with this maneuver  as expected, slightly worse than my initial handwave of 0.5%. However, this figure still doesn't take into account the back end tax on the $4k interest.
That $4k will be "double taxed" regardless of whether it's put in the 401k or not. Either ordinary income + ordinary income (tax deferred), or ordinary income + capital gains/dividends (not tax deferred).
The first time I read your earlier comment I thought you were talking about double taxation of the 401k loan – I misread it.
No it won't be double taxed regardless if you invest in a taxable acct, the $4k is only taxed once. Gains may be subject to additional tax, but the $4k is not. The 401k situation causes that $4k to be double taxed plus ordinary income tax applies to the gains.
We are all nerds. And that's why I'm here.
That's because this thread just happened to become the venue of a nerdoff.
Look around you, forummm. We are nerds. We are all nerds.
Possibly the most accurate statements I've seen all day.
Let me introduce you to Al. Al is in the 25% tax bracket and lives in the halcyon days when a Roth IRA was a Roth IRA, a traditional IRA was a traditional IRA, and there was no conversion between the two. Al was single, covered by a 401k at work, and made too much money to deduct traditional IRA contributions or to contribute to a Roth. Should Al invest in a taxable account or a nondeductible IRA?
The answer is complicated and depends on the investment, Al's future earnings, and Al's taxes in retirement. But there are many cases where Al would be better off putting money in the nondeductible IRA. For example:
Al has decided that this year's contribution of $4000 (after tax) would go into a corporate bond fund in accordance with his asset allocation plan. He does a quick calculation to see whether he should put the money in a nondeductible IRA or a taxable account. In a nondeductible IRA, the $4000 would grow taxdeferred would withdrawals taxes at ordinary income rates in retirement. Al estimates that his bond fund will return 5% annually, and plans to withdraw the whole amount in 10 years, when he will be retired, and have an effective tax rate of 5%. Al calculates that his aftertax amount in retirement will be:
$4000 * (1.05) ^ 10 * (1  0.05) = $6189.80
In contrast, in a taxable account, the interest Al receives each year is taxable at his marginal tax rate. His after tax amount received from the $4k investment is:
$4000 * (1 + .05*.75) ^ 9 * (1 + .05 * .95) = $5835.89
The nondeductible IRA (directly analogous to the OP's situation) is better by $353.91!
I have many issues with the Al example. First, I explicitly asked for a case using current tax laws. You can check the post. That means not pretending like we are in the "halcyon days" before x,y and z tax laws were changed.. Further more, unlike AL, the OP he never once mentioned considering an investment returning 5%. He mentioned a stable value fund paying presumably much less.
Here has how the double taxation issue has been explained to me. It is not really a double taxation situation because you are removing taxes for a third situation where you would normally pay them.
The Op asked about refinancing investment debt on which the interest is nontaxable. His "third situation" is not one where he would be normally paying taxes.

Can we pause the show while I make popcorn and go to the bathroom?

Thanks to all who responded
It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
We already have equity index investments in other tax deferred and taxable accounts, I am simply trying to optimize this very specific stable value part of our asset allocation
What is the long term expected return on your stable value fund?
What is the expected tax rate on your 401(k) withdrawals?

Can we pause the show while I make popcorn and go to the bathroom?
Can you get me a drink while you're up?

Thanks to all who responded
It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
We already have equity index investments in other tax deferred and taxable accounts, I am simply trying to optimize this very specific stable value part of our asset allocation
If you provide the following info, I can run the calcs using the exact formula:
1. Loan amount
2. Your tax rate
3. Stable value return %
4. Number of years to pay back the loan
5. If possible, estimated tax rate in retirement.
6. Number of years to retirement.
Loan Balance*[4.625*(1t)  (r)(4.125*(t)^n]. then run again for n+1, +2, and so on for the number of years on the 401k loan.
Then we can calculate the FV of your total interest expense (the interest subject to double tax that you're putting back into your 401k), asssuming the number of years to retirement and the stable value ROR. Then multiply that amount by your anticipated post retirement tax rate to determine the total cost of this maneuver.
Does this make sense? Would any of you fellow nerds out there like to peerreview my methodology here?

Can we pause the show while I make popcorn and go to the bathroom?
Can you get me a drink while you're up?
Sure! I've been meaning to try out my new Kuerig Kold;)

Can we pause the show while I make popcorn and go to the bathroom?
Can you get me a drink while you're up?
Sure! I've been meaning to try out my new Kuerig Kold;)
Eww, you have a kuerig. Have you run the calcs on the long term cost of that thing? :) jk I'm not going there.

I'll save you the trouble: There isn't a situation where being subject to double taxation at ordinary rates is good.
Let me introduce you to Al.
Hi Al! Welcome to this nerdoff object lesson!

Can we pause the show while I make popcorn and go to the bathroom?
Can you get me a drink while you're up?
Sure! I've been meaning to try out my new Kuerig Kold;)
Water's more mustachian.

What is the cost of the loan to the OP? You're subtracting the 401k interest from the mortgage return. But the OP KEEPS THAT MONEY. It's ridiculous to subtract that as a cost.
If you want to figure out the opportunity cost of putting that money into the 401k instead of a taxable account, that's fine – and it's what we're doing in the parallel conversation. But subtracting the whole amount makes no sense whatsoever.
Got it. I concede that subtracting the 4.125 alone of no consequence all else being equal.
Good!
However, all else is not equal in this situation. The 4.125 is double taxed  we've established that. The 4.625 investment interest that OP is considering refinancing is tax deductible. Then there's the opportunity cost on the foregone stable value investment.
Agreed that not else is equal.
So, the correct formula would be
Loan Balance*[4.625*(1t)  (r)(4.125*(t)^n], then run again for n+1, +2, and so on for the number of years on the 401k loan.
t = tax rate
r = rate of return on investments, or stable value
n = tims
Assuming a tax rate of 25% and a stable value of return, OP would gain 0.44% with this maneuver  as expected, slightly worse than my initial handwave of 0.5%. However, this figure still doesn't take into account the back end tax on the $4k interest.
No, this equation makes no sense. Specifically, the (4.125*(t)^n term makes no sense. That term would be the amount of taxes paid each year on the money you put into the 401k in excess of your original contributions (i.e. the "interest" on the 401k loan). But that money is taxed this year regardless of what you use it for.

I stopped reading after Seattle and Belt correctly esplained the analysis the third time, so I may have missed this coming up in the discussion, but OP you should compare your after tax rate on the mortgage (I assume they are deductible/offsetting rental income) to the expected return on the foregone investment return on the principle you are withdrawing from 401(k). Almost exactly the same as decision to pay down mortgage or invest as one of these smart cookies has already stated.

I have many issues with the Al example. First, I explicitly asked for a case using current tax laws. You can check the post. That means not pretending like we are in the "halcyon days" before x,y and z tax laws were changed.. Further more, unlike AL, the OP he never once mentioned considering an investment returning 5%. He mentioned a stable value fund paying presumably much less.
As for this, the math is exactly the same as the current situation. Whether Al repays a 401k loan or elects to contribute to a nondeductible IRA, the math is exactly the same.
And you "explicitly said:"
There isn't a situation where being subject to double taxation at ordinary rates is good.
My example directly proves that your statement is false. My statement  that: Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
still holds true. There are examples where deferring taxes is worth paying ordinary income tax, and there are examples where not deferring taxes is better.

Can we pause the show while I make popcorn and go to the bathroom?
Can you get me a drink while you're up?
Sure! I've been meaning to try out my new Kuerig Kold;)
Thanks! I had to google Kuerig Kold, but now I'm excited!

As for this, the math is exactly the same as the current situation. Whether Al repays a 401k loan or elects to contribute to a nondeductible IRA, the math is exactly the same.
And you "explicitly said:"
There isn't a situation where being subject to double taxation at ordinary rates is good.
My example directly proves that your statement is false. My statement  that: Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
still holds true. There are examples where deferring taxes is worth paying ordinary income tax, and there are examples where not deferring taxes is better.
1. No, it's not directly applicable to the OP because the OP is not buying a 5% bond on loan from a 401k. Al's a totally separate scenario that's entirely made up.
2. No, your example assumes that a nondeductible IRA is optimal for Al. Under current tax laws Al could use a backdoor conversion to get that money into a roth, which would be most optimal.

I stopped reading after Seattle and Belt correctly esplained the analysis the third time each so I may have missed this discussion, but OP you should compare your after tax rate on the mortgage (I assume they are deductible/offsetting rental income) to the expected return on the foregone investment return on the principle you are withdrawing from 401(k). Almost exactly the same as decision to pay down mortgage or invest as one of these smart cookies has already stated.
You should read the thread. I'm not going to restate the whole argument, but you're simplifying the matter by failing to account for the double taxation on the 401k loan interest.

For the true nerds, this is from the Federal Reserve on the lack of "double taxation" of 401k loans:
From Appendix 1 of http://www.federalreserve.gov/pubs/feds/2008/200842/200842pap.pdf
Edit: from the text of the paper:
Loan interest payments, on the other hand, can indeed be considered doubletaxed under
traditional consumption tax principles—since interest payments are like new contributions,
they should be made with pretax dollars and then taxed upon withdrawal. In practice,
however, the doubletaxation of loan interest relative to a consumption tax is offset by the
break borrowers get on the timing of their tax payments: recall that rather than paying
taxes on loan proceeds when they are distributed (i.e., consumed), borrowers pay the taxes
gradually over the following five years as they repay the loan with aftertax dollars. The
time value of these delayed tax payments offsets the double taxation of interest—perfectly
so, if the discount rate is the pretax rate of return; only partially if the discount rate is
lower. An algebraic illustration of the taxation of 401(k) loans is provided in Appendix 1.
The bolded part is particularly interesting and cromulent to the discussion at hand.

As for this, the math is exactly the same as the current situation. Whether Al repays a 401k loan or elects to contribute to a nondeductible IRA, the math is exactly the same.
And you "explicitly said:"
There isn't a situation where being subject to double taxation at ordinary rates is good.
My example directly proves that your statement is false. My statement  that: Yes, the extra $4k in your example is taxable at ordinary income tax rates upon withdrawal. I said that in my response. Whether that's bad, good, or neutral depends on your individual tax circumstances.
still holds true. There are examples where deferring taxes is worth paying ordinary income tax, and there are examples where not deferring taxes is better.
1. No, it's not directly applicable to the OP because the OP is not buying a 5% bond on loan from a 401k. Al's a totally separate scenario that's entirely made up.
2. No, your example assumes that a nondeductible IRA is optimal for Al. Under current tax laws Al could use a backdoor conversion to get that money into a roth, which would be most optimal.
I'm not saying this is the math for the OP. I'm saying that a nondeductible IRA can be better than a taxable account. There are plenty of reasons that even under current tax laws this would be true, such as if Al already had a large (deductible) traditional IRA balance.

For the true nerds, this is from the Federal Reserve on the lack of "double taxation" of 401k loans:
From Appendix 1 of http://www.federalreserve.gov/pubs/feds/2008/200842/200842pap.pdf
Did you read the report?
Page 6: "Loan interest payments, on the other hand, can indeed be considered doubletaxed under traditional consumption tax principles—since interest payments are like new contributions,
they should be made with pretax dollars and then taxed upon withdrawal."
The next paragraph describes how, in the real world applications the double taxation is usually offset due to the timing of repayments. Not eliminated  offset. Their formula to illustrate the actual taxation vs consumption tax is listed in appendix 1 on page 26.
Also, this paper is written to encourage consumers to pay down high interest credit cards with 401k loans. Well, gee, there's an idea.
I'm not saying it is always bad to take a 401k loan to pay off debt. If OP was considering pulling his 401k to pay off a 25% credit card this discussion wouldn't have happened. I'd have replied with a quick "hell yeah" & gone about my day. But the OP is paying off tax deductible interest with nondeductible interest, then paying tax on that amount again in retirement. That's not such a clear cut case, IMO.

For the true nerds, this is from the Federal Reserve on the lack of "double taxation" of 401k loans:
From Appendix 1 of http://www.federalreserve.gov/pubs/feds/2008/200842/200842pap.pdf
Did you read the report?
Page 6: "Loan interest payments, on the other hand, can indeed be considered doubletaxed under traditional consumption tax principles—since interest payments are like new contributions,
they should be made with pretax dollars and then taxed upon withdrawal."
The next paragraph describes how, in the real world applications the double taxation is usually offset due to the timing of repayments. Not eliminated  offset. Their formula to illustrate the actual taxation vs consumption tax is listed in appendix 1 on page 26.
Are you serious? I literally quoted that exact paragraph.

Sorry  you went back in and edited it while I was typing my response. As you can see, your initial post that I quoted from did not contain the paragraph addition.
Anyway, to go down that rabbit trail. Here's your bolded sentence:
"The time value of these delayed tax payments offsets the double taxation of interest—perfectly
so, if the discount rate is the pretax rate of return; only partially if the discount rate is
lower."
Today's discount rate is .25%. Do you think this discount rate is higher or lower than the average pretax rate of return in a 401k  even a stable value fund like the OP's? Because if it's lower then the double taxation is only partially offset.

Look, this is getting ridiculous. The interest on a 401k loan is double taxed. It just is, plain and simple. This cost should be considered, among other factors, when evaluating whether or not to take out a 401k loan for any reason. Especially in borderline cases where the loan is being used to pay down another taxdeductible loan. Would you agree with that?

Look, this is getting ridiculous. The interest on a 401k loan is double taxed. It just is, plain and simple. This cost should be considered, among other factors, when evaluating whether or not to take out a 401k loan for any reason. Especially in borderline cases where the loan is being used to pay down another taxdeductible loan. Would you agree with that?
I agree that any cost of the 401k loan should be considered. My issue hasn't been that  my issue is that you haven't been calculating that cost correctly, and denying that it's possible that there's even potentially a benefit.

I didn't mean to deny that there's possibly a benefit, and I'm sorry if I came accross that way. There are definitely cases when it makes sense  no question. This one seems borderline at best, but I wouldn't know without getting the exact figures from OP.
What calculation would you propose, if not the one I explained a bit earlier? Here's my response to your issue with my formula.
So, the correct formula would be
Loan Balance*[4.625*(1t)  (r)(4.125*(t)^n], then run again for n+1, +2, and so on for the number of years on the 401k loan.
t = tax rate
r = rate of return on investments, or stable value
n = tims
Assuming a tax rate of 25% and a stable value of return, OP would gain 0.44% with this maneuver  as expected, slightly worse than my initial handwave of 0.5%. However, this figure still doesn't take into account the back end tax on the $4k interest.
No, this equation makes no sense. Specifically, the (4.125*(t)^n term makes no sense. That term would be the amount of taxes paid each year on the money you put into the 401k in excess of your original contributions (i.e. the "interest" on the 401k loan). But that money is taxed this year regardless of what you use it for.
That money would not be taxed this year if used to pay the original investment loan interest, which is tax deductible. For this reason I included it in the formula as an expense applicable to the OP's situation.

I've been having trouble following the thread, with all the discussion of double taxation, etc.
But BBub, you do recognize his savings will be much higher than 0.5% right? He's paying 4.625% right now, and after taking out the 401k loan the only actual cost to him will be his taxes  both those accrued due to not having the deductible loan interest and those paid upon withdrawing the money from his 401k later. But even double taxes are not going to add up to the full amount of the loan interest.
Ie, he pays 4.625% now, but his net cost of funds would be  say he's in the 25% bracket  (4.625%*.25) + (4.125%*.25) = 2.19%, almost half of which is paid upon withdrawal from the 401k so not until much much later. His immediate cost would just be the 4.625%*.25 = 1.16%.
As you said, it's a borderline case, it depends entirely upon the expected return of his stable value fund.

What calculation would you propose, if not the one I explained a bit earlier?
In broad terms I think you have the right idea. That is, something like:
profit = loan balance * [ (mortgage interest benefit)  (return of alternative investment)] ± (cost/benefit of additional 401k contribution)
My previous example shows that additional, nondeductible 401k contributions can be a benefit or cost depending on the circumstances. In this particular case, rmendpara gave a good conservative estimate of mortgage interest benefit of 4.24% (it's conservative because it assumes no other itemized deductions, but at a minimum the OP will have state income or sales taxes to deduct as well). The return on the alternative investment is simply the return of the stable value fund  my guess would be between 2 and 3 percent.

That money would not be taxed this year if used to pay the original investment loan interest, which is tax deductible. For this reason I included it in the formula as an expense applicable to the OP's situation.
Are you saying that if the OP didn't take out a 401k loan, instead of using aftertax money to pay back the 401k loan, they would instead pay down the mortgage? If so, the calculation of that part of the benefit would be:
(cost/benefit of additional 401k contribution) = loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Using numbers of:
loan balance = 100K
401k interest rate = 4.125%
aftertax interest rate of mortgage = 4.24%
then (cost/benefit of additional 401k contribution) = 100k * .04125 * .0424 = $174.9
and the overall equation would be:
profit = loan balance * [ (mortgage interest benefit)  (return of alternative investment)] ± (cost/benefit of additional 401k contribution)
guestimating a return of stable value fund of 2.0%, then
profit = 100K * ( .0424  .020 )  174.9
profit = $2065 per year

Can we pause the show while I make popcorn and go to the bathroom?
Can you get me a drink while you're up?
Sure! I've been meaning to try out my new Kuerig Kold;)
Thanks! I had to google Kuerig Kold, but now I'm excited!
Don't feel bad, I had never heard of one until today...
http://forum.mrmoneymustache.com/antimustachianwallofshameandcomedy/makeyourowntinysodafor$129/?topicseen

I've been having trouble following the thread, with all the discussion of double taxation, etc.
But BBub, you do recognize his savings will be much higher than 0.5% right? He's paying 4.625% right now, and after taking out the 401k loan the only actual cost to him will be his taxes  both those accrued due to not having the deductible loan interest and those paid upon withdrawing the money from his 401k later. But even double taxes are not going to add up to the full amount of the loan interest.
Ie, he pays 4.625% now, but his net cost of funds would be  say he's in the 25% bracket  (4.625%*.25) + (4.125%*.25) = 2.19%, almost half of which is paid upon withdrawal from the 401k so not until much much later. His immediate cost would just be the 4.625%*.25 = 1.16%.
As you said, it's a borderline case, it depends entirely upon the expected return of his stable value fund.
Yes I get it, but I'd suggest a few minor tweaks to your analysis above..
The 4.625% he is currently paying is tax deductible, so his effective rate is 3.46%. That makes things much tighter.
Also consider that he will be taxed on the amount of his 401k interest again when he makes withdrawals in retirement. Does this make sense?

Don't tell me this thread is dead already? That would be too anticlimactic. I went to bed thinking this nerdoff had morphed into a nerdfighttothedeath, only to wake up this morning and find that it ended not with a bang, but a whimper. You guys better get back in here and pick up where you left off  if this thread doesn't end with at least one bloody nerdcorpse on the amphitheater floor, I'm going to demand my money back. With (nondoubletaxed) interest.

Yeah, by this point yesterday, there'd been at least 3 keyboards severely stressed from all the pounding. Pick up the pace, nerdstars! Let us summon our nerd armies and TYPE!

Yeah, by this point yesterday, there'd been at least 3 keyboards severely stressed from all the pounding. Pick up the pace, nerdstars! Let us summon our nerd armies and TYPE!
I think my last two posts were a pretty good volley. If someone wants to respond they should.
For an overall conclusion, I still like my post about the benefit vs. liquidity.

Yeah, by this point yesterday, there'd been at least 3 keyboards severely stressed from all the pounding. Pick up the pace, nerdstars! Let us summon our nerd armies and TYPE!
I think my last two posts were a pretty good volley. If someone wants to respond they should.
For an overall conclusion, I still like my post about the benefit vs. liquidity.
Yes, this was a great conclusion. Perfectly stated. Amirite?

Yeah, by this point yesterday, there'd been at least 3 keyboards severely stressed from all the pounding. Pick up the pace, nerdstars! Let us summon our nerd armies and TYPE!
I think my last two posts were a pretty good volley. If someone wants to respond they should.
For an overall conclusion, I still like my post about the benefit vs. liquidity.
Yes, this was a great conclusion. Perfectly stated. Amirite?
What? Are you kidding me? It was so wrong! Hey, let's all discuss!

I don't understand that last formula Beltim. Can you explain the cost/benefit formula:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Doesn't make sense to me, but I would love to understand why you calculated it this way. Honestly.

Even 4.625% is really cheap for an investment loan. I'm assuming your rental ROI is well above that, so unless your nearterm goals require deleveraging for riskbased reasons, why not pull the 401(k) loan for a down payment on another rental?
I mean, as long as we're doing all the comparisons based on the returns of various options, that's where I'd go with it....

I don't understand that last formula Beltim. Can you explain the cost/benefit formula:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Doesn't make sense to me, but I would love to understand why you calculated it this way. Honestly.
Yeah, I'll give it a shot. This is my attempt at calculating the cost of using funds to repay the 401k loan instead of using those funds to pay back the mortgage (in the absence of a 401k loan). It's what I thought you were suggesting as an alternative use of funds, but I could easily be mistaken. As to the math, [loan balance * (401 interest rate)] just give the amount of money that has to be paid back from other funds this year. The benefit of using that money would be the amount multiplied by the effective aftertax interest rate on the mortgage (you used 3.46% assuming it's all taxdeductible, but it could be as high as the interest rate itself depending on other deductions).
That make sense?

It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
NOOOOOOOOOOOO! I hope it's not too late, but there's another major consideration that I haven't seen mentioned, despite the nerdoff. If you separate from your employer, how long do you have to pay back the loan? What if you get a great offer and you can't take it because the market is in a down position and you can't pay the loan back? You must have this information before you take one more step!
I consider borrowing from my 401k my worst financial mistake. Did I lose money? No, the real estate I bought with the money doubled in value in less than four years. Did I miss out on market gains? Not to the extent that I made a metric shitton of nontaxable money on the RE deal and most likely wouldn't be FIRE now. So why? Because I felt like an indentured servant for every single second of the time that I was not in a position to leave my job. Hated every single minute of it, which is why I killed myself to pay it back in nine months. If you value your freedom, you must consider this factor in the decision to borrow from your 401k.

It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
NOOOOOOOOOOOO! I hope it's not too late, but there's another major consideration that I haven't seen mentioned, despite the nerdoff. If you separate from your employer, how long do you have to pay back the loan? What if you get a great offer and you can't take it because the market is in a down position and you can't pay the loan back? You must have this information before you take one more step!
I consider borrowing from my 401k my worst financial mistake. Did I lose money? No, the real estate I bought with the money doubled in value in less than four years. Did I miss out on market gains? Not to the extent that I made a metric shitton of nontaxable money on the RE deal and most likely wouldn't be FIRE now. So why? Because I felt like an indentured servant for every single second of the time that I was not in a position to leave my job. Hated every single minute of it, which is why I killed myself to pay it back in nine months. If you value your freedom, you must consider this factor in the decision to borrow from your 401k.
Being one of the principals in the nerd off, I completely agree with you. That said, I made this point at least twice before. Of course, they probably got lost in the sea of my other posts.

It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
NOOOOOOOOOOOO! I hope it's not too late, but there's another major consideration that I haven't seen mentioned, despite the nerdoff. If you separate from your employer, how long do you have to pay back the loan? What if you get a great offer and you can't take it because the market is in a down position and you can't pay the loan back? You must have this information before you take one more step!
I consider borrowing from my 401k my worst financial mistake. Did I lose money? No, the real estate I bought with the money doubled in value in less than four years. Did I miss out on market gains? Not to the extent that I made a metric shitton of nontaxable money on the RE deal and most likely wouldn't be FIRE now. So why? Because I felt like an indentured servant for every single second of the time that I was not in a position to leave my job. Hated every single minute of it, which is why I killed myself to pay it back in nine months. If you value your freedom, you must consider this factor in the decision to borrow from your 401k.
I also borrowed from my 401k once. I also bought investment real estate with it. I also wouldn't do it again, but for different reasons. I don't like investing in real estate, it had a big opportunity cost for me (see below), I hated having my cash flow disrupted (stopping me from investing elsewhere and making me more vulnerable to an emergency), I hated having the money out of my account, there was some risk of my salary stopping temporarily (I'd have to make the loan payments anyway, on top of not having income), the concern of double taxation, etc.
All the Nerdoff math aside, it doesn't seem worth it to me. For a big savings (like buying my personal residence without a mortgage because they don't make loans that smalltrue story, and what I should have done instead of buying the investment real estate with the loan) I would do it. For a small amount of arbitrage, it doesn't seem worth it.

I don't understand that last formula Beltim. Can you explain the cost/benefit formula:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Doesn't make sense to me, but I would love to understand why you calculated it this way. Honestly.
Yeah, I'll give it a shot. This is my attempt at calculating the cost of using funds to repay the 401k loan instead of using those funds to pay back the mortgage (in the absence of a 401k loan). It's what I thought you were suggesting as an alternative use of funds, but I could easily be mistaken. As to the math, [loan balance * (401 interest rate)] just give the amount of money that has to be paid back from other funds this year. The benefit of using that money would be the amount multiplied by the effective aftertax interest rate on the mortgage (you used 3.46% assuming it's all taxdeductible, but it could be as high as the interest rate itself depending on other deductions).
That make sense?
Not sure. Here's what I would do. Like you, first figure up the Present net cost or benefit. Then determine profit.
Benefit is getting rid of the effective mortgage interest rate.
Present Benefit = $100k*.0346 = $3,460
The present cost would be the taxes paid on the 401k interest (a cost the OP previously avoided due to the tax deductibility of mortgage).
Present Cost = $100k*(.04125*.25) = $1,031.25
net benefit = $3,4601,031 = $2,429 Net Benefit
profit = benefit  opportunity cost  PV of future tax liability on the 401k interest.
2,429  (100k*.02) = $429
Finally, you'd need to subtract the PV of the future tax liability on the $4k interest that will be paid back into the 401k. Let's assume his future tax rate will be 15%. So, that's $600 owed ($4k*.15) in, say 20 years. The present value of $600 owed in 20 yrs, assuming a 2% ror = $404. (the formula is complicated, but you can use a financial calculator. FV=600, PMT=0, i=2, n=20, solve for PV)
$429404 = $25
So, given these assumptions the OP would by my calcs come out $25 ahead. Assuming the loan fee is probably at least that amount he'd probably break even.
The assumptions I used were:
Loan amount: 100k
Mortgage rate: 4.6125%
401k Int Rate: 4.125%
Stable Value Return: 2%
Current Tax Rate: 25%
Retirement Tax Rate: 15%
Years to Retirement: 20
Obviously modifying any of these assumptions will affect the outcome. But the methodology, IMO, seems sound. Any issues with this? Am I missing something? I have a degree in Finance, love numbers, and solve equations in my free time. That doesn't mean I'm not dead wrong sometimes  I am. But the methodology above seems clearly to be the best way to solve this problem.

Present Cost = $100k*(.04125*.25) = $1,031.25
Yeah, this makes no sense at all. That money is going to be taxed this year regardless, so it doesn't enter the calculation at all.

It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
NOOOOOOOOOOOO! I hope it's not too late, but there's another major consideration that I haven't seen mentioned, despite the nerdoff. If you separate from your employer, how long do you have to pay back the loan? What if you get a great offer and you can't take it because the market is in a down position and you can't pay the loan back? You must have this information before you take one more step!
I consider borrowing from my 401k my worst financial mistake. Did I lose money? No, the real estate I bought with the money doubled in value in less than four years. Did I miss out on market gains? Not to the extent that I made a metric shitton of nontaxable money on the RE deal and most likely wouldn't be FIRE now. So why? Because I felt like an indentured servant for every single second of the time that I was not in a position to leave my job. Hated every single minute of it, which is why I killed myself to pay it back in nine months. If you value your freedom, you must consider this factor in the decision to borrow from your 401k.
I once borrowed from a 401k to pay off highinterest debt (way above this example). Soon after, my position was terminated on short notice. I was insourced by the feds so I kept my seat, but I still had to pay thousands back very quickly. I also took a pay cut. It SUCKED. All my cash was tied up in investments, and I think I ended up using some kind of balance transfer deal to avoid getting totally fucked on interest. It did cost me a bit regardless.
I have two active TSP loans now for at least 15k total. Both of them funded highyielding real estate investments, so I can't regret them from a longterm financial standpoint, but the feeling you describe above is very real. I'm about to dramatically accelerate my payoff efforts for that exact reason.
In fact, I meant to reamortize this week and this would be a good time to go do that. Thanks for the reminder. ;)

Present Cost = $100k*(.04125*.25) = $1,031.25
Yeah, this makes no sense at all. That money is going to be taxed this year regardless, so it doesn't enter the calculation at all.
No, the OP is currently not being taxed due to the deduction on the mortgage interest. Once he gives up that tax deductible mortgage it becomes taxed.
If OP was paying off a credit card, or buying counters or whatever  you would be correct and that money would be taxed regardless. However, the OP is paying off a tax deductible interest with the money. So, now he will incur taxes that he previously wasn't.

Present Cost = $100k*(.04125*.25) = $1,031.25
Yeah, this makes no sense at all. That money is going to be taxed this year regardless, so it doesn't enter the calculation at all.
No, the OP is currently not being taxed due to the deduction on the mortgage interest. Once he gives up that tax deductible mortgage it becomes taxed.
If OP was paying off a credit card, or buying counters or whatever  you would be correct and that money would be taxed regardless. However, the OP is paying off a tax deductible interest with the money. So, now he will incur taxes that he previously wasn't.
This is giving me a headache. It looks to me like you're calculating the opportunity cost of using the money to pack back the 401k loan instead of just using it to pay the mortgage directly in the absence of a 401k loan. Is that right?
If so, then you're missing a step. The benefit of paying back a mortgage is not equal to the amount that you pay back. The value of paying back a mortgage is the amount that you pay back, multiplied by your interest rate.
So that opportunity cost should be what I said before:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)

Let's say he was going to refinance a 10% mortgage with a 5% 401k loan. By your formula his opportunity cost would be $100k*.05*.10= $500
wtf? That has no meaning at all. It's just a bunch of numbers multiplied together for no reason.

That makes no sense. Let's say he was going to refinance a 10% mortgage with a 5% 401k loan. By your formula his opportunity cost would be $100k*.05*.10= $500
wtf? That has no meaning at all. It's just a bunch of numbers multiplied together for no reason.
$500 would be the opportunity cost of the 401k interest, yes.
If someone pays down $5k mortgage at 10%, the annual benefit to that person is $5k * .1 = $500.
By your formula, paying back $5k of mortgage would be a benefit of $5k * (1  marginal tax rate). At a 25% interest rate, your formula says that paying back $5k on a mortgage is a net benefit of $3750. That makes no sense. It is obviously wrong.

Ok, you just applied your formula to a paying down $5k on a mortgage. We are talking about paying $100k on a mortgage.
Ignore the taxes entirely.
1. Pay off a $100k mortgage at 10%. Annual Benefit is $10,000. Is it not?
2. Now refinance the $100k at 5%. Annual Cost is $5,000. Is it not?
3. Net benefit is $5,000. Is it not?
I'll stop here. Is there any problem with the above logic?

That makes no sense. Let's say he was going to refinance a 10% mortgage with a 5% 401k loan. By your formula his opportunity cost would be $100k*.05*.10= $500
wtf? That has no meaning at all. It's just a bunch of numbers multiplied together for no reason.
$500 would be the opportunity cost of the 401k interest, yes.
If someone pays down $5k mortgage at 10%, the annual benefit to that person is $5k * .1 = $500.
By your formula, paying back $5k of mortgage would be a benefit of $5k * (1  marginal tax rate). At a 25% interest rate, your formula says that paying back $5k on a mortgage is a net benefit of $3750. That makes no sense. It is obviously wrong.
I think you guys are getting mixed up. If I understand correctly beltim is saying using 5k from 401k to pay mortgage at 10% saves them $500 in interest. I agree with that. I think bbub seems to be agreeing that you will save $500, but that $500 now becomes taxable income (because you can't deduct mortgage interest if you don't pay any). So if you do that, when you file your tax forms you will have $500 less in deductions, effectively making you have $500 more to pay your marginal tax rate.

Ok, you just applied your formula to a paying down $5k on a mortgage. We are talking about paying $100k on a mortgage.
Ignore the taxes entirely.
1. Pay off a $100k mortgage at 10%. Annual Benefit is $10,000. Is it not?
2. Now refinance the $100k at 5%. Annual Cost is $5,000. Is it not?
3. Net benefit is $5,000. Is it not?
I'll stop here. Is there any problem with the above logic?
Ok, I'll pretend there isn't a problem and continue working through this, accounting for the taxes and 401k loanthis time..
Since the original 10% was deductible, we are losing out on $2,500 by refinancing. $10k2,500 = 7,500 in benefit.
Since the 5% 401k loan is being paid to ourself, now we are only losing out on the taxes. The interest rate itself is inconsequential, but the tax applied to it is a true cost.
Benefit of the transaction simply = $7,500 for the net interest saved.
Now to get profit, we'd take $7,500stable value rate on the 100k  PV of future tax payment on the 401k interest.

That makes no sense. Let's say he was going to refinance a 10% mortgage with a 5% 401k loan. By your formula his opportunity cost would be $100k*.05*.10= $500
wtf? That has no meaning at all. It's just a bunch of numbers multiplied together for no reason.
$500 would be the opportunity cost of the 401k interest, yes.
If someone pays down $5k mortgage at 10%, the annual benefit to that person is $5k * .1 = $500.
By your formula, paying back $5k of mortgage would be a benefit of $5k * (1  marginal tax rate). At a 25% interest rate, your formula says that paying back $5k on a mortgage is a net benefit of $3750. That makes no sense. It is obviously wrong.
I think you guys are getting mixed up. If I understand correctly beltim is saying using 5k from 401k to pay mortgage at 10% saves them $500 in interest. I agree with that. I think bbub seems to be agreeing that you will save $500, but that $500 now becomes taxable income (because you can't deduct mortgage interest if you don't pay any). So if you do that, when you file your tax forms you will have $500 less in deductions, effectively making you have $500 more to pay your marginal tax rate.
I agree with that too. But using Beltim's formula, he is saying that using $100k to pay a mortage at 10% saves them $500. That is incorrect. See my above post.

Ok, you just applied your formula to a paying down $5k on a mortgage. We are talking about paying $100k on a mortgage.
Ignore the taxes entirely.
1. Pay off a $100k mortgage at 10%. Annual Benefit is $10,000. Is it not?
2. Now refinance the $100k at 5%. Annual Cost is $5,000. Is it not?
3. Net benefit is $5,000. Is it not?
I'll stop here. Is there any problem with the above logic?
No problems here.

Ok awesome. Go back up a few posts. Then let me know what you think.

That makes no sense. Let's say he was going to refinance a 10% mortgage with a 5% 401k loan. By your formula his opportunity cost would be $100k*.05*.10= $500
wtf? That has no meaning at all. It's just a bunch of numbers multiplied together for no reason.
$500 would be the opportunity cost of the 401k interest, yes.
If someone pays down $5k mortgage at 10%, the annual benefit to that person is $5k * .1 = $500.
By your formula, paying back $5k of mortgage would be a benefit of $5k * (1  marginal tax rate). At a 25% interest rate, your formula says that paying back $5k on a mortgage is a net benefit of $3750. That makes no sense. It is obviously wrong.
I think you guys are getting mixed up. If I understand correctly beltim is saying using 5k from 401k to pay mortgage at 10% saves them $500 in interest. I agree with that. I think bbub seems to be agreeing that you will save $500, but that $500 now becomes taxable income (because you can't deduct mortgage interest if you don't pay any). So if you do that, when you file your tax forms you will have $500 less in deductions, effectively making you have $500 more to pay your marginal tax rate.
I agree with that too. But using Beltim's formula, he is saying that using $100k to pay a mortage at 10% saves them $500. That is incorrect. See my above post.
Maybe this is the miscommunication. That's not what I'm saying. Where did I say that?

That makes no sense. Let's say he was going to refinance a 10% mortgage with a 5% 401k loan. By your formula his opportunity cost would be $100k*.05*.10= $500
wtf? That has no meaning at all. It's just a bunch of numbers multiplied together for no reason.
$500 would be the opportunity cost of the 401k interest, yes.
If someone pays down $5k mortgage at 10%, the annual benefit to that person is $5k * .1 = $500.
By your formula, paying back $5k of mortgage would be a benefit of $5k * (1  marginal tax rate). At a 25% interest rate, your formula says that paying back $5k on a mortgage is a net benefit of $3750. That makes no sense. It is obviously wrong.
I think you guys are getting mixed up. If I understand correctly beltim is saying using 5k from 401k to pay mortgage at 10% saves them $500 in interest. I agree with that. I think bbub seems to be agreeing that you will save $500, but that $500 now becomes taxable income (because you can't deduct mortgage interest if you don't pay any). So if you do that, when you file your tax forms you will have $500 less in deductions, effectively making you have $500 more to pay your marginal tax rate.
I agree with that too. But using Beltim's formula, he is saying that using $100k to pay a mortage at 10% saves them $500. That is incorrect. See my above post.
Huh? I quoted him saying exactly that.

So that opportunity cost should be what I said before:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Your formula said it.
Apply the following numbers to your formula:
Loan balance = $100k
401k interest rate = 5%
Effective after tax interest rate of mortgage= 10%
$100k*.05*.1=$500

So that opportunity cost should be what I said before:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Your formula said it.
Apply the following numbers to your formula:
Loan balance = $100k
401k interest rate = 5%
Effective after tax interest rate of mortgage= 10%
$100k*.05*.1=$500
That was the opportunity cost of the repaying the 401k loan, not the total benefit. I said the total benefit earlier:
In broad terms I think you have the right idea. That is, something like:
profit = loan balance * [ (mortgage interest benefit)  (return of alternative investment)] ± (cost/benefit of additional 401k contribution)

Ok, I'll pretend there isn't a problem and continue working through this, accounting for the taxes and 401k loanthis time..
Since the original 10% was deductible, we are losing out on $2,500 by refinancing. $10k2,500 = 7,500 in benefit.
You've switched to talking about a 401k loan, not a mortgage now, correct?
Since the 5% 401k loan is being paid to ourself, now we are only losing out on the taxes. The interest rate itself is inconsequential, but the tax applied to it is a true cost.
Benefit of the transaction simply = $7,500 for the net interest saved.
Now to get profit, we'd take $7,500stable value rate  PV of future tax payment on the 401k interest.
This is all correct as well.

So that opportunity cost should be what I said before:
loan balance * (401k interest rate) * (effective aftertax interest rate of mortgage)
Your formula said it.
Apply the following numbers to your formula:
Loan balance = $100k
401k interest rate = 5%
Effective after tax interest rate of mortgage= 10%
$100k*.05*.1=$500
That was the opportunity cost of the repaying the 401k loan, not the total benefit. I said the total benefit earlier:
It's not correct though. How could it be correct that the opportunity cost of repaying the 401k loan is $500. That is a totally irrelevant figure. The proper way to solve the equation is laid out in my post.. You just said so.
Ok, I'll pretend there isn't a problem and continue working through this, accounting for the taxes and 401k loanthis time..
Since the original 10% was deductible, we are losing out on $2,500 by refinancing. $10k2,500 = 7,500 in benefit.
You've switched to talking about a 401k loan, not a mortgage now, correct?
Yes
Since the 5% 401k loan is being paid to ourself, now we are only losing out on the taxes. The interest rate itself is inconsequential, but the tax applied to it is a true cost.
Benefit of the transaction simply = $7,500 for the net interest saved.
Now to get profit, we'd take $7,500stable value rate  PV of future tax payment on the 401k interest.
This is all correct as well.
I know. It's the same formula I've proposed all along.

Benefit of the transaction simply = $7,500 for the net interest saved.
Now to get profit, we'd take $7,500stable value rate  PV of future tax payment on the 401k interest.
…
I know. It's the same formula I've proposed all along.
This is not what you said earlier. Specifically, it differs in that in your earlier equation you subtracted a term that doesn't appear in this one:
Benefit is getting rid of the effective mortgage interest rate.
Present Benefit = $100k*.0346 = $3,460
The present cost would be the taxes paid on the 401k interest (a cost the OP previously avoided due to the tax deductibility of mortgage).
Present Cost = $100k*(.04125*.25) = $1,031.25
net benefit = $3,4601,031 = $2,429 Net Benefit
profit = benefit  opportunity cost  PV of future tax liability on the 401k interest.
This is the term that I have a problem with.

That was the opportunity cost of the repaying the 401k loan, not the total benefit. I said the total benefit earlier:
It's not correct though. How could it be correct that the opportunity cost of repaying the 401k loan is $500. That is a totally irrelevant figure. The proper way to solve the equation is laid out in my post.. You just said so.
Sorry, I was using a shorthand. The $500 is the opportunity cost of the amount that you pay back the 401k instead of using the same amount of money to pay down the mortgage.
Edit: That means it's not the total benefit of taking the 401k loan, which you seem to think is what I mean.

Still not understanding your opportunity cost calc, but whatever. Moving on...
Your critique of my formula is correct. I double counted the tax costs. Since the cost of eliminating the mortgage debt was already accounted for by using the net mortgage rate, it shouldn't have been counted again when paying back the 401k loan.
The formula should be:
Profit=Loan Balance*[Mortgage rate * (1tax rate)]  (Loan Balance * Stable Value Rate)  PV of future tax pmt on 401k Interest
Profit = 100k*[.046125*(.75)]  (100k*.02) 404
Profit= $1,064.75
Or to make it even more eloquent:
Profit = (Loan Balance*aftertax mortgage rate)  (opportunity cost on investments)  PV of future tax pmt on 401k interest
Profit = (100k*.03459)2,000404
Profit= $1,064.75
Agreed?
I hope so because the 3day weekend is calling my name!
BTW, thanks for engaging in this banter. I enjoyed it.

Thanks to all who responded
It sounds like I should take the loan and pay down debt instead of keeping it in a stable value fund.
We already have equity index investments in other tax deferred and taxable accounts, I am simply trying to optimize this very specific stable value part of our asset allocation
Hey one important point I haven't seen mentioned is that the fees involved in the 401k loan can eat the benefit. Most 401k loan documentation I've seen includes large fees based on the size of the loan. Make sure they don't apply in your case!

Your critique of my formula is correct. I double counted the tax costs. Since the cost of eliminating the mortgage debt was already accounted for by using the net mortgage rate, it shouldn't have been counted again when paying back the 401k loan.
Exactly!
The formula should be:
Profit=Loan Balance*[Mortgage rate * (1tax rate)]  (Loan Balance * Stable Value Rate)  PV of future tax pmt on 401k Interest
Profit = 100k*[.046125*(.75)]  (100k*.02) 404
Profit= $1,064.75
Or to make it even more eloquent:
Profit = (Loan Balance*aftertax mortgage rate)  (opportunity cost on investments)  PV of future tax pmt on 401k interest
Profit = (100k*.03459)2,000404
Profit= $1,064.75
Agreed?
I hope so because the 3day weekend is calling my name!
BTW, thanks for engaging in this banter. I enjoyed it.
I agree with the formula. I think you're overstating the PV of the future tax payment on the 401k interest – it could be that much, but it could also be much less. I don't know if you care at this point, but that's the only remaining disagreement.
I enjoyed this too. Frustrating at times, but overall quite enjoyable.

Sure, figuring the future tax pmt involves a bit of guesswork & there's no way we could really know without a time machine. But it can at least be estimated & I'd say its worth plugging in  even if it has to be projected using assumptions. After all, the entire reason any of these formulas or models exist is to help us nerds plan for an uncertain future.

Sure, figuring the future tax pmt involves a bit of guesswork & there's no way we could really know without a time machine. But it can at least be estimated & I'd say its worth plugging in  even if it has to be projected using assumptions. After all, the entire reason any of these formulas or models exist is to help us nerds plan for an uncertain future.
I agree. The modification I'd propose would include an offsetting amount for capital gains & dividends taxes. So instead of subtracting (PV of future tax payments from 401k loan interest), I'd subtract:
(PV of future tax payments from 401k loan interest)  (PV of future tax payments of invested sum outside 401k)
For a $4000 401k loan interest amount, assuming no short term capital gains, this can be approximated for short time periods by:
(n) * (average dividends * dividend tax rate) + $4000 * [(1 + r)^n  1] * marginal tax rate in retirement
where r = annual rate of return
n = number of years
Using current dividends would understate the amount over 20 years because dividends will increase substantially, but this can be fixed using an average:
If we assume a constant dividend yield = 2%, then average dividends can be approximated (but understated) as:
average dividends = dividend yield * $4000 * (1+r)^(n/2)
Plugging in numbers, we get:
dividend tax rate = 15%
r = 9% (remember this is nominal returns)
n = 20
marginal tax rate in retirement = 15%
then
20* (.15 * .02 * $4000 * (1.09)^10) + 4000 * (1.09^20  1) * .15
=568 + 2762
= 3330
Which isn't comparable because it's not a PV and also because you didn't assume any growth in the excess amount added to the 401k. The first concern can be addressed by converting the $3330 to a present value, which I'm going to ballpark (±10%) at $2200. The second concern can be addressed by refiguring the PV of the future tax payment of the 401k by adding growth. So:
PV of future tax payment = discounted (marginal tax rate in retirement * $4000 * (1 + r)^n]
gives discounted(.15 * 22417) = 3362.
A future value of $3362 discounts to ~ $2242.
Now the number can be compared, so (2242  2200) becomes 42.
The assumptions—or someone's individual tax situation—can make that value significantly different, though, so you can plug in your own numbers to see.

LOL i'm kind of glad we get to keep going.
I didnt account for cap gains, interest, etc because the gain on the $4k will be taxed in either situation: taxable or qualified. So the gains are a wash  could be better or worse, depending on how the money is invested. However, the $4k principal would only be subject to backend taxation in the 401k. It would not be subject to taxation ever again if placed in a taxable account.
Furthermore, since we're talking about 2% gain, a case could be made for the OP buying a 10yr treasury and never being tax again on any of the $4k plus gain if he went the taxable route. In that situation, to get the 401k PV of future tax liability we'd have to account for the $4k plus gains.
Make sense?

LOL i'm kind of glad we get to keep going.
I didnt account for cap gains, interest, etc because the gain on the $4k will be taxed in either situation: taxable or qualified. So the gains are a wash  could be better or worse, depending on how the money is invested. However, the $4k principal would only be subject to backend taxation in the 401k. It would not be subject to taxation ever again if placed in a taxable account.
Yes, the gains will be taxed either way  but the rate on those gains will be different, as will the number of times they are taxed. In many cases, the gain from deferring taxes is more important than the difference between ordinary income or capital gains taxes. That's why people used to use nondeductible IRAs instead of taxable accounts before a backdoor Roth was legal.
Furthermore, since we're talking about 2% gain, a case could be made for the OP buying a 10yr treasury and never being tax again on any of the $4k plus gain if he went the taxable route. In that situation, to get the 401k PV of future tax liability we'd have to account for the $4k plus gains.
Make sense?
No, because treasuries are taxable. Do you munis? If so, yes, that's true  but buying municipal bonds in an IRA when you have stocks in a taxable account would be idiotic.

LOL i'm kind of glad we get to keep going.
I didnt account for cap gains, interest, etc because the gain on the $4k will be taxed in either situation: taxable or qualified. So the gains are a wash  could be better or worse, depending on how the money is invested. However, the $4k principal would only be subject to backend taxation in the 401k. It would not be subject to taxation ever again if placed in a taxable account.
Yes, the gains will be taxed either way  but the rate on those gains will be different, as will the number of times they are taxed. In many cases, the gain from deferring taxes is more important than the difference between ordinary income or capital gains taxes. That's why people used to use nondeductible IRAs instead of taxable accounts before a backdoor Roth was legal.
Sure. But in many cases, the deferred taxes would be higher than a tax efficient investment held outside a qualified account. So, a wash. Neither side could win on this because a sound argument can be made either way & there are far too many variables.
Furthermore, since we're talking about 2% gain, a case could be made for the OP buying a 10yr treasury and never being tax again on any of the $4k plus gain if he went the taxable route. In that situation, to get the 401k PV of future tax liability we'd have to account for the $4k plus gains.
Make sense?
No, because treasuries are taxable. Do you munis? If so, yes, that's true  but buying municipal bonds in an IRA when you have stocks in a taxable account would be idiotic.
[/quote]
Ok, sorry, say munis. Of course you wouldnt hold munis in a qualified acct. But since we're assuming the stable value he is holding pays 2%, I'd make the case he could find an investment with virtually no risk outside of a 401k to get 2%. Like a AAA rated, insured tax free muni.

LOL i'm kind of glad we get to keep going.
I didnt account for cap gains, interest, etc because the gain on the $4k will be taxed in either situation: taxable or qualified. So the gains are a wash  could be better or worse, depending on how the money is invested. However, the $4k principal would only be subject to backend taxation in the 401k. It would not be subject to taxation ever again if placed in a taxable account.
Yes, the gains will be taxed either way  but the rate on those gains will be different, as will the number of times they are taxed. In many cases, the gain from deferring taxes is more important than the difference between ordinary income or capital gains taxes. That's why people used to use nondeductible IRAs instead of taxable accounts before a backdoor Roth was legal.
Sure. But in many cases, the deferred taxes would be higher than a tax efficient investment held outside a qualified account. So, a wash. Neither side could win on this because a sound argument can be made either way & there are far too many variables.
Yes, this is why in the absence of specific tax information, I'd approximate the tax effect of putting extra aftertax money in a 401k as 0.

I'd approximate the extra tax on the gains at zero. The principal, however, is subject to taxation upon withdrawal in the 401k scenario and is never subject to taxation if held outside of a qualified acct. Therefore, that difference in tax treatment should be accounted for.
The only scenario for which it wouldn't be relevant is if the OP's income tax rate is 0% in retirement, a highly unlikely scenario given that he has rental income, presumably other investment income, social security, etc. Only in this instance would it make sense to omit the PV of future tax pmt from the formula.

I'd approximate the extra tax on the gains at zero. The principal, however, is subject to taxation upon withdrawal in the 401k scenario and is never subject to taxation if held outside of a qualified acct. Therefore, that difference in tax treatment should be accounted for.
If you're including that, you should include the extra tax on the gains, since my several examples show that they're of similar size to the taxation on the principal.