Capital gains and losses netting rules work in two rounds: first you net short-term against short-term and long-term against long-term, then if one category shows a gain and the other a loss you combine them into a single overall figure. What survives that math is what you’re taxed on, or, if losses win, what you can deduct and carry forward.
Sort Every Sale Into Short-Term or Long-Term First
Netting can’t start until each sale is classified. The IRS counts from the day after you acquired the asset through the day you sold it.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses One year or less is short-term. More than one year is long-term. A sale on the 365th day is short-term; a sale on the 366th day is long-term.
A few situations override the normal count. Inherited property is automatically long-term no matter how quickly you sell it.2Office of the Law Revision Counsel. 26 U.S. Code 1223 – Holding Period of Property Gifted property with a carryover basis picks up the donor’s holding period. A security that becomes completely worthless during the year is treated as sold for zero on December 31, and that deemed date decides whether the loss is short or long.3eCFR. 26 CFR 1.165-5 – Worthless Securities
Step One: Net Within Each Category
Add up all your short-term gains and subtract all your short-term losses. That produces a single net short-term figure, either a gain or a loss. Do the same for your long-term transactions.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses You now have two numbers.
Keeping the buckets separate matters because they’re taxed differently. Short-term gains are taxed at ordinary income rates. Long-term gains get preferential rates. Schedule D of Form 1040 walks through the calculation in order.4Internal Revenue Service. Instructions for Schedule D (Form 1040)
Step Two: Combine Across Categories
If one bucket shows a gain and the other shows a loss, they combine. A net short-term loss offsets a net long-term gain, and a net long-term loss offsets a net short-term gain.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses What remains is your overall capital gain or loss for the year.
The direction of the offset changes what the netting costs or saves you. A short-term loss eating into a long-term gain cancels income that would have enjoyed preferential rates. A long-term loss offsetting a short-term gain cancels income that would have been taxed at your higher ordinary rate, so each dollar of loss saves more tax. If both categories show net losses, no cross-offset happens; they simply add together into one larger loss.
What the Surviving Gain Is Taxed At
A net short-term capital gain is added to your ordinary income and taxed at your regular bracket, which in 2026 runs from 10% to 37%.5Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 A net long-term capital gain is taxed at 0%, 15%, or 20%, based on taxable income and filing status. For 2026:
- 0% rate: taxable income up to $49,450 single, $98,900 married filing jointly, $66,200 head of household.
- 15% rate: above the 0% ceiling up to $545,500 single, $613,700 married filing jointly, $579,600 head of household.
- 20% rate: taxable income above the 15% ceiling.
These thresholds are adjusted annually for inflation.
Higher Maximums for Two Kinds of Long-Term Gain
Not every long-term gain gets the 0/15/20% treatment. Net gains on collectibles such as art, coins, antiques, precious metals, and stamps are taxed at a maximum rate of 28%, and the same cap applies to gains on certain qualified small business stock. When you sell depreciable real property at a gain, the portion attributable to depreciation you previously claimed is taxed at a maximum rate of 25%. These gains still ride through the netting sequence as long-term gains; the special rates apply only at the end, to whatever survives.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses
The 3.8% Net Investment Income Tax
Higher-income taxpayers owe an additional 3.8% surtax on net investment income, capital gains included. It applies to the lesser of your net investment income or the amount by which modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly), or $125,000 (married filing separately).6Internal Revenue Service. Net Investment Income Tax These thresholds are not adjusted for inflation.7Internal Revenue Service. Topic No. 559, Net Investment Income Tax A high-income single filer at the 20% long-term rate can face a combined 23.8% federal rate on capital gains.
One boundary worth flagging: qualified dividends are taxed at the same preferential rates as long-term capital gains but are not capital gains and don’t enter the netting process. A capital loss can’t directly offset a qualified dividend. Capital gain distributions from mutual funds, by contrast, are treated as long-term capital gains and do flow through netting.8Internal Revenue Service. Topic No. 404, Dividends Gain excluded under the primary residence rules (up to $250,000 single, $500,000 joint) also never enters netting at all.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
When Losses Exceed Gains
If your losses beat your gains after netting, up to $3,000 of the net capital loss reduces ordinary income like wages and salary. Married filing separately, the cap is $1,500 each.10Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses That $3,000 ceiling has been in the code since 1978 and has never been indexed to inflation.
The sequencing is fixed: losses have to offset capital gains first, and only what’s left can be applied against ordinary income.10Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses You can’t cherry-pick.
Carrying Losses Forward
Losses that exceed both your gains and the $3,000 ordinary-income deduction carry forward to the next year indefinitely. Each carried-over loss keeps its original character: short-term stays short-term, long-term stays long-term.11Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers The following year it enters the netting process as if it were a fresh transaction, offsetting new gains of the same type first before crossing categories.
There’s no time limit for individuals, so a large loss can take years to fully absorb. Track carryovers on each year’s return; the IRS won’t do it for you. Capital loss carryovers also die with the taxpayer. They can be used on the decedent’s final income tax return, but the estate and heirs cannot inherit whatever remains.12Internal Revenue Service. IRS Resource Guide – Decedents and Related Issues
The Wash Sale Rule Can Disallow Losses
Before you deliberately sell losers to generate deductible losses, know the wash sale rule. Sell a security at a loss and buy a substantially identical security within 30 days before or after the sale, and the loss is disallowed.13Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The window runs in both directions, creating a 61-day restricted period centered on the sale.
A disallowed loss usually isn’t permanently gone. It gets added to the cost basis of the replacement security, and the original holding period tacks on, so the loss is deferred until you sell the replacement. The exception where the loss truly disappears: if you buy the replacement inside an IRA or Roth IRA, the disallowed loss can’t be added to the IRA’s basis and is forfeited. This catches people who sell a losing position in a taxable account and rebuy the same stock in their retirement account within the 61-day window.
The IRS has never precisely defined “substantially identical.” Shares of the same company clearly qualify. Stocks of two different companies generally don’t. The gray area is index mutual funds and ETFs that track the same benchmark under different managers. No definitive ruling addresses whether swapping one S&P 500 index fund for another triggers the rule, so cautious taxpayers switch to a meaningfully different index when harvesting losses.
A Worked Example
Say 2026 brings you a $10,000 short-term gain from flipping a stock, a $4,000 short-term loss on another trade, a $15,000 long-term gain from selling a rental, and a $20,000 long-term loss on an inherited investment. Step one nets within each bucket: short-term becomes a $6,000 net gain, long-term becomes a $5,000 net loss. Step two combines them: the $5,000 long-term loss offsets $5,000 of the short-term gain, leaving $1,000 of net short-term capital gain. That $1,000 is taxed at your ordinary rate.
Now change one number. If the long-term loss had been $25,000, the net long-term loss would be $10,000. Absorbing the $6,000 net short-term gain leaves $4,000 in net losses. You’d deduct $3,000 against ordinary income and carry $1,000 forward to 2027 as a long-term capital loss.11Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers