Federal tax law limits how much you can contribute tax free to a 401(k). At the time of publication, the limit is $18,000 a year, though the maximum periodically increases along with inflation. If you're at least 50, you can contribute an additional $6,000 a year. Once you hit the limit, you can't contribute, though your employer can. Individual plans may set lower limits than the government does. Highly paid executives sometimes face extra restrictions so the plan doesn't favor them over lower-paid workers.
If your 401(k) plan permits it, you can borrow against the value of your account. As long as you repay the money on schedule, the loan isn't taxable income. For example, suppose you have $16,000 in the account and borrow $2,000 for an emergency. There's no tax on the loan, because money you're going to repay doesn't count as income. There's also no tax write-off for putting the money back in the account. If you default on the loan, the Internal Revenue Service treats the outstanding debt as a taxable withdrawal.
Interest on Loans
As with any loan, you'll have to repay your account with interest. While interest on some types of loans -- mortgages, for instance -- is tax deductible, 401(k) interest is not. If, say, your $2,000 loan earns a total of $150 interest, it comes out of your regular, taxable income. Then when you withdraw the interest after retirement, you pay tax on the money again. Even if you borrow from the plan to buy a home, that doesn't allow you to treat the money as mortgage interest, which would be deductible.
Some 401(k) plans give you the option to deposit your contributions to a 401(k) Roth account. You pay full tax on these contributions. When you withdraw the money in retirement, however, it's tax-free income. Your employer match is still tax free, but your employer has to deposit the money in a separate, non-Roth 401(k). Only your designated contributions go in the Roth. You have the same limits on contribution amounts as with a regular 401(k).