<prompt> Human: Hello PF! I have 46,000 in my traditional 401K, and am able to take a general purpose loan out of my 401k for 20,000 at an interest rate of 5.5 paying 227 payment deductions from each paycheck over 60 months. I wanted to use that 20,000 loan to pay off my student loan that I have, which totals 20,000 at an interest rate of 6.5. Does this make sense to do? To me, it seems obviously good to do because the 5.5 interest from the 401k loan is being paid back to me whereas the 6.5 interest on my student loans is going to the bank. Am I wrong?edit: I cannot write off the interest off my taxes for this student loan because it was used to pay for a graduate degree MBA from the University of Utah this is what my tax lady told me. Also, even while paying 227month to pay the 401k loan back per month, I plan to continue contributing to my 401k by matching my employers max match amount.  <response>: the interest on the 401k is irrelevant, you are paying yourself, means nothing.the real cost of a 401k loan is the forgone appreciation from exiting the market.So the ultimate question is, will your 401k earn 6.5 over the course of the repayment? I cant answer that.other concerns, if you leave your job, you enter a forced repayment, else you lose the loan and get a penalty for the early withdrawal. Thats typically a pretty big risk to take. 