Tax Loss Harvesting Explained
Tax loss harvesting is a piece of vocabulary that sounds advanced and rests on one simple idea: a realized loss can offset a realized gain. This page explains the mechanic, the limits, and the wash-sale rule that trips up beginners, without telling anyone what to do with it.
Tax loss harvesting is the practice of selling an investment that has fallen below its purchase price so the realized loss offsets realized capital gains, with a limited amount allowed against ordinary income each year and the rest carried to future years.
General education about United States federal rules. Rules change and states differ. Last reviewed June 18, 2026.
Why it matters
Investing taxes turn on a single distinction: a loss on paper changes nothing, but a realized loss, one where you actually sold, can offset a realized gain elsewhere. Harvesting is just the name for using that fact deliberately, and understanding it demystifies a term that gets used as if it were reserved for sophisticated investors.
The mechanic has real limits and a famous trap. Only so much net loss can offset ordinary income in a year, the rest carries forward, and the wash-sale rule disallows the loss if you buy back the same investment too quickly. Knowing the limits up front is what separates understanding the idea from misusing it.
It only applies in a regular taxable brokerage account. Inside tax-advantaged retirement accounts, gains and losses are not taxed year to year, so there is nothing to harvest. That boundary alone clears up a lot of confusion about where the idea is even relevant.
How it works
- 1
Realized versus unrealized
A holding that has dropped in value shows an unrealized loss, which has no tax effect while you still own it. Selling it makes the loss realized, and only a realized loss can offset a realized gain. The entire idea rests on this distinction between a paper loss and a sold one.
- 2
Losses offset gains first
When you have both realized gains and realized losses in a year, the losses are netted against the gains first. The result is that you are taxed on the net gain rather than the gross, which is the core of why a loss can have a tax effect at all.
- 3
A limited amount can offset ordinary income
If net losses exceed net gains, a limited amount of the excess can offset ordinary income for the year, and whatever is left is carried forward to future years with no expiration. The IRS sets the annual cap; the sources below publish the current figure, and the worked example uses an invented number to show the mechanic.
- 4
The wash-sale rule
The wash-sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale. The disallowed loss is not gone forever; it is added to the cost basis of the replacement shares. The rule exists so a loss cannot be claimed while keeping essentially the same position, and it is the most common way beginners trip.
- 5
Only in taxable accounts
Harvesting is only relevant in a regular taxable brokerage account, because that is where yearly gains and losses are taxed. Inside an IRA or a 401(k), investments grow without yearly capital-gains tax, so there are no realized gains or losses to offset. This is why the idea simply does not apply to most retirement money.
Practical example
Invented, simplified figures that show the mechanics. Never real rates, quotes, or predictions.
Suppose an investor in a taxable account realized an invented $4,000 gain selling one fund, and separately holds another fund sitting at an invented $4,000 unrealized loss. If she sells the losing fund, the realized loss offsets the realized gain, so the net taxable gain for that pair moves toward zero. If she rebought the same fund the next day, the wash-sale rule would disallow the loss. These figures are invented to show the mechanic, not a recommendation to sell anything.
Common mistakes
- Confusing a paper loss with a realized one. Only selling makes a loss count, and only against realized gains.
- Triggering the wash-sale rule by repurchasing the same or a substantially identical security within the 30-day window.
- Trying to harvest losses inside a retirement account, where yearly gains and losses are not taxed in the first place.
- Letting the tax tail wag the investment dog: selling a holding only for the tax effect, without regard to whether it still fits the plan.
How to apply it
Orientation pointers for learning, never filing instructions or advice.
- Separate your paper losses from your realized ones, since only realized losses interact with realized gains.
- Before repurchasing anything you sold at a loss, check the 30-day wash-sale window so the loss is not disallowed.
- Confirm whether the account is taxable or tax-advantaged, since the idea only applies to the former.
- For the current annual offset limit and the wash-sale details, use the IRS pages in the sources rather than a summary.
Worth asking a tax professional
These pages teach how the system works. For what it means for you, these are the questions worth bringing to someone qualified.
- Ask a tax professional how a specific harvesting move would interact with your full income, other gains, and carryforwards before you act on it.
- Ask what counts as substantially identical for the funds you hold, since the wash-sale rule turns on that judgment.
- Ask how loss carryforwards from prior years should factor into this year's picture.
Frequently asked questions
What is tax loss harvesting?
It is the practice of selling an investment that has fallen below its purchase price so the realized loss offsets realized capital gains. A limited amount of net loss can also offset ordinary income each year, with the rest carried forward, and it only applies in taxable accounts.
What is the wash-sale rule?
It disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale that created the loss. The disallowed loss is added to the cost basis of the replacement shares rather than lost, but it cannot be claimed for that year.
How much loss can offset my other income?
Losses first offset capital gains in full. If net losses remain, a limited amount can offset ordinary income each year, and the remainder carries forward to future years. The IRS publishes the current annual cap, which is why this page links it rather than printing a number that can change.
Does tax loss harvesting work in a 401(k) or IRA?
No. Those accounts are not taxed on yearly gains and losses, so there is nothing to harvest. The idea only applies in a regular taxable brokerage account, where realized gains and losses have a tax effect each year.
Is harvesting a loss always worth it?
Not necessarily. Selling only for the tax effect can mean leaving an investment you wanted to keep, or stumbling into a wash sale, and the benefit depends on your full tax picture. Whether a specific move helps is exactly the kind of question for a qualified professional.
Is this tax advice?
No. This page is general education only and is not personalized tax, legal, accounting, or financial advice, and it is not a recommendation about filing, deductions, or strategy. Tax rules vary by location and change over time, so for your own situation consult a qualified tax professional.
Related tools
Calculator projections are pre-tax; these lessons explain the part the tools leave out.
Related concepts
Related money lessons
The money habits every tax question sits on.
Keep exploring
Live pages on this site where these ideas play out. Examples for research, not suggestions.
More tax lessons
Clearer money decisions, twice a week
Markets, taxes, and money education in plain English. Always free.
Sources and last reviewed
- IRS: Topic No. 409, Capital Gains and Losses
- IRS: Publication 550, Investment Income and Expenses
- SEC Investor.gov: Wash Sales
Rules and figures on this page were checked against the sources above. Last reviewed June 18, 2026.
Educational content only. This is general information about how United States federal taxes work, not tax, legal, accounting, investment, or financial advice, and not a recommendation about filing, deductions, or strategy. Tax rules change and vary by state and situation. Examples are simplified and hypothetical. For personal decisions, consult a qualified tax professional.
