Library · High earners, two hundred thousand and up · Published 10/10/2026 · Re-read against its sources 10/10/2026
Tax loss harvesting in depth
You can sell losing investments to offset gains and reduce your tax bill, but the wash sale rule and other details matter.
In short
You have probably looked at a losing investment and felt a small sting each time you saw the number. That sting can be put to work. When you sell an investment for less than you paid, the IRS lets that loss offset your gains. If the loss is bigger than your gains, it can reduce your ordinary income too, up to a yearly cap of the current figure, which the official source publishes each year. Unused losses carry forward to later years with no expiration date. A friend of mine once said the wash sale window is the part that trips people up, and he was right. IRS Publication 550 and the instructions for Form 8949 explain how it all works, so read them before you make any move.
The whole of it
What it is
A friend of mine once told me he felt foolish holding a stock that had dropped by half. I told him every honest investor has one of those, and that the tax code gives you a small kindness for it. Tax loss harvesting means selling an investment at a loss on purpose so the loss can lower your tax bill. It applies to investments held in a regular taxable brokerage account. It does nothing inside a 401(k), a traditional IRA, or a Roth IRA, because those accounts do not report gains and losses year by year.
The loss is only on paper until you sell. After you sell, it becomes a realized loss, and the tax law counts it. This guide explains how that works and what it costs. It does not tell you what to buy, sell, or hold.
How it works
If you are holding a mix of winners and losers, the process starts when you sort them into two piles by how long you owned them. Held one year or less, a gain or loss is short term. Held more than one year, it is long term. Short term gains are taxed like ordinary income. Long term gains are taxed at lower rates.
Here is the order the IRS uses. Short term losses first offset short term gains. Long term losses first offset long term gains. If one pile has a net loss left over, it then offsets the net gain in the other pile. This netting is laid out on Schedule D and Form 8949.
Say all that netting leaves you with a net loss for the year. The tax law lets you deduct up to the current figure, which the official source publishes each year of it against your ordinary income, such as wages. Anything beyond that carries forward to the next year, and the year after, until it is used up. The IRS describes this in Publication 550, Investment Income and Expenses.
Now comes the part that trips people up. It is the wash sale rule. If you sell at a loss and then buy the same security, or one substantially identical, within the current figure, which the official source publishes each year days before or after the sale, the loss is disallowed for that year. The disallowed amount is not gone, though. It gets added to the cost basis of the new shares, so the benefit shows up later. The rule is in Section 1091 of the Internal Revenue Code. Publication 550 explains it too. Purchases in an IRA can count against you. Purchases by your spouse can count too. Publication 550 spells out how far the rule reaches.
The numbers, and where to find yours
You have probably wondered which of your own numbers matter here. Four of them do, and each one has an official home.
The first is the yearly cap on net capital losses against ordinary income, which is the current figure, which the official source publishes each year. The second is your long term capital gains rate, which depends on your taxable income and filing status. The IRS publishes the brackets each year, and the figure is the current figure, which the official source publishes each year. The third is the net investment income tax. It is a surtax of the current figure, which the official source publishes each year that applies when your modified adjusted gross income passes the current figure, which the official source publishes each year for your filing status. Capital gains count as net investment income, so a harvested loss can reduce that tax as well. The fourth is your own cost basis for each lot of shares. That is what you paid, including fees.
You can find your cost basis on your broker's Form 1099-B and on your account statements. The IRS explains the rest in Publication 550 and in the instructions for Form 8949 and Schedule D. Check the date on any figure you use.
A worked example
I once watched a neighbor named Dana work through this at her kitchen table, and she did it better than most accountants I know. Dana earns a salary of $200,000. This year she sold one holding for a long term gain of $18,000. She also owns a fund that has dropped. She bought it more than a year ago for $30,000. It is now worth $20,000.
She sells the fund. Her loss is $30,000 minus $20,000, which is $10,000. It is a long term loss because she held the fund for more than a year.
Her long term gain was $18,000, and her long term loss is $10,000. Netting them gives $18,000 minus $10,000, which is $8,000 of taxable long term gain. Without the sale, she would have owed tax on $18,000. Now she owes tax on $8,000.
Say her long term rate is 15 percent. That is a plain figure picked for this example only. Her tax on the gain falls from $18,000 times 0.15, which is $2,700, to $8,000 times 0.15, which is $1,200. The difference is $2,700 minus $1,200, or $1,500 saved.
Now suppose she also owes the net investment income tax at 3.8 percent on those gains. That is another plain figure picked for this example only. Her extra saving there is $10,000 times 0.038, which is $380. Her combined saving is $1,500 plus $380, which is $1,880, under the assumptions of this example.
Dana also thought about the wash sale rule. She did not buy that same fund again for 31 days. She set a reminder on her phone, and she did not touch it in her IRA either. Smart woman.
Where it goes wrong
I have seen good people get tripped up here, and it is almost never because they were careless. The rules are just fussy.
The wash sale rule is the big one. Buying the same fund in your IRA a week after selling it in your taxable account can disallow the loss. Automatic dividend reinvestment can do it too, since a small reinvested purchase inside the window counts as a buy. Check that setting before you sell.
Another trap is thinking a loss is free money. It is not. Harvesting lowers your cost basis in the replacement investment, so you may owe more tax when you sell later. The loss often defers tax rather than erasing it. For some people that deferral is worth a great deal. For others, it is a wash.
Costs matter too. Trading fees, bid and ask spreads, and the risk that the market moves while you wait out the window can eat the benefit. A small loss may not be worth the trouble.
Records matter as well. You need dates, share counts, and cost basis for each lot. Brokers report this on Form 1099-B, but errors happen, and the responsibility sits with you. Keep your own copy.
State taxes vary, and so do the rules for special situations like inherited shares or gifted shares. If your case is unusual, a qualified tax professional can look at your actual return.
Questions to answer before you leave this page
If you hold any investments in a taxable account that are worth less than you paid, do you know the exact cost basis of each lot? Have you checked whether any gains this year, long term or short term, are large enough to make a loss worth the effort? Do you own the same investment anywhere else, such as an IRA or a spouse's account, that could trigger the wash sale rule? Is dividend reinvestment turned on for the holding you plan to sell? Will you be able to wait out the full wash sale window on both sides of the sale without buying it back? Do you know how a lower cost basis today will affect the tax you owe when you eventually sell the replacement? And would a short talk with a tax professional help you feel sure of your numbers before you act?
Sources
irs.gov · read 10/10/2026
irs.gov · read 10/10/2026
irs.gov · read 10/10/2026
irs.gov · read 10/10/2026
law.cornell.edu · read 10/10/2026
Each figure on this page was found, word for word, on the official page beside it, on the date shown, and is read again on a schedule. A figure that changes on its page comes down until the page is rewritten.
Was this useful? Counted, never signed.
Ask about this guide
A model reads this page and answers from it. It will say when the answer is not on the page. Education, not personalized advice.
Written by the site's growth engine and checked by its gates: voice, law and ethics, facts, arithmetic, and sources. Not yet read by a human editor; every page carries the correction process. Rules and dollar limits change every year; figures come from the rules table with their source and date.