It's December. You maxed out your 401(k) and it felt great. Then a coworker mentioned she's been buying company stock at a discount all year. You skipped it because your paycheck couldn't do both. Did you fill the wrong one first? And what if you didn't have to choose?
The two plans don't hold your money the same way. Money in a 401(k) is built to stay put. Take it out before 59½, and you can owe income tax plus a 10% penalty, with a few exceptions.
An employee stock purchase plan, or ESPP, runs on a much shorter clock. Money comes out of each paycheck, builds up over an offering period, say six months, and then buys company stock at a discount. If your plan and your company's trading policy let you, you might be able to sell soon after the purchase, and that cash can be back in your account within a few months. That difference changes the order of priority.
Let's start with the match. If your employer matches your 401(k), that's the first dollar I'd look at. Say, on a hypothetical, your plan adds 50 cents for every dollar you put in, up to a cap. Every dollar you defer up to that cap brings another 50 cents with it, and that's before any investment gain or loss. If your deferrals are pre-tax, they also lower this year's taxable income. The tax is deferred, and then you pay it when the money comes out in retirement. One thing to check here. Some matches vest over time, so leaving your company early can cost you some of that employer match.
Now, the match was the easy call. The discount takes more thought. The tax code lets these plans price shares as low as 85% of the stock's value. That's a 15% discount. Some plans also use a lookback, pricing off the lower of the stock price at the start of the offering period or at the purchase date. Your plan may offer less.
There's a ceiling here, too. You can buy up to $25,000 of stock a year under these plans, generally valued at the start of the offering. Note that your plan can also set a lower cap on how much stock you can purchase.
Let's look at a hypothetical example. Assume you put in $21,250 over the year, the stock price stays flat, and you end up buying $25,000 worth of shares. If you sell right away, that's $3,750 more than you put in, before taxes.
Here's the catch, though. That $3,750 is taxed as ordinary income, and there's no federal withholding on it, so it can show up as a bill in April. And the price can move between the purchase and the sale. If it drops, the gain shrinks or turns into a loss, but the ordinary income doesn't shrink with it. The drop becomes a capital loss.
Because the ESPP can hand your cash back within months, it can help pay for the 401(k). We'll stay with that same hypothetical example. You raise your 401(k) deferral to the full $24,500 for 2026, and your take-home pay drops as a result. Then each time the ESPP buys shares, you sell them and use that cash to cover the gap in your budget. Most of that cash is your own pay coming back to you. The extra is the discount on top, minus any taxes. That's what helps fund the 401(k). Again, assuming that the share price holds.
It takes planning. The first purchase can be months away, so you need cash to carry the early paychecks. And every sale is a tax event you'll have to account for. So, for some people, the answer to which one first is both, but in a deliberate order.
Here's where things can flip. If you can't sell soon after the purchase, the math might change. Check your plan and your trading policy, because they may restrict when you can sell. Every week you hold, you're carrying the price risk. If you already own a lot of company stock through RSUs, holding ESPP shares stacks more on the same company. Concentrated positions carry the risk of significant loss. If you're in a big RSU year, say the 32 or 35% bracket, a pre-tax deferral can be worth more this year than in a lower-income one. That can move the rest of the 401(k) up the list of priorities. And if you'll need this money for a house or a cash cushion in the next few years, anything past the match in a 401(k) makes it harder to reach.
Before you pick an order, I'd want four questions answered. Are you getting your full match? Can you sell your ESPP shares soon after each purchase? How much of your net worth is already in company stock? And what else does your paycheck have to fund this year?
In my experience, the people who get the most out of these two plans pick an order deliberately, and they look at it again every year. The answers can point to the match, then the ESPP, then the rest of the 401(k). Or they can point somewhere else altogether. Either way, it's a choice worth making on purpose.
Our ESPP taxes video and our company plan guides are linked in the description. And if you'd like help fitting your 401(k), your ESPP and your RSU vests into one plan, click the link in the description and tell us a little about your situation. If we can work with you in your state, we'll set up a time to talk.
This video is educational and general in nature. It is not tax, legal, or investment advice, and it is not a recommendation to buy, sell, or hold any security. The figures are hypothetical, for illustration only, and the limits and rules are federal as of 2026, which can change. Plan features vary by employer, and all investing involves risk, including the possible loss of principal.