When you contribute to a 401(k) you contribute on a pre-tax basis. That means the 401(k) contributions are taken from your pay before taxes are calculated. As a result you are paying taxes on a smaller amount (you pay tax on your pay minus your 401(k) contributions).

Since you are paying tax on a smaller amount you are paying less in taxes.

Your 401(k) investment also grows tax deferred. This means you are not paying tax on the gain in the account until you take it out.

The trade off for this tax favored treatment is that the IRS expects you to leave the money invested in a retirement account until retirement. Taking money out before age 59 1/2 will result in not only the money being subject to tax but also a 10% premature distribution penalty. There are some exceptions, you can generally use the money for retirement at any age and avoid the penalty through proper planning.

Because of the favorable tax treatment, and often matching contributions, the 401(k) is frequently considered the greatest wealth creating vehicle ever made! Contribute to your 401(k) but be sure to fund your other goals besides retirement!