How should I calculate the opportunity cost of using a 401(k) loan?
One way to analyze the opportunity cost of using a 401K loan would be to calculate your net worth after using a 401K loan.  If your net worth increases then the 401K loan would be advisable.  Note that the calculations provided below do not take into account tax considerations. A net worth calculation is where you add all your assets and then subtract all your liabilities.  The resulting number is your net worth. First, calculate the net worth of not taking the loan and simply paying the credit card interest.  This means you only pay the interest on the credit card.  In addition to the parameters identified in your question, two additional parameters will need to be considered: Cash and the market rate of return on the 401K. Scenario 1 (only pay credit card interest): After 12 months all you have paid is the interest on the credit card.  The 401K balance is untouched so it will hopefully grow.  The balance on the credit card remains at the end of 12 months. Scenario 2 (use 401K loan to pay credit card balance): You borrow $5,000 from your 401K to pay the credit card balance.  You will have to pay $5,000 plus the 401K interest rate back into your 401K account. Use the following equation to determine when Scenario 2 increases your net worth more than scenario 1: Thus, if your credit card interest rate is greater than the rate you can earn on your 401K then use the 401K loan to pay off the credit card balance. Another scenario that should be considered: borrow money from somewhere else to pay off the credit card balance. Scenario 3 (external loan to pay credit card balance): You borrow $5,000 from somewhere besides your 401K to pay off the credit card balance. The following is used to determine if you should use an external loan over the 401K loan: This means you should use an external loan if you can obtain an interest rate less than the rate of return you can earn on your 401K.  The same methodology can be used to compare Scenario 3 to Scenario 1. "There is no equation. Only data that would help you come to the decision that's right for you.  Assuming the 401(k) is invested in a stock fund of one sort or another, the choice is nearly the same as if you had $5K cash to either invest or pay debt.  Since stock returns are not fixed, but are a random distribution that somewhat resembles a bell curve, median about 10%, standard deviation about 14%. It's the age old question of ""getting a guaranteed X% (paying the debt) or a shot at 8-10% or so in the market."" This come up frequently in the decision to pre-pay mortgages at 4-5% versus invest. Many people will take the guaranteed 4% return vs the risk that comes with the market. For your decision, the 401(k) loan, note that the loan is due if you separate from the company for whatever reason. This adds an additional layer of risk and another data point to the mix. For your exact numbers, the savings is barely $50. I'd probably not do it. If the cards were 18%, I'd lean toward the loan, but only if I knew I could raise the cash to pay it back to not default." Make sure that when you have the loan you still contribute enough to get the company match. For example:  An inability to maximize the match might need to be figured into the opportunity cost of the loan. Some companies will suspend your contributions for a specific number of months for a hardship withdraw.  Make sure you understand where the money comes from for the loan. Can you count the money that the company matched but you are not vested with, when determining the maximum amount of the loan?  If the money is in what is now a closed fund can you replenish the funds back into that fund if use it to fund the loan? Know what the repayment time period is of the loan.
The 5% to 6.5% loan rates are a bit high. You'll probably want to pay those off first, and make it one of your priorities as soon as you have a 6-month savings fund. This should probably take precedence over savings for retirement, unless you're giving up a 401(k) match. Pay extra on the highest-interest loan until it's all paid off, then switch to the next one down, and accelerate the payoff as much as you can. If you're looking at a loan at 6% and a payoff date in 8 years or so (2020), am extra dollar paid now will save you ~$0.60. Not a bad return in general, and an excellent return for something that's zero-risk. The other loans, at 2-3%, are different. An extra dollar paid now on a 2% loan will save you $0.17 over 8 years. That's a pretty mediocre return. If you have a good, stable job and good job prospects, and a decent family support network, and few commitments like children and mortgages, and a low cost of living... generally, the things that help you have a high tolerance for risk... then you should consider investing your money in the stock market instead of paying off these loans any earlier than you need to. (Broad index funds and the like, not individual stocks). "I'll add 2 observations regarding current answers.  Jack nailed it - a 401(k) match beats all. But choose the right flavor account.  You are currently in the 15% bracket (i.e. your marginal tax rate, the rate paid on the last taxed $100, and next taxed $100.) You should focus on Roth. Roth 401(k) (and if any company match, that goes into a traditional pretax 401(k). But if they permit conversions to the Roth side, do it) You have a long time before retirement to earn your way into the next tax bracket, 25%. As your income rises, use the deductible IRA/ 401(k) to take out money pretax that would otherwise be taxed at 25%.  One day, you'll be so far into the 25% bracket, you'll benefit by 100%   traditional. But why waste the opportunity to deposit to Roth money   that's taxed at just 15%? To clarify the above, this is the single rate table for 2015:  For this discussion, I am talking taxable income, the line on the tax return designating this number. If that line is $37,450 or less, you are in the 15% bracket and I recommend Roth. Say it's $40,000. In hindsight on should put $2,550 in a pretax account (Traditional 401(k) or IRA) to bring it down to the $37,450. In other words, try to keep the 15% bracket full, but not push into 25%.  Last, after enough raises, say you at $60,000 taxable. That, to me is ""far into the 25% bracket."" $20,000 or 1/3 of income into the 401(k) and IRA and you're still in the 25% bracket. One can plan to a point, and then use the IRA flavors to get it dead on in April of the following year.  To Ben's point regarding paying off the Student Loan faster - A $33K income for a single person, about to have the new expense of rent, is not a huge income. I'll concede that there's a sleep factor, the long tern benefit of being debt free, and won't argue the long term market return vs the rate on the loan. But here we have the probability that OP is not investing at all. It may take $2000/yr to his 401(k) capture the match (my 401 had a dollar for dollar match up to first 6% of income). This $45K, after killing the card, may be his only source for the extra money to replace what he deposits to his 401(k). And also serve as his emergency fund along the way." "There is a very simple calculation that will answer the question: Is the expected ROI of the 401K including the match greater than the interest rate of your credit card? Some assumptions that don't affect the calculation, but do help illustrate the points. You have 30 years until you can pull out the 401K. Your credit card interest rate is 20% compounded annually.  The minimum payoffs are being disregarded, because that would legally just force a certain percentage to credit card. You only have $1000.  You can either pay off your credit card or invest, but not both.  For most people, this isn't the case.  Ideally, you would simply forego $1000 worth of spending, AND DO BOTH  Worked Example: Pay $1000 in Credit Card Debt, at 20% interest.   After 1 year, if you pay off that debt, you no longer owe $1200.  ROI = 20% (Duh!) After 30 years, you no longer owe (and this is pretty amazing) $237,376.31.  ROI = 23,638% In all cases, the ROI is GUARANTEED. Invest $1000 in matching 401k, with expected ROI of 5%. 2a. For illustration purposes, let's assume no match After 1 year, you have $1050 ($1000 principal, $0 match, 5% interest) - but you can't take it out. ROI = 5% After 30 years, you have $4321.94, ROI of 332% - assuming away all risk. 2b. Then, we'll assume a 50% match. After 1 year, you have $1575 ($1000 principle, $500 match, 5% interest) - but you can't take it out. ROI = 57% - but you are  stuck for a bit After 30 years, you have $6482.91, ROI of 548% - assuming away all risk. 2c. Finally, a full match After 1 year, you have $2100 ($1000 principle, $1000 match, 5% interest) - but you can't take it out. ROI = 110% - but again, you are stuck. After 30 years, you have $8643.89, ROI of 764% - assuming away all risk. Here's the summary - The interest rate is really all that matters.  Paying off a credit card is a guaranteed investment.   The only reason not to pay off a 20% credit card interest rate is if, after taxes, time, etc..., you could earn more than 20% somewhere else.   Note that at 1 year, the matching funds of a 401k, in all cases where the match exceeded 20%, beat the credit card. If you could take that money before you could have paid off the credit card, it would have been a good deal. The problem with the 401k is that you can't realize that gain until you retire. Credit Card debt, on the other hand, keeps growing until you pay it off. As such, paying off your credit card debt - assuming its interest rate is greater than the stock market (which trust me, it almost always is) - is the better deal. Indeed, with the exception of tax advantaged mortgages, there is almost no debt that has an interest rate than is ""better"" than the market." First I must say that I'm not a Ramsey fan. Sometimes loans will make your financial situation significantly better. Especially if its a 0% loan. Generally, I do think that leveraging has its place, its the ab-use of loans what causes problems, not the use. Re your question - you're right in trying to first build up an emergency fund. You should have enough in it to be able to pay for yourself for at least half a year of unemployment or zero income. You only have one month. Your family member gave you money for free, which is admirable, but I'm sure there's a limit to everyone's generosity and he might not give it to you for free again, once you pay it off. Thus, you should be able to handle your future troubles on your own, and emergency fund is a crucial part of this. Pay as agreed, try not to be late, and you'll pay the loan off within 3 years. If you accumulate enough emergency fund, and you still have some extra left - pay some extra on the loan in order to pay it off early. Do make sure you take full advantage of the employer's 401k match. This has, IMHO, much higher priority than paying off the 0% loan early. "At first blush, this seems like it makes sense - assuming, like you say in your question, that you are perfectly confident in your ability to repay (even if you need to pay the balance in full if you lose your job), then this seems like a guaranteed 4% return, and a reasonable part of your retirement portfolio. Where it falls apart, though, is that you're paying yourself. You're just taking the money out of one pocket and putting it in another. So really you're getting a guaranteed 0% return. You're losing the compounding growth of the loan amount while it's out of your accounts, and the fact that you can afford the 4% interest means you could have been putting that into a requirement account as well aside from the loan - so it doesn't really count as ""interest"" in the sense that your money is passively making money for you. So ultimately: no, it shouldn't count as part of your bond allocation." "The original question was aimed at early payment on a student loan at 6%. Let's look at some numbers.  Note, the actual numbers were much lower, I've increased the debt to a level that's more typical, as well as more likely to keep the borrower worried, and ""up at night.""  On a $50K loan, we see 2 potential payoffs. A 6 year accelerated payoff which requires $273.54 extra per month, and the original payoff, with a payment of $555.10. Next, I show the 6 year balance on the original loan terms, $23,636.44 which we would need to exceed in the 401(k) to consider we made the right choice.  The last section reflects the 401(k) balance with different rates of return. I purposely offer a wide range of returns. Even if we had another 'lost decade' averaging -1%/yr, the 401(k) balance is more than 50% higher than the current loan debt. At a more reasonable 6% average, it's double. (Note: The $273.54 deposit should really be adjusted, adding 33% if one is in the 25% bracket, or 17.6% if 15% bracket. That opens the can of worms at withdrawal. But let me add, I coerced my sister to deposit to the match, while married and a 25%er. Divorced, and disabled, her withdrawals are penalty free, and $10K is tax free due to STD deduction and exemption.) Note: The chart and text above have been edited at the request of a member comment.  What about an 18% credit card? Glad you asked -  The same $50K debt. It's tough to imagine a worse situation. You budgeted and can afford $901, because that's the number for a 10 year payoff. Your spouse says she can grab a extra shift and add $239/mo to the plan, because that' the number to get to a 6 year payoff.  The balance after 6 years if we stick to the 10 year plan? $30,669.82. The 401(k) balances at varying rates of return again appear above. A bit less dramatic, as that 18% is tough, but even at a negative return the 401(k) is still ahead. You are welcome to run the numbers, adjust deposits for your tax rate and same for withdrawals. You'll see -1% is still about break-even.  To be fair, there are a number of variables, debt owed, original time for loan to be paid, rate of loan, rate of return assumed on the 401(k), amount of potential extra payment, and the 2 tax rates, going in, coming out. Combine a horrific loan rate (the 18%) with a longer payback (15+ years) and you can contrive a scenario where, in fact, even the matched funds have trouble keeping up. I'm not judging, but I believe it's fair to say that if one can't find a budget that allows them to pay their 18% debt over a 10 year period, they need more help that we can offer here. I'm only offering the math that shows the power of the matched deposit.   From a comment below, the one warning I'd offer is regarding vesting. The matched funds may not be yours immediately. Companies are allowed to have a vesting schedule which means your right to this money may be tiered, at say, 20%/year from year 2-6, for example. It's a good idea to check how your plan handles this. On further reflection, the comments of David Wallace need to be understood. At zero return, the matched money will lag the 18% payment after 4 years. The reason my chart doesn't reflect that is the match from the deposits younger than 4 years is still making up for that potential loss. I'd maintain my advice, to grab the match regardless, as there are other factors involved, the more likely return of ~8%, the tax differential should one lose their job, and the hope that one would get their act together and pay the debt off faster." I have credit card debt of about $5000  That's the answer right there. You told us the 401(b) has no match. The next highest priority would be credit card debt that's costing you interest. You didn't mention the rate on the card, I'm assuming it's 8% or more.  As far as your balance sheet (the 'bottom line') is concerned, pay off a 10% debt is the same as earning 10% on your money. If anyone promises you a higher return with a different investment, I'd run the other way. We hope the market, i.e. the US stock market, as measured by a broad index, say the S&P 500, will return 8-10%/yr over the long term, but this isn't guaranteed. Paying off that credit card will save you the interest every year, and free up the payments to invest elsewhere.  In response to Marlene's comment - Crazy? No. Human nature and emotion is what it is. I honestly don't know how to address some of it. Years ago, I was in a similar situation with a reader who had a $5000 'emergency' account, yet had $5000 in credit card debt. I had a tough time getting my head around why it wasn't obvious this made no sense. In your case, I might suggest you pay the card down to below $1000 and have the credit line reduced. Paying high interest on $5K makes no sense at any point in one's life. At least a 20-something can dig his way out and learn a lesson. A pre-retiree shouldn't be throwing this money away. "I think the math is wrong. Note that in Scenario #1, you are only out of pocket $1000, while in Scenario #2, you are out of pocket $1250;  the contribution and the tax you paid with respect to it. A better concept than tax rate is ""Retention Rate"".  This is the fraction of your money that the Feds let you keep.  And Growth Factor is the how much the investment grows. So In Scenario #1, you multiply $1000 by the investment Growth Factor and then by the retirement Retention Rate. And in Scenario #2, you multiply the same $1000 by the current Retention Rate and then by the Growth Factor. Since in your approximation, the two GFs are the same, there is no saving..." Answers to this your question break down along a few lines regarding opportunity costs of tying up a significant chunk of your salary and assets in one piece of property, as opposed to other things you'd like to do with your life.  The 30 year standard mortgage was invented in the 30's as part of FDR's new deal to make housing affordable to more people, while relieving the strain on the market of foreclosed homes from ~10 year interest only balloon mortgages (sound familiar?). The 30 year term tends to follow the career of the average American of that era, allowing them to pay the house off and live out the remainder of their lives there at a lower cost.  Houses are depreciating assets because they wear out over time. Their greatest investment value is a place to live. The appreciation on a home comes from the real estate it sits on and the community the property is located in. Value is determined by desirability of the house and community in their current state, and the supply of property in the area. This value can only be extracted when you sell the home. This partially answers your last question noting that you shouldn't buy a really expensive building for investment value. We've learned in recent years that there are no long term guarantees of property value either, because land and communities can decrease in value due to unemployment, over supply, crime, pollution, etc. Only buy as much home as you will need in the next decade or so, in a place that you will like living over that time period, and don't consider it much of an investment. I will tell you to get a fifteen year fixed rate mortgage since it's readily available at lower rates and has a significantly lower total purchase price than the standard 30 years. The monthly payment difference isn't that great, and anyone who looks at the monthly payment as opposed to the total costs, your priorities and the opportunity costs shouldn't be trusted for financial advice. I don't like debt. There are psychological benefits to being free from the bondage and drain of a long term mortgage on your finances.  The biggest argument for paying off your home quickly is freedom to pursue other desires with all of your salary and the assets you have available to you. Some financial advisers will tell you to keep your mortgage costs under 25% of your income, so that you can actually live off the money you make. I would also recommend paying at least enough into your 401k to get the company match and fully funding your Roth IRA. I'd also have an emergency fund to cover at least 6 months of expenses, including this mortgage in case you lose your job. A 15 or 20 year mortgage will give you breathing room to take care of these other priorities, and you can overpay on almost any mortgage to decrease the principal and finish in a shorter time period (make sure to get a mortgage that allows prepayment) . More financially savvy people may tell you to take the 30 year mortgage and invest the difference. Especially with mortgage rates around 4%, this is a very cheap way to increase your purchasing power and total assets. Most people lack the investment prowess and self discipline to make this plan pay off. There are even fewer guarantees regarding markets and investments than property. This also is a way of diversifying your total assets to protect against loss of value in your home. This approach has backfired for thousands of people who are underwater on their homes. This problem is often compounded by job loss forcing you to move, or increasing your commute, making your home less desirable for you. Some people will tell you to maintain the mortgage for the tax credit. This fails a basic math test since you only get about a quarter of the money (depending on your tax rate) that you are paying in interest back from the government. The rest of the money goes to bank at no gain to you. This approach is basically a taxpayer subsidized decrease of your 4% interest payment to a 3% interest payment (assuming you have ~ $5000 in other deductions), and only pays off if you can successfully invest the money at a rate somewhat greater than 3%. Not applicable.  Or, at least totally unrealistic.  Lots of assumptions about returns, no discussion of time frames, and no discussion of volatility.  If it's a personal choice you wouldn't do it this way, plus there are other factors to consider.  As far as the math of the question, you use a discount rate that allows you to account for alternatives, typically a RFR, but again, that doesn't apply to an individual quite in the same way since it's not a debt vs equity question. This is great, thank you. Can you think of any cases where expected return is greater than interest payments (like in #2) but the best choice would still be raise money through equity issuing? My intuition tells me this may be possible for an expensive company. It looks like your Solo 401K loan will need to repaid in 5 years.  If you borrow too much in order to pay back in this time you run into the typical 401K loan risks, that it is considered a distribution.  Don't borrow more then can be repaid in that time. When you borrow money from your 401K, it is no longer invested in the market.  Lets assume  that you are borrowing at 6% or so, and your LOC is at 3.5%, and the mutual funds you are invested in are returning 9%.  You would be better off with the LOC.  As you are paying 3.5% but earning 9%.  Keep in mind with a LOC that is variable you have interest rate risk, where you don't really have that with the 401K loan. I think the 401K loan is riskier then you are allowing.  If you do not pay it back within the allotted time, you get nailed for 40% of the unpaid balance.  That is quite high.  With the HELOC, you can weather quite a few negative credit events without your home ever being in jeopardy. While you can borrow money from a 401(k) for your home down payment, there are disadvantages, including but not limited to: The 401(k) is designed as a way to save for retirement. Smaller contributions and balances (due to the loan) in your account will add up and significantly reduce your balance over time. If you lose your job you will have to pay back the loan quickly, within 60 days. Interest on the 401(k) loan is also not tax-deductible, even if you're using it to pay for a home. My advice: max out any employer contributions to your 401(k) because it's free money. After that, extra savings for a house should be in a separate account. 817/150,000 = .54% Fees are based on balances not deposits, usually. Putting a front loaded fund as an option in a 401(k) should be criminal, not sure it is though.  Ask your HR dept to provide you fee details. If the .54% is correct, it's not bad.  I hope you have money from prior jobs as well, by the way. It would help if we had numbers to walk you through the analysis. Current balance, rate, remaining term, and the new mortgage details.  To echo and elaborate on part of Ben's response, the most important thing is to not confuse cash flow with savings. If you have 15 years to go, and refinance to 30 years, at the rate rate, your payment drops by 1/3. Yet your rate is identical in this example.  The correct method is to take the new rate, plug it into a mortgage calculator or spreadsheet using the remaining months on the current mortgage, and see the change in payment. This savings is what you should divide into closing costs to calculate the breakeven. It's up to you whether to adjust your payments to keep the term the same after you close.  With respect to keshlam, rules of thumb often fail. There are mortgages that build the closing costs into the rate. Not the amount loaned, the rate. This means that as rates dropped, moving from 5.25% to 5% made sense even though with closing costs there were 4.5% mortgages out there. Because rates were still falling, and I finally moved to a 3.5% loan. At the time I was serial refinancing, the bank said I could return to them after a year if rates were still lower. In my opinion, we are at a bottom, and the biggest question you need to answer is whether you'll remain in the house past your own breakeven time. Last - with personal finance focusing on personal, the analysis shouldn't ignore the rest of your balance sheet. Say you are paying $1500/mo with 15 years to go. Your budget is tight enough that you've chosen not to deposit to your 401(k). (assuming you are in the US or country with pretax retirement account options) In this case, holding rates constant, a shift to 30 years frees up about $500/mo. In a matched 401(k), your $6000/yr is doubled to $12K/year.  Of course, if the money would just go in the market unmatched, members here would correctly admonish me for suggesting a dangerous game, in effect borrowing via mortgage to invest in the market. The matched funds, however are tough to argue against.