A tax-loss harvesting strategy is a portfolio management technique where you sell securities at a loss to offset capital gains tax liabilities from your winning trades. You've probably seen this happen in your own brokerage account. December rolls around, and while most of your portfolio is green, a few positions are sitting in the red. Instead of simply holding those losing positions and hoping they recover, you can strategically sell them to reduce your tax bill. We'll walk you through exactly how to identify these candidates and execute the trades without violating IRS rules, and we'll show you how to use both DIY spreadsheets and automated tools to manage your year-end tax burden. By the end of this guide, you will know how to turn your losing trades into a tangible financial advantage. Our team recommends treating tax management as an active part of your trading plan, not just an afterthought for your accountant.
What Is a Tax-Loss Harvesting Strategy and How Does It Work?
Bottom Line: A tax-loss harvesting strategy turns unrealized losses into a usable tax offset by selling declining positions, replacing them with proxies to stay invested, and repurchasing the originals after the 31-day wash sale window closes. The core discipline is treating tax management as an active part of portfolio planning year-round, not a reactive task at filing time.
A tax-loss harvesting strategy works by selling stocks, options, or ETFs that have declined in value below your purchase price. You then use those realized losses to cancel out the taxes owed on your realized gains. If your losses exceed your gains, you can offset ordinary income.
We teach our members to view unrealized losses as potential tax assets. When you sell a position at a loss, the IRS allows you to apply that loss against your capital gains for the year. This process requires a clear understanding of the difference between short-term and long-term capital gains.
Short-term capital gains apply to assets you have held for one year or less. These are taxed at your ordinary income rate, which can be as high as 37% for top earners. Long-term capital gains apply to assets held longer than one year. These benefit from lower tax rates, typically capping out at 20%.
Key Concept: When you harvest losses, you must first match them to gains of the same type. Short-term losses offset short-term gains first. Long-term losses offset long-term gains first. Once you have matched like with like, you can cross over and apply any remaining losses to the other category.

If you have more losses than gains, you can use the excess to offset your regular income. Any unused losses become carryforward losses. You can apply these carryforward losses to future tax years indefinitely, making them highly valuable for active traders.
How Much Can You Write Off with Tax-Loss Harvesting?
You can write off an unlimited amount of capital gains using your harvested losses. However, if your total losses exceed your total gains, the IRS enforces a strict limit. You can only write off up to $3,000 of excess losses against your ordinary income per calendar year.
This specific tax-loss harvesting limit applies to individuals and married couples filing jointly. If you are married but filing separately, the limit drops to $1,500 per year. Any losses beyond that $3,000 limit do not disappear. They roll over to the next tax year as carryforward losses.

We prefer to track these carryforwards meticulously. If you accumulate $15,000 in net losses this year, you can deduct $3,000 against your ordinary income. The remaining $12,000 carries forward to next year. If you have a highly profitable trading year next year, that $12,000 carryforward will automatically offset your new gains.
| Scenario | Net Losses | Deducted This Year | Carryforward |
|---|---|---|---|
| Moderate Loss Year | $5,000 | $3,000 | $2,000 |
| Heavy Loss Year | $15,000 | $3,000 | $12,000 |
| Losses Equal Gains | $0 net | Full offset applied | $0 |
What Is the Wash Sale Rule and How Does the 30-Day Window Work?
The biggest mistake we see intermediate traders make involves the IRS wash sale rule. The tax-loss harvesting 30-day rule states that you cannot claim a tax deduction for a loss if you buy a "substantially identical" security within 30 days before or after the sale.
This actually creates a 61-day window: 30 days before the sale, the day of the sale, and 30 days after the sale. If you sell AAPL at a loss on December 15, you cannot buy AAPL back until January 15. If you do, the IRS disallows the loss for the current tax year.

Instead of getting a deduction, the disallowed loss is added to the cost basis of your new position. This rule also applies to options contracts. You cannot sell a stock at a loss and immediately buy call options on that exact same stock. The IRS treats options on the same underlying asset as substantially identical securities for wash sale purposes.
Watch Out: The wash sale rule applies across ALL of your accounts. If you sell a stock at a loss in your taxable brokerage account and your spouse buys the same stock in their IRA within 30 days, the IRS can still disallow the loss. Track purchases across every account you control.
Step-by-Step Example: Executing a Tax-Loss Harvesting Strategy
Here's a concrete example using specific numbers. Assume you have $10,000 in realized short-term capital gains from trading NVDA earlier this year. You want to reduce the taxes owed on that gain.
- Identify the Setup: You currently hold 100 shares of AMD purchased at $150 per share. The current price is $100. You have an unrealized loss of $5,000. You want to harvest this loss to offset half of your NVDA gains.
- Execute the Sale: You sell your 100 shares of AMD at $100, officially realizing the $5,000 loss. Your taxable gains for the year immediately drop from $10,000 to $5,000. You have successfully harvested the loss.
- Maintain Market Exposure: You still believe the semiconductor sector will rise in January, but you cannot buy AMD back for 31 days. Instead, you use the proceeds to buy a proxy asset. We often recommend using a broad semiconductor ETF, such as SMH, as your replacement holding.
- Close the Loop: By buying SMH, you keep your capital deployed in the sector without violating the wash sale rule. After 31 days have passed, you can safely sell the SMH ETF and repurchase your original AMD shares if you still want to hold that specific company.
| Parameter | Value |
|---|---|
| Original Position | AMD, 100 shares at $150 |
| Sale Price | $100 per share |
| Realized Loss | -$5,000 |
| Gains Offset | $5,000 of $10,000 NVDA gains |
| Proxy Asset | SMH (Semiconductor ETF) |
| Waiting Period | 31 days before repurchasing AMD |
| Tax Savings (at 37% rate) | $1,850 |
Want expert trading insights delivered daily?
Join thousands of traders who rely on Traders Agency for market analysis and trade ideas.
Join Traders AgencyShould You Use Automated Tools or a DIY Spreadsheet for Tax-Loss Harvesting?
Managing this process requires excellent record-keeping. You have two main paths to choose from: doing it yourself or using automated platforms. Both approaches have distinct advantages depending on your trading style.
The DIY Approach
For the DIY approach, we recommend using a dedicated tax-loss harvesting calculator or a detailed spreadsheet. Your spreadsheet must track the purchase date, cost basis, current price, and the exact 31-day window for every position. Most major brokerages provide a realized and unrealized gain center that simplifies this data collection.
Automated Platforms
Alternatively, robo-advisors like Wealthfront and Betterment offer automated harvesting. These platforms scan your portfolio daily. When an asset drops below a certain threshold, the algorithm automatically swaps the losing ETF for a secondary proxy ETF.
While convenient, this automated approach removes your control over specific entry and exit prices. We prefer the manual DIY approach for active stock and options traders. Automated tools are generally better suited for passive, long-term ETF investors who do not want to monitor daily price fluctuations.
| Factor | DIY Spreadsheet | Automated Platform |
|---|---|---|
| Control | Full control over timing and execution | Algorithm decides when to swap |
| Best For | Active traders, options traders | Passive ETF investors |
| Cost | Free (your time) | Platform management fee (0.25-0.50%) |
| Wash Sale Risk | You must track manually | Built-in compliance checks |
| Customization | Unlimited | Limited to platform's ETF universe |
What Are the Pitfalls of Tax-Loss Harvesting?
The main pitfalls of tax-loss harvesting include violating the wash sale rule, disrupting your target portfolio allocation, and wasting short-term losses on long-term gains. Transaction costs and bid-ask spreads can sometimes outweigh the actual tax benefits if you are trading highly illiquid assets.
We always teach our members to weigh the pros and cons before clicking sell. Never let the tax tail wag the investing dog. Selling a fundamentally strong stock just to get a temporary tax break is usually a poor long-term decision.
Watch Out: You cannot harvest losses in tax-advantaged accounts like IRAs or 401(k)s. Because these accounts grow tax-free or tax-deferred, the IRS does not allow you to claim capital losses generated within them. This strategy only applies to standard taxable brokerage accounts.
Another common mistake is ignoring the bid-ask spread on proxy assets. If you sell a highly liquid stock and buy an illiquid proxy ETF, the slippage on the trade might cost you more than the tax savings. Always check the volume and spread of your replacement asset before executing the swap.
What Should You Review in Your Portfolio Before Year-End?
Our team recommends conducting a formal portfolio review during the first week of December. This gives you plenty of time to execute trades before the December 31 deadline. Waiting until the last day of the year often leads to rushed decisions and poor execution prices.

Follow these exact steps to identify your best candidates and execute your strategy cleanly:
- Pull a year-to-date realized gain and loss report from your broker to see exactly where you stand.
- Calculate your current net capital gains to determine your total tax exposure for the year.
- Sort your open positions by unrealized loss percentage, starting with the largest red numbers at the top.
- Filter out recent purchases to ensure you do not accidentally trigger a wash sale on a position you bought within the last 30 days.
- Select replacement proxy ETFs or alternative stocks to maintain your desired sector allocation.
- Execute the sell orders and immediately buy your proxy assets to maintain market exposure.
Key Concept: Keep your proxy positions at the exact same dollar allocation as the original holding. If you sell $10,000 worth of a losing stock, buy exactly $10,000 of the replacement ETF. This keeps your overall portfolio risk profile balanced while you wait out the 31-day restriction period.
Remember that the IRS capital gains and losses guidelines require you to report all transactions accurately. Keep detailed records of every sale, every proxy purchase, and every repurchase date. Your future self will thank you when tax filing season arrives.
Want expert trading insights delivered daily?
Join thousands of traders who rely on Traders Agency for market analysis and trade ideas.
Join Traders AgencyKey Takeaways
- Selling a losing position generates a realized loss that can offset capital gains dollar-for-dollar, and if losses exceed gains, up to a defined amount can offset ordinary income.
- The IRS wash sale rule creates a 31-day restriction window: buying a substantially identical security within 30 days before or after the sale disqualifies the loss deduction.
- To maintain market exposure during the 31-day window, replace the sold position with a proxy asset at the exact same dollar allocation. If you sell $10,000 of a losing stock, buy $10,000 of a replacement ETF.
- Tax-loss harvesting is most actionable at year-end, when unrealized losses in an otherwise profitable portfolio can be converted into a tangible reduction in that year's tax liability.
- Accurate recordkeeping of every sale, every proxy purchase, and every repurchase date is required for correct IRS reporting of capital gains and losses.
DISCLAIMER: Traders Agency does not offer financial advice. The information provided is for educational purposes only and should not be considered financial advice. Traders Agency is not responsible for any financial losses or consequences resulting from the use of the information provided. Trading carries inherent risks and may not be suitable for all individuals. You are advised to conduct your own research and seek personalized advice before making any investment decisions, recognizing the potential risks and rewards involved.
See more from Traders Agency on Google
Make us a preferred source and our market analysis will appear more prominently in your Google Search, Top Stories, and AI results.
Add to Preferred Sources