Taxes

Tax-Loss Harvesting for Tech Workers: The Rules That Actually Matter

Not tax or financial advice. This is educational content about how capital losses and the wash-sale rule work. Tax rules are fact-specific and change often — consult a licensed tax professional before selling anything for tax reasons.
Key takeaway

A realized loss offsets your capital gains first, then up to $3,000 a year of salary ($1,500 if married filing separately), with the rest carried forward indefinitely. The trap for tech workers is the wash-sale rule: an RSU vest, ESPP purchase, or dividend reinvestment within 30 days of your sale can disallow the loss — and on a monthly vesting schedule, every day of the year is inside that window. The deadline for 2026 is the trade date, Thursday, December 31, 2026. Figures here are as of November 30, 2026, verified against IRS Publication 550, IRS Topic 409, and Revenue Procedure 2025-32.

Tax-loss harvesting is the one tax break that starts with losing money. You sell an investment that has fallen, the loss cancels tax you would otherwise owe, and — if you still want the exposure — you buy something similar but not identical and carry on. Done right, it turns a bad year in the market into a smaller tax bill. Done carelessly, it turns into a wash sale: the loss disallowed, the paperwork doubled, and the tax saving gone until some future year.

For tech workers the stakes are higher than for most investors, because the portfolio is rarely just a brokerage account. There are RSU lots with different vest-date bases, ESPP purchases on a fixed calendar, a 401(k) buying the same index fund every payday, and a spouse's account holding the same ticker. Every one of those can be the purchase that washes your loss. The rules below are the ones that actually decide whether a harvest works.

How a loss becomes a tax saving

The mechanics run in a fixed order on Schedule D. Short-term gains and losses are netted together, long-term gains and losses are netted together, and then the two results are combined. If losses exceed gains, you may deduct the lesser of $3,000 ($1,500 if married filing separately) or your total net loss against other income — salary, bonus, interest — on Form 1040. Whatever is left carries forward to the next year under section 1212(b), keeping its short-term or long-term character, and you keep carrying the remainder until it is used up. Publication 550's words: the carryover continues "until it is completely used up." There is no expiry date.

The order matters because short-term and long-term gains are taxed at very different rates. A short-term gain — an asset held one year or less — is taxed as ordinary income, up to 37% federally in 2026. A long-term gain is taxed at 0%, 15%, or 20%, depending on your taxable income: for 2026, the 0% rate covers taxable income up to $49,450 for a single filer and $98,900 for a married couple filing jointly, and the 20% rate starts above $545,500 single and $613,700 joint (Revenue Procedure 2025-32). A loss that cancels a short-term gain is therefore worth roughly twice a loss that cancels a long-term gain at the same bracket. And a loss that offsets salary through the $3,000 allowance is taxed at your marginal ordinary rate — the most valuable use of all, dollar for dollar.

What the $10,000 loss offsetsYour rateTax saved
Long-term gain, 15% bracket15%$1,500
Long-term gain, 20% bracket20%$2,000
Short-term gain, 32% bracket32%$3,200
Salary, via the $3,000 annual allowance (32% bracket)32%$960 a year
Salary, via the $3,000 annual allowance (35% bracket)35%$1,050 a year

Two honest caveats before the number seduces you. First, harvesting does not create wealth — it recovers part of a loss. A $10,000 loss that saves $1,500 in tax still leaves you $8,500 poorer than if the investment had held its value, so never sell something you would otherwise keep just to manufacture a loss. Second, the loss you use today is a basis you do not have tomorrow: if you sell and rebuy a similar fund, the new shares carry the lower basis, so a future sale may produce a larger gain. Harvesting is usually still worth it — a saving today beats a possibly larger bill years from now, and the $3,000-a-year salary offset never comes back — but it is a timing play, not free money.

Harvested losses also reduce the 3.8% net investment income tax, which applies above $200,000 of modified adjusted gross income for single filers and $250,000 for joint filers — thresholds that are not indexed for inflation, so a growing share of tech workers crosses them every year.

The wash-sale rule: a 61-day window, not 30

Section 1091 disallows a loss if, within 30 days before or after the sale, you buy substantially identical stock or securities, acquire them in a fully taxable trade, or enter into a contract or option to buy them. The window runs in both directions, so it is 61 days — 30 days before the sale, the sale date itself, and 30 days after. A purchase you made three weeks before the sale washes it just as thoroughly as a purchase three weeks after. That backward half is the part most people miss, and it is why a December harvest has to account for everything you bought in November.

The rule is share-for-share, not all-or-nothing. Sell 300 shares at a loss and acquire 120 substantially identical shares inside the window, and the loss on 120 shares is disallowed while the loss on the other 180 survives. The disallowed piece is added to the cost basis of the replacement shares, and their holding period includes the time you held the shares you sold — so in a taxable account a wash sale is usually a timing penalty, not a confiscation. The loss comes back when you eventually sell the replacement shares and stay out of the stock for 30 days. The timing can still hurt: a December sale washed by a January purchase pushes the deduction into the next tax year, which is the whole point of harvesting in December.

There is one place the loss is destroyed, not deferred. If the replacement shares are acquired for your IRA or Roth IRA, Revenue Ruling 2008-5 says the loss is disallowed and the basis of the IRA shares is not increased — the loss is forfeited entirely. The same applies to a purchase by your spouse, or by a corporation you control. The IRS has never ruled definitively on purchases inside a 401(k), so treat one as a risk, not a safe harbor. And do not rely on your broker to catch any of this: a 1099-B flags wash sales it can see in that one account, but a replacement purchase in a different account — your IRA, your spouse's brokerage, your equity portal — is invisible to it. Under the Form 8949 instructions, you report a wash sale with code W, and the obligation is yours whether or not the form flagged it.

The RSU trap: your next vest is a purchase

This is the rule that catches tech workers specifically. The day RSUs vest, you receive shares of your employer's stock with a basis equal to that day's market price, and the value lands on your W-2 as compensation. For wash-sale purposes that delivery is an acquisition of substantially identical stock. It does not matter that the vest was scheduled years ago in a grant agreement, that you never clicked a button, or that your broker sold a slice of the delivery to cover withholding. The net shares that hit your account are replacement shares if they arrive within 30 days of a sale at a loss, and the window runs in both directions, so a vest three weeks before your sale washes it just as thoroughly as a vest three weeks after.

Publication 550 gives the example directly: an employee who receives another award of substantially identical stock within 30 days of a sale at a loss cannot deduct the loss. A quarterly RSU vest is exactly that kind of acquisition. So is an ESPP purchase, an option exercise, and a dividend reinvested automatically in company stock.

The vesting calendar decides how much room you have. On a quarterly schedule there is a usable gap in the middle of each quarter, from 31 days after the last vest to 31 days before the next one — a window of roughly a month. On the monthly schedules that have become standard at large tech companies, every day of the year sits within 30 days of some vest, which means every sale of company stock at a loss is at least partly washed, for as long as the grants keep vesting. The saving grace is the share-for-share matching: a small vest disallows only a small piece of a large loss. Sell 300 shares at a $15-a-share loss and have 120 shares vest inside the window, and $1,800 of the $4,500 loss is disallowed while $2,700 survives. The disallowed $1,800 is added to the basis of the 120 new shares, so it is deferred, not destroyed — but it moves out of the tax year you were harvesting for.

The practical fix is unglamorous: before you sell employer stock at a loss, pull your vest schedule and ESPP purchase dates for the 61 days around the sale — 30 days back, 30 days forward — and sell in the gap if there is one. If there is no gap, sell anyway and accept the partial wash, or sell a different holding whose loss is clean. And check the lots: years of vesting at different prices mean some lots show gains and others show losses, so identifying specific lots to sell usually beats your broker's default first-in-first-out order. For RSU shares, your basis is the vest-date price, because that amount was already taxed as wages — the loss is the fall since vest, not since grant.

Swapping without washing: the "substantially identical" gray zone

The wash-sale rule blocks buying the same thing back. It does not block buying something similar. The problem is that the IRS has never published a precise definition of "substantially identical," so the line is drawn by practitioner consensus and a handful of old rulings rather than a checklist. What is reasonably clear, from Publication 550 itself: stocks or bonds of one corporation are generally not substantially identical to those of another corporation. Selling your employer's stock and buying a competitor's is not a wash sale. Selling one company's shares and buying another's never is.

With funds, the working rule most practitioners use is the index. Two funds tracking different indexes — say, an S&P 500 fund swapped for a total-market fund — are generally treated as different securities, because the underlying holdings differ. Two funds tracking the same index, or different share classes of the same fund, are treated as substantially identical and will wash. That is a consensus view, not an IRS rule, and the IRS could disagree in a specific case — but it is the standard every automated harvesting service uses. The practical version for a tech worker: sell the S&P 500 fund at a loss, buy a total-market or large-cap fund, keep the exposure, keep the loss. TurboTax and other tax software will compute the harvested loss for you, but only if you tell it the sale happened — and it will not know about a vest that washed it unless you enter the wash sale yourself.

One swap that does not work: selling at a loss and buying the same stock in your IRA, as above — the loss is forfeited, not deferred. Another to treat with suspicion: selling a fund at a loss and buying it back in your 401(k) the next payday. The IRS has not ruled on it, and the conservative reading is that it washes. If your 401(k) auto-buys the same index fund every two weeks, that standing purchase is itself a replacement acquisition for any loss sale of that fund in your taxable account. The cleanest setup is to hold different funds in the 401(k) and the taxable account, so the automatic purchases never collide with your harvesting.

Crypto: the one place the wash-sale rule does not reach

Cryptocurrency is the exception that proves how narrow section 1091 is. The statute reaches stock and securities; the IRS has treated cryptocurrency as property since Notice 2014-21, so selling a token at a loss and buying it straight back does not trigger a wash sale. As of 2026 that gap is still open, and it is the reason crypto tax-loss harvesting can be done the same day, with no 30-day wait and no substitute asset.

Do not assume it lasts forever. The House Ways and Means Committee approved H.R. 10357, the Digital Asset Tax Certainty Act, by 38–5 on September 16, 2026; the bill would apply the wash-sale and constructive-sale rules to traded digital assets. It has not passed the full House or the Senate, and reporting around the markup suggested it was unlikely to become law in 2026 — but it is the furthest a crypto wash-sale proposal has ever got. Treat the current rule as the law of this tax year, not a permanent feature. Two caveats regardless: crypto ETFs and crypto-related stocks are securities, so the wash-sale rule applies to them in full, and the economic substance doctrine lets the IRS disregard a transaction with no meaningful purpose beyond reducing tax. Document the lots you sold, with specific identification, because the basis math is what turns a harvested crypto loss into a defensible one.

The December checklist

Harvesting is a year-end exercise because the loss counts in the year of the trade date, not the settlement date. A sale on Thursday, December 31, 2026 — the last trading day of the year — counts for 2026 even though it settles in January. But a sale on December 31 also has a wash-sale window that runs to January 30, 2027, so a buyback in early January still washes it. The checklist:

Tax-Loss Harvesting FAQ

How much can tax-loss harvesting actually save?

It depends on what the loss offsets. A $10,000 long-term loss that cancels a $10,000 long-term gain saves $1,500 at the 15% rate; the same loss cancelling a short-term gain taxed at 32% saves $3,200. After gains are gone, up to $3,000 of net loss a year offsets salary and other ordinary income — $960 a year at a 32% bracket, $1,050 at 35% — and the unused remainder carries forward indefinitely. The saving is real, but it is a rebate on a loss, not a profit: a $10,000 loss that saves $1,500 in tax still leaves you $8,500 poorer.

What is the wash sale rule?

Under Internal Revenue Code section 1091, you cannot deduct a loss if you buy substantially identical stock or securities within 30 days before or after the sale — a 61-day window with the sale date in the middle. The disallowed loss is usually added to the cost basis of the replacement shares, so it is deferred rather than destroyed, and the replacement shares inherit the old holding period. The exception is when the replacement shares land in an IRA or Roth IRA: under IRS Revenue Ruling 2008-5 the loss is forfeited permanently, because the basis bump has nowhere to go. The rule also covers purchases by your spouse and by a corporation you control, and your broker's 1099-B may not flag a wash sale that spans accounts — reporting it on Form 8949 with code W is your job.

Can an RSU vest trigger a wash sale?

Yes. The day RSUs vest you acquire shares of your employer's stock, with a basis equal to that day's market price, and that delivery counts as an acquisition for wash-sale purposes — even though you never placed a buy order and the schedule was set years ago. IRS Publication 550 gives the example of an employee who receives another award of substantially identical stock within 30 days of a sale at a loss. On a quarterly vesting schedule there is usually a usable gap in the middle of each quarter, from 31 days after the last vest to 31 days before the next one. On a monthly vesting schedule, every day of the year sits within 30 days of some vest, so a sale of employer stock at a loss is at least partly washed for as long as the grants keep vesting. The same applies to ESPP purchases, option exercises, and dividends reinvested in company stock.

Does the wash sale rule apply to crypto?

Not to crypto you hold directly, as of 2026. Section 1091 reaches only stock and securities, and the IRS has treated cryptocurrency as property since Notice 2014-21, so selling a token at a loss and buying it straight back does not trigger a wash sale. That gap may close: the House Ways and Means Committee approved H.R. 10357, the Digital Asset Tax Certainty Act, by 38–5 on September 16, 2026, which would extend the wash-sale rule to digital assets — but it has not passed the full House or the Senate, so current law still applies. Crypto ETFs and crypto-related stocks are securities, so the wash-sale rule applies to them in full, and the economic substance doctrine lets the IRS disregard a transaction with no purpose beyond cutting tax.

Can I harvest losses inside my 401(k) or IRA?

No. Losses inside a 401(k), IRA, or other qualified retirement plan are not deductible — Publication 550 says its capital-loss rules do not apply to investments held inside those accounts. Only sales in a taxable brokerage account create a harvestable loss. Worse, buying the same security inside your IRA or Roth IRA within 30 days of selling it at a loss in a taxable account triggers a wash sale and forfeits the loss permanently under Revenue Ruling 2008-5. The IRS has not ruled definitively on whether the same applies to purchases inside a 401(k), so treat a 401(k) purchase of the same fund as a risk, not a safe harbor. For tax year 2026, the deadline is the trade date: a sale on Thursday, December 31, 2026 counts for 2026 even though it settles in January.

Claim the loss before the year closes

The loss is already yours — the market gave it to you. The only question is whether it does any work before December 31. A harvested loss that cancels a short-term gain is worth up to 37 cents on the dollar; the same loss left unclaimed is worth nothing, and it does not carry forward on its own — only a realized loss does. So the December move is small and specific: list the gains you already realized, find the lots sitting underwater in the taxable account, check the 61-day calendar for vests and automatic purchases, and sell the losers into the gap. If there is no gap because the vests never stop, sell anyway and take the part that survives — a partial loss is still a loss claimed. Then save the carryover worksheet, because the excess does not expire, and next year's gains are already on their way.

Affiliate disclosure: VestedStack may earn a commission when you click links on this page and sign up for a product or service — at no extra cost to you. This keeps the site free. Read our full affiliate disclosure.