Tax loss selling of stocks means selling positions that have dropped below what you paid, using those losses to cancel out capital gains from other sales, and applying up to $3,000 of any remaining loss against ordinary income like wages. Losses beyond that carry forward indefinitely. The mechanics are simple; the pitfall that trips most people up is the wash sale rule, which can erase the tax benefit if you repurchase the same security too soon.
How the Offset Works
At the end of the tax year, you total your capital gains and your capital losses, and only the net amount is taxed. If losses exceed gains, up to $3,000 of what’s left can be deducted against ordinary income. Married filing separately, the cap is $1,500.1Office of the Law Revision Counsel. 26 U.S. Code 1211 – Limitation on Capital Losses That $3,000 figure has not been adjusted since 1978 and still applies in 2026.
Anything above the $3,000 ordinary income deduction is not lost. It carries into the next tax year, and the year after that, with no expiration. A short-term loss stays short-term in future years; a long-term loss stays long-term.2Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers Each year, the Capital Loss Carryover Worksheet in the Schedule D instructions tells you how much rolls forward.3Internal Revenue Service. Instructions for Schedule D (Form 1040) If a couple filed jointly in the year a loss was incurred and later files separately, only the spouse who actually took the loss can use the carryover.
Short-Term Versus Long-Term Losses
Stocks held one year or less produce short-term losses. Stocks held more than one year produce long-term losses.4Office of the Law Revision Counsel. 26 U.S. Code 1222 – Other Terms Relating to Capital Gains and Losses This matters because the netting runs in order: short-term losses first cancel short-term gains, long-term losses first cancel long-term gains, and only what’s left crosses over.
Since short-term gains are taxed at ordinary income rates and long-term gains at preferential rates, a short-term loss applied to a short-term gain typically saves more tax per dollar than a long-term loss applied to a long-term gain. Keep the holding periods in mind when you decide which lots to sell.
The Wash Sale Rule
Sell a stock at a loss and buy the same stock, or a substantially identical security, within 30 days before or 30 days after the sale, and the IRS disallows the loss.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Counting the sale date, that’s a 61-day window to navigate.
In a taxable account, the disallowed loss is not entirely gone. It gets added to the cost basis of the replacement shares, so you’ll recover it whenever you eventually sell those shares. The holding period of the original position also tacks onto the replacement, which can convert a would-be short-term gain into a long-term one.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities
Buy back fewer shares than you sold, and the rule only touches the number of shares you repurchased. The loss on the rest remains deductible. The IRS pairs replacement shares to sold shares in the order they were bought.6Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses
What Counts as Substantially Identical
The IRS has never defined the term precisely. Stock of the same company is clearly identical. Bonds or preferred stock of the same issuer are generally not identical to its common stock, unless they’re convertible into the common stock and trade at prices closely tracking the conversion ratio.6Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses
ETFs and index funds are the gray zone. Two ETFs tracking the same index are more likely to be treated as substantially identical because their holdings and returns overlap so heavily. Swapping an S&P 500 ETF for a total market or Russell 1000 ETF is generally considered acceptable because the indexes differ enough in composition. The less overlap in holdings and expected returns, the safer the swap.
Wash Sales Through an IRA
This is where the rule gets punishing. Sell a stock at a loss in a taxable account, and buy the same stock inside a traditional or Roth IRA within 30 days, and the wash sale still applies. But because IRA transactions don’t track cost basis for tax purposes in the same way, the disallowed loss is not added to anything. It’s permanently gone.7Internal Revenue Service. Revenue Ruling 2008-5 It doesn’t matter whether the IRA is at the same brokerage or a different one.
Before selling at a loss in a taxable account, check every IRA for pending purchases or scheduled automatic contributions that could buy the same security inside the 61-day window.
Dividend Reinvestment Can Trigger It
Automatic dividend reinvestment is an easy way to trip the rule by accident. If the stock you sold at a loss pays a dividend within 30 days and your account reinvests dividends automatically, those reinvested shares count as a purchase of substantially identical stock. Even a small reinvestment can disallow part of your loss. Turn off dividend reinvestment on any position you plan to sell at a loss, and do it well before the 30 days leading up to the sale.
Choosing Which Shares to Sell
If you own the same stock bought at different times and prices, the shares you pick to sell decide the size of your loss. Without instruction, the IRS defaults to first-in, first-out, selling the oldest shares first.8Internal Revenue Service. Stocks (Options, Splits, Traders) 1 Those may have the lowest basis and produce the smallest loss, or even a gain.
Specific identification lets you pick the highest-cost lots. Tell the brokerage which lots to sell at the time of the trade, and make sure the brokerage confirms the selection. Most online platforms now offer lot selection right on the order screen, but check that the confirmation matches your instructions.8Internal Revenue Service. Stocks (Options, Splits, Traders) 1
Year-End Timing
For stocks traded on an established market, the trade date sets the tax year, not the settlement date.6Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses Sell on December 31 and the loss counts for that year, even if settlement falls in January. The trade date also controls holding periods and the 30-day wash sale windows. Wait until January 2 and the loss belongs to the next return.
A Note on Cryptocurrency
The IRS classifies cryptocurrency and other digital assets as property, not stock or securities.9Internal Revenue Service. Digital Assets Because Section 1091 applies to “stock or securities,” the wash sale rule as written does not currently reach crypto. As of 2026, no finalized federal statute extends wash sale treatment to digital assets, though bills to close the gap have been introduced repeatedly. Sell Bitcoin at a loss and buy it back the same day, and there’s no wash sale under current law. The IRS has signaled it may still challenge aggressive loss-cycling under broader tax doctrines, and a future statute could change the treatment.
Reporting the Loss on Your Return
After year-end, your brokerage sends Form 1099-B listing each sale, the proceeds, and, for covered securities, the cost basis.10Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions Each transaction goes on Form 8949, sorted by whether the broker reported basis to the IRS. Covered securities go in one section; non-covered securities, where you supply the basis yourself, go in another.11Internal Revenue Service. Instructions for Form 8949 For shares held from before basis reporting was required, double-check the numbers, because the IRS doesn’t have them.
For a wash sale, report the full sale on Form 8949, enter code “W,” and put the disallowed loss amount as a positive number in the adjustment column. That neutralizes the tax benefit on the disallowed portion.12Internal Revenue Service. Instructions for Form 8949 Brokerages usually flag wash sales on the 1099-B, but they won’t catch cross-account wash sales or ones involving a spouse’s account. You have to catch those yourself.
Form 8949 totals flow to Schedule D, where short-term and long-term results net out and the $3,000 ordinary income deduction is applied.10Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions Any leftover loss carries forward, and next year’s Schedule D worksheet picks it up.3Internal Revenue Service. Instructions for Schedule D (Form 1040)