Explainers

Tax-Loss Harvesting Explained: How It Works, the Rules and the Wash Sale Trap

Tax-loss harvesting explained in plain English: how selling at a loss can offset gains, the $3,000 limit, carryforwards and the 30-day wash sale rule.

Admin · Explainers desk
Nov 5, 2026 · 5:58 AM CST · 11 min read
The Market MBA featured image for Tax-Loss Harvesting Explained: a loss offsetting a gain, the 3,000-per-year deduction limit with carryforward, and the 30-day before-and-after wash sale window.

Tax-loss harvesting means selling an investment in a taxable account for less than you paid, so the loss can offset capital gains. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) can offset ordinary income, and the rest carries forward. Buying the same or a substantially identical investment within 30 days cancels the deduction.

That’s tax-loss harvesting explained in three sentences, based on IRS Topic 409 and IRS Publication 550. Below: how it works, the limits, and the wash sale trap that catches people every December. It’s general education on portfolio maintenance, not tax advice. Everyone’s situation is different, so talk to a tax professional before acting on any of it.

Tax-loss harvesting explained in one minute

Investments go down as well as up. When one of yours is worth less than you paid, that drop can still be useful. Selling it turns the drop into a loss the tax rules recognize, and that loss can reduce the tax owed on gains elsewhere in the portfolio.

Many investors don’t love selling a loser. But harvesting isn’t about giving up on the market. People often reinvest the money right away in something similar, so their overall plan stays the same while the tax picture improves. Think of it as housekeeping: the portfolio looks about the same afterward, but a loss that was only on paper is now on the books.

What a “realized” loss is

A paper loss is a drop in value you haven’t sold yet. It shows up on your statement but not on your tax return. A realized loss happens when you actually sell for less than your cost basis (roughly, what you paid). Only realized losses count. If hypothetical Company B fell from $5,000 to $3,000 and you still hold it, nothing has happened for tax purposes yet. Sell it, and the $2,000 drop becomes a realized loss.

Only taxable accounts (not IRAs or 401(k)s)

Harvesting only applies in a regular taxable brokerage account. Inside an IRA or 401(k), gains and losses aren’t taxed or deducted year to year, so there’s nothing to harvest. That account split is one reason it helps to know which holdings sit where, a topic we cover in asset allocation by age.

How tax-loss harvesting works: a step-by-step example

The IRS splits gains and losses by how long you held the investment. Held more than one year is long-term. Held one year or less is short-term, and net short-term gains are taxed at ordinary income rates (IRS Topic 409). Your long-term capital gains rate depends on your income; Topic 409 explains the brackets.

Step 1: Offset gains of the same type first

Losses are first netted against gains of the same type: short-term against short-term, long-term against long-term. Then any leftover net loss on one side offsets a net gain on the other (IRS Publication 550).

Step 2: Up to $3,000 against ordinary income

If your losses are bigger than your gains, you can use the excess against other income, like wages. The cap is “the lesser of $3,000 ($1,500 if married filing separately) or your total net loss” (IRS Topic 409).

Step 3: Carry the rest forward

Per Topic 409, “If your net capital loss is more than this limit, you can carry the loss forward to later years.” The Capital Loss Carryover Worksheet in Publication 550 and the Schedule D instructions shows how to figure the amount.

Here’s a made-up example with round numbers. Imagine an investor has a $10,000 long-term gain from selling hypothetical Fund A earlier in the year. Two versions of the year:

Hypothetical scenarioVersion 1Version 2
Gain from selling Fund A$10,000$10,000
Loss harvested on Company B$8,000$14,000
Net result$2,000 net gain$4,000 net loss
Used against ordinary income$0$3,000
Carried forward to later years$0$1,000

In Version 1, only $2,000 of gain is left to tax instead of $10,000. In Version 2, the gain is wiped out, $3,000 reduces other income and $1,000 waits for a later year. (This assumes a hypothetical single filer, both trades long-term, and no other gains or losses. It’s an illustration of the mechanics, not a forecast of anyone’s tax bill.)

The wash sale rule (the 30-day trap)

This is the rule that trips people up. Under IRS Publication 550, a wash sale happens when you sell at a loss and, within 30 days before or after the sale, you:

  • buy substantially identical stock or securities;
  • acquire them in a fully taxable trade;
  • acquire a contract or option to buy them; or
  • acquire substantially identical stock for your IRA or Roth IRA.

It also counts if your spouse, or a corporation you control, buys substantially identical stock. Investor.gov gives the same short definition. The rules have edge cases, so this is a good place to talk to a tax professional.

The 61-day window

“30 days before or after” adds up to a 61-day window: 30 days before the sale, the sale day itself, and 30 days after. Many people focus only on the days after the sale, but a purchase in the weeks before it counts too. Buying extra shares of a falling stock in early December, then selling the original lot at a loss a week later, can trip the rule.

What counts as “substantially identical”

The IRS doesn’t give a bright-line test. Selling Company B and buying Company B again clearly counts, and so does selling a fund and rebuying the same fund. Similar-but-different funds are a judgment call. Our lesson on index funds vs ETFs explains how funds can look alike yet be built differently. Two funds that hold different baskets of stocks, or track different indexes, are often treated as different, but there’s no official list. When in doubt, that’s a question for a tax pro.

Easy ways to trigger it by accident

  • Automatic dividend reinvestment. If the holding you sold pays a dividend that’s reinvested within the window, that’s a purchase.
  • A spouse’s account. Your spouse buying the same stock counts, even in a separate account.
  • Buying in an IRA. Rebuying the same stock in your IRA or Roth IRA within 30 days counts too.

What happens if you trigger it

The loss isn’t gone forever in most cases. It’s postponed. The disallowed loss is added to the cost basis of the new shares, and the holding period of the old shares carries over (IRS Publication 550). Per IRS Publication 550’s Example 1: you buy 100 shares for $1,000, sell them for $750, and within 30 days buy 100 shares of the same stock for $800. The $250 loss is disallowed, and your basis in the new shares becomes $1,050.

The IRA case is the exception. When the repurchase happens in your IRA or Roth IRA, the basis isn’t adjusted, so the benefit of that loss may be lost rather than postponed.

Tax-loss harvesting rules and limits at a glance

RuleWhat it meansIRS source
Realized losses onlyYou have to sell; paper losses don’t countTopic 409
Short vs long termMore than one year is long-term; one year or less is short-termTopic 409
$3,000 limitNet losses beyond gains can offset up to $3,000 of other income ($1,500 married filing separately)Topic 409
CarryforwardNet loss above the limit carries forward to later yearsTopic 409
Wash sale windowNo substantially identical buy 30 days before or after (61 days total)Pub. 550
IRA and spouseBuys in your IRA, Roth IRA or by your spouse countPub. 550
Washed lossAdded to new shares’ basis (not for IRA buys)Pub. 550
DeadlineThe trade date counts, not the settlement datePub. 550
ReportingSales go on Form 8949 and Schedule D; brokers send Form 1099-BForm 8949

Common tax-loss harvesting strategies (educational, not recommendations)

These are approaches many investors use. None is right for everyone, and each comes with trade-offs.

Swap into a similar but not identical holding

One approach is to sell the losing holding and immediately buy something that fills a similar role in the portfolio but isn’t substantially identical, such as moving from hypothetical Fund A to a Fund B that tracks a different index. The goal is to stay invested while the loss counts.

Wait 31 days and rebuy

Another approach is to sell, sit in cash or something else, and wait at least 31 days before buying back the original. It’s simple and avoids the “substantially identical” question, but the money is out of that position for a month, and prices can rise in the meantime.

Harvest while rebalancing

Rebalancing already means selling some holdings. Many investors look for losses to realize while they’re trimming anyway. See our lesson on how often to rebalance your portfolio. If you want a written rule for this, it can go in your investment policy statement.

Year-end review vs harvesting when losses appear

Some people review once a year, in December. Others check after big market drops, when losses tend to show up, often in the stocks that ran up the most (see why the hottest stocks fall the hardest). Some brokers and robo-advisors also offer automated harvesting. Checking more often may catch more losses, but it also means more trades and more chances of a wash sale.

Pros and cons, and when it may not be worth it

Possible pros:

  • A lower tax bill this year if you have gains to offset.
  • Unused losses carry forward to later years.
  • A natural moment to rebalance or clean up holdings.

Possible cons:

  • A lower cost basis on the replacement means a bigger taxable gain later, so some of the benefit is a deferral.
  • Wash sale mistakes can postpone the loss or, with an IRA purchase, may cost it entirely.
  • Trading costs and bid-ask spreads add up.
  • Your bracket matters. If your long-term gains already fall in a 0% bracket, harvesting may do little.
  • State tax rules vary.

It’s a portfolio-maintenance tool, not a reason to sell a holding you’d otherwise keep for the long run.

The December 31 deadline and year-end checklist

For exchange-traded securities, the IRS says your holding period ends on the trade date you sold, not the settlement date (IRS Publication 550). So for a loss to count for the year, the sale needs to trade by the last trading day of the year, usually December 31. If December 31 falls on a weekend or market holiday, the cutoff is the last trading day before it. Confirm your broker’s cutoff, and think about how you place the order (see market order vs limit order).

Reporting comes later. Your broker reports sales on Form 1099-B, and they flow onto Form 8949 and Schedule D (Form 1040) when you file. One broker’s statements won’t show purchases in your spouse’s account, your IRA or another brokerage, so many investors keep their own notes on trades across the household.

A simple year-end checklist many investors use:

  1. Confirm the last trading day of the year and your broker’s cutoff.
  2. Check for automatic dividend reinvestment in anything you plan to sell.
  3. Check every account in the household, including IRAs and your spouse’s accounts, for purchases 30 days before and after.
  4. Keep records of your cost basis, trade dates and any washed losses.
  5. Expect sales to appear on Form 1099-B and later on Form 8949 and Schedule D.
  6. Talk to a tax professional about your own numbers before you trade.

FAQ

What is tax-loss harvesting in simple terms?

Selling an investment that’s down in a taxable account, on purpose, so the realized loss reduces the tax on other gains. Many investors stay invested by buying something similar but not substantially identical, or by waiting more than 30 days to rebuy.

How does tax-loss harvesting work, step by step?

Sell at a loss and net it against gains of the same type, then the other type. Any remaining net loss can offset up to $3,000 of ordinary income ($1,500 married filing separately), and the rest carries forward to later years (IRS Topic 409).

How much can tax-loss harvesting save?

It depends on your gains, your bracket and the type of gain. Net losses first offset capital gains. Up to $3,000 a year ($1,500 married filing separately) can offset ordinary income, and the rest carries forward. A tax professional can estimate your own numbers.

What is the $3,000 capital loss limit, and what happens to losses over it?

If losses exceed gains, the amount you can use against other income is the lesser of $3,000 ($1,500 if married filing separately) or your net loss. There’s no cap against gains. Per IRS Topic 409, any excess can be carried forward to later years.

What is the wash sale rule, and how long is it?

If you sell at a loss and buy the same or a substantially identical security within 30 days before or after, the IRS disallows the loss for now and adds it to the new shares’ basis. That’s a 61-day window (IRS Publication 550).

Does the wash sale rule apply across my IRA or my spouse’s account?

Yes. Per IRS Publication 550, buying substantially identical stock for your IRA or Roth IRA, or your spouse buying it, within the window counts as a wash sale. So does a purchase by a corporation you control. In the IRA case the basis of the new shares isn’t adjusted, which makes that mistake costlier.

What’s the deadline for tax-loss harvesting?

The sale has to trade by the last trading day of the calendar year, usually December 31, because the IRS uses the trade date, not the settlement date. If December 31 lands on a weekend or market holiday, the cutoff is the last trading day before it. Check your broker’s cutoff.

Does tax-loss harvesting work in an IRA or 401(k)?

No. Gains and losses inside tax-advantaged retirement accounts aren’t taxed or deducted year to year, so there’s nothing to harvest. And buying the same stock in your IRA within 30 days of selling it at a loss in a taxable account can trigger a wash sale.

Is tax-loss harvesting worth it?

It can lower this year’s taxes, but it also lowers your cost basis, so future gains may be larger. Trading costs, wash sale mistakes and your bracket matter. It’s a portfolio-maintenance tool, not a reason to sell good holdings. Talk to a tax professional.

Does the wash sale rule apply to crypto?

Rules for digital assets differ from stocks and have been changing. Check current IRS guidance (IRS.gov/DigitalAsset) and ask a tax professional.

The bottom line: harvesting turns a drop into a loss that can offset gains, plus up to $3,000 of other income, with the rest carried forward. Watch the 61-day window across every household account, trade by the last trading day of the year, and talk to a qualified tax professional about your situation.

Sources


🌐 MrFlourishinvests.com (in BETA) – Daily market moves, stock ideas, and money flow from MrFlourish and Team.

🌐 TheMarketMBA.com (in BETA) – Plain-English lessons on how markets, investing, and money really work crafted by MrFlourish and Team.

NFA

For education only. Not financial, investment, legal or tax advice.

For education and entertainment only. Not financial advice.