If you make $100,000 and put 10% of that into a 401k, your income tax will be based on a $90,000 income.
You do pay taxes on the money you put into a 401k when you start withdrawing from it during retirement, but what matters is this: if you believe your income during retirement (i.e. the money you'll be paid regularly out of your retirement accounts) will be less than your income today, then contributing to a 401k means you will end up paying a lot less in taxes overall, over the course of your life.
There are ways to take money out of your retirement accounts before retirement age, but it depends on certain scenarios[1]. If you need to access the money before retirement age outside of those scenarios, then do a regular brokerage account.
Regardless though, you should definitely open a Roth IRA if you're eligible, and contribute the maximum amount every year. Contributions to your Roth IRA are after-tax, so they won't be taxed when you take them out during retirement - since they have already been taxed. This makes them very advantageous.
In that case always max (currently $5,500/yr) a Roth IRA first, because you can withdraw the principal before retirement.
Second, if your company 401k offers loans the typical (maybe this is a legal thing?) max I hear is 50% up to 50k total. You're making a loan to yourself that pay back into the investment. Keep in mind if you leave the employer you may have to pay off the loan...
If you really might need access to your money it's probably best to stick to Roth IRA + taxable (non-retirement) investments.
Another thing about 401ks is the fund choices can sometimes be shit. If they're all high expense rate funds I don't even bother. These days the companies I've worked at typically offer one or two halfway decent index funds, YMMV.
If I had some unique situation where I wanted money more accessible, I'd forego the 401k and get into an IRA with Vanguard, with one or more index-tracking ETFs (VTI i think?). But, I'd make sure its done every single payday automatically and directly. No stop off at the savings/checking account.
*This is not professional investment advice.
I partially agree, but the big difference between a crap 401k with at least one decent index fund and a Traditional IRA is that I can dump 18k/yr into the 401k. IRAs phase out quickly and have low deposit/yr maxes.
Considering how often people change jobs these days, the 401k is a way for most people I know to shove 18k/yr into a special bucket so they can move it to Vanguard within a few years when they leave the company.
I've used a non-matching 401k mostly to save more money (and roll it into a Vanguard IRA as soon as possible) but a lot of advice I've read on the internet suggests maxing a Roth IRA before contributing to a non-matching 401k. (I don't have a Roth yet because it's always seemed crazy to me that my taxes will be higher in retirement than now. I see in this thread they have other advantages, like being able to withdraw principle.)