<prompt> Human: Just something I was thinking about since Ive been paying off student loans instead of opting into my employers 401k. They match everything up to 20k annually, so can I essentially double minus the 15 percent or so penalty on withdrawing my money? My guess is obviously no but Im not sure.  <response>: This is a bad idea. Period. You are FAR better off getting the full employer match, and then leaving it in the 401k. The problem with your proposal is that you will immediately owe both 1. 10 penalty for the early withdrawal2. Income tax at your marginal rate for whatever you withdraw - Ill assume this is 25 for nowThis totals to be a 35 hit to your total . So if you start with 40k youre down to 26k right off the bat.Yes, you could use this 26k to pay of a student loan that lets assume is at a 10 interest rate. This reduces the amount of interest youre paying by 2600 per year each year you dump it in.Or you could keep the entire 40 invested. Lets assume the stock market only returns 4 over the next few years very low by historic standards.This spread sheet lays it outEssentially - you would need a loan that was several HUNDRED thousand dollars before these two strategies equaled out.Losing out on the tax deferred gains of the 401k is a terrible idea. 