A 401(k) and an employee stock purchase plan (ESPP) hold your money on different clocks. Money in a 401(k) is built to stay put, and taking it out before 59½ can mean income tax plus a 10% additional tax, with some exceptions. ESPP money comes out of each paycheck, buys company stock at a discount, and can be back in your account within months if your plan and trading policy let you sell soon after each purchase. That difference is why one order to consider is the employer match, then the ESPP, then the rest of the 401(k).

We cover the ESPP rules behind that order. Plans can price shares as low as 85% of the stock's value, some add a lookback, and you can buy up to $25,000 of stock a year, generally valued at the start of the offering. A hypothetical example shows the catch. Sell right away and the discount is taxed as ordinary income, with no required federal withholding. If the price drops before you sell, the gain shrinks or turns into a loss, but the ordinary income doesn't shrink with it. Then how ESPP sales can cover the gap in your take-home pay while you raise your 401(k) deferral to the 2026 limit of $24,500, and the planning that takes.

The order can flip if you can't sell soon after each purchase, if you already hold a lot of company stock through RSUs, if a big RSU year makes a pre-tax deferral worth more, or if you'll need the money within a few years. For your own plan, our guides cover the Microsoft ESPP and Intel ESPP, and the Microsoft 401(k) and Intel 401(k). ESPP Taxes Explained covers how the discount is taxed when you sell and what the holding periods change.