The process of calculating your final tax bill on investments is not a simple addition problem. It is a multi-step "netting" process that requires you to categorize your trades and follow a specific order of operations. By understanding these mechanics, you can strategically choose which assets to sell at the end of the year to minimize what you owe.
Categorizing the "Buckets": Short-Term vs. Long-Term
The first step in netting is separating your realized gains and losses into two distinct buckets based on their holding period.
The Short-Term Bucket (1 Year or Less)
Short-term capital gains are the "expensive" gains. They are taxed at the same rate as your salary—your marginal ordinary income tax rate . For a high-earning professional, this could mean losing nearly half of their trading profits to federal and state taxes.
- Example: If you are in the 32% tax bracket and you make a $1,000 profit on a stock you held for six months, you owe $320 in federal taxes.
The Long-Term Bucket (More Than 1 Year)
Long-term gains are the "discounted" gains. To encourage long-term investing, the IRS applies lower rates. Most individual investors fall into the 15% long-term capital gains bracket .
- Example: If you are in the same 32% ordinary bracket but held that stock for 13 months, your $1,000 profit is only taxed at 15%, meaning you owe $150. You just saved $170 simply by waiting a few extra months to sell.
The Step-by-Step Netting Process
The IRS follows a very specific sequence when you file your taxes. You cannot simply pick and choose which losses offset which gains. You must follow these three steps:
Step 1: Same-Category Netting
First, you net your short-term losses against your short-term gains. Then, you net your long-term losses against your long-term gains .
- Scenario A: You have $5,000 in ST gains and $2,000 in ST losses. Your Net ST Gain is $3,000.
- Scenario B: You have $10,000 in LT gains and $12,000 in LT losses. Your Net LT Loss is $2,000.
Step 2: Cross-Category Netting
If one bucket results in a net gain and the other results in a net loss, you can then use the loss from one to offset the gain from the other .
- Using the numbers above: Your $2,000 Net LT Loss can be used to offset your $3,000 Net ST Gain.
- Final Result: You only pay taxes on $1,000 of short-term gains.
Step 3: The Ordinary Income Offset
If, after all netting is done, you still have a net loss, you can apply up to $3,000 of that loss against your ordinary income (like your salary) . Any remaining amount is carried forward to the next year.
The $3,000 Rule and Carryforwards: A Case Study
Let's look at a comprehensive example of how a bad year can be a long-term tax win. Imagine "Investor Sarah" had a rough year in the markets:
- Realized ST Gains: $5,000
- Realized ST Losses: $15,000
- Realized LT Gains: $10,000
- Realized LT Losses: $5,000
The Math:
- Net ST: $5,000 - $15,000 = $10,000 Net ST Loss
- Net LT: $10,000 - $5,000 = $5,000 Net LT Gain
- Cross-Net: The $10,000 ST loss wipes out the $5,000 LT gain. Sarah now has a $5,000 Total Net Loss.
- Income Offset: Sarah uses $3,000 of that loss to reduce her taxable salary for the year. If she is in the 24% tax bracket, this saves her $720 in taxes ($3,000 x 0.24) .
- Carryforward: Sarah has $2,000 in losses left over ($5,000 - $3,000). She carries this $2,000 into next year, where it can be used to offset next year's gains .
The Wash-Sale Rule: The Trap to Avoid
The IRS is aware that investors might try to "game the system" by selling a stock at a loss just to get the tax break and then immediately buying it back. To prevent this, they created the Wash-Sale Rule.
A wash sale occurs if you sell a security at a loss and, within 30 days before or after the sale, you buy the "substantially identical" security .
- The Penalty: If you trigger a wash sale, you are not allowed to claim the loss on your taxes for that year. Instead, the loss is added to the cost basis of your new shares, delaying the tax benefit until you sell the new shares .
- The Scope: This rule applies across all your accounts, including your IRA or your spouse's account . You cannot sell in your taxable account and buy back in your Roth IRA to circumvent the rule.
How to Avoid the Wash Sale While Staying Invested
If you want to harvest a loss but still believe in the sector, you can buy a "similar" but not "identical" asset. For example, if you sell a specific tech stock (like Apple) at a loss, you could immediately buy a Tech Sector ETF (like VGT). Because a single stock and an ETF are not "substantially identical," you can claim the loss while maintaining your exposure to the tech market .
Summary Table: Tax Rates and Netting Rules
| Feature | Short-Term (≤ 1 Year) | Long-Term (> 1 Year) |
|---|---|---|
| Tax Rate | Ordinary Income Rates (up to 37%+) | 0%, 15%, or 20% |
| Netting Priority | Must offset ST gains first | Must offset LT gains first |
| Excess Losses | Can offset LT gains after ST | Can offset ST gains after LT |
| Income Offset | Up to $3,000 total (combined) | Up to $3,000 total (combined) |
Frequently Asked Questions (FAQs)
- Can I offset my salary with $10,000 of losses?
No. You can only offset up to $3,000 of ordinary income per year. The rest must be carried forward . - Do I have to net ST losses against ST gains first?
Yes. The tax code requires you to net within the same category before crossing over . - What if I sell on December 31st?
The trade must "settle" by the end of the year. Because settlement can take 1-2 business days, it is best to complete tax-loss harvesting trades a few days before the deadline . - Does the wash-sale rule apply to gains?
No. You can sell a stock for a gain and buy it back the next minute without any penalty (though you will owe taxes on the gain). The rule only applies to losses .

Comments