Investing Guide
Tax Loss Harvesting: The Legal Way to Turn Losses Into Savings
How to save thousands in taxes by selling your losers strategically. Every loss in your portfolio is a potential tax deduction waiting to be claimed -- if you know the rules.
Quick Tax Savings Calculator
Enter your numbers to see how much tax loss harvesting could save you this year.
Total realized gains from all sales
Unrealized losses you could sell
Long-term rate for most filers is 15%
Tax Savings
$1,200
from harvesting
Net Taxable Gain
$7,000
still owe tax on this
$3K Ordinary Deduction
$0
gains fully absorb losses
Loss Carry-Forward
$0
nothing to carry
What Is Tax Loss Harvesting?
Tax loss harvesting is the practice of selling investments that are currently at a loss to offset capital gains taxes you owe on your winners. It is one of the most powerful -- and most underutilized -- legal tax reduction strategies available to individual investors.
Here is the core idea: the IRS does not care about your unrealized gains and losses. They only care about what you have actually sold. So if you have $10,000 in realized gains from selling Stock B, and you sell Stock A at a $10,000 loss, those cancel out. Your capital gains tax bill goes to zero. You still own a portfolio with the same market exposure (by buying a similar replacement), but you owe nothing in taxes that year.
The strategy is not about losing money on purpose. It is about recognizing that losses are inevitable in any portfolio, and you might as well get a tax benefit from them rather than just letting them sit there making you feel bad. Every red position in your portfolio is a potential tax deduction -- you just have to harvest it.
According to research from Wealthfront, systematic tax loss harvesting can add between 1.0% and 2.2% in annual after-tax returns. Over a 30-year investing career, that compounding advantage can translate into hundreds of thousands of dollars. And yet most individual investors never do it because they think it is too complicated. It is not. Let me walk you through it.
The 7-Step Tax Loss Harvesting Playbook
Follow these steps every quarter (or at minimum, every December) to maximize your tax savings.
Identify losing positions in your portfolio
Log into your brokerage and sort positions by unrealized gain/loss. Any position sitting at a loss is a potential harvesting candidate. Focus on the largest losses first -- they save you the most.
Sell the losing position to "realize" the loss
Unrealized losses mean nothing to the IRS. You have to actually sell the position to lock in the capital loss. This converts a paper loss into a real, tax-deductible loss on your return.
Use losses to offset gains (same type first)
Short-term losses offset short-term gains first. Long-term losses offset long-term gains first. Then any excess crosses over. This ordering matters because short-term gains are taxed at higher ordinary income rates.
Deduct up to $3,000 against ordinary income
If your losses exceed your gains, you can deduct up to $3,000 of the remaining loss against your regular income (salary, freelance, etc.). This is a straight reduction in taxable income -- not a credit, but still valuable.
Carry forward remaining losses indefinitely
Losses beyond the $3,000 annual limit do not disappear. They carry forward to future tax years forever. You can accumulate a massive loss carryforward and deploy it against future gains for years or even decades.
Buy a similar (NOT identical) investment to maintain exposure
This is the key move. After selling, immediately buy a similar but not "substantially identical" security. Sell your S&P 500 ETF (SPY)? Buy a total market ETF (VTI). You stay invested, harvest the loss, and avoid the wash sale rule.
Wait 31 days before repurchasing the same security
If you want the exact same security back, you must wait at least 31 days. Buying it within 30 days triggers the wash sale rule and disallows your loss. Mark your calendar and set a reminder.
The Tax Loss Harvesting Play
Walk through a real example step by step. Click the arrows to see how a $3,000 loss saves you $450 in taxes.
Stock A (Loser)
Cost Basis: $10,000
Current: $7,000
Stock B (Winner)
Gains: $5,000
Tax Owed: $750
You own Stock A (down $3,000) and Stock B (up $5,000).
The Wash Sale Rule: The One Rule You Cannot Break
The wash sale rule is the single most important thing to understand about tax loss harvesting. Get it wrong, and the IRS will disallow your loss entirely. Get it right, and you can harvest losses year after year without issue.
The 61-Day Window
The wash sale rule creates a 61-day restricted window: 30 days before the sale, the day of the sale, and 30 days after. You cannot buy a "substantially identical" security anywhere in this window.
Day -30
No buying starts
Sale Day
Sell at a loss
Day +30
Safe to rebuy
Triggers Wash Sale
- XBuying the same stock within 30 days
- XBuying the same stock in your IRA or Roth
- XBuying call options on the same stock
- XSpouse buying the same stock within 30 days
- XDRIP reinvesting into the same stock
- XTwo ETFs tracking the exact same index
Does NOT Trigger Wash Sale
- ✓Selling SPY, buying VTI (different index)
- ✓Selling Apple stock, buying a tech ETF
- ✓Selling one bond fund, buying a different one
- ✓Waiting 31+ days to repurchase the same stock
- ✓Selling stock and buying bonds (different asset class)
- ✓Selling crypto and rebuying (currently no wash sale rule)
Common Wash Sale Mistakes
Buying the same stock within 30 days in a different account
The wash sale rule applies across ALL your accounts -- taxable brokerage, IRA, Roth IRA, even your spouse's accounts. Buying AAPL in your Roth after selling it at a loss in your taxable account still triggers a wash sale.
Reinvesting dividends into a position you just sold
If you have automatic dividend reinvestment (DRIP) turned on, it could buy shares of the same stock you just sold at a loss. Turn off DRIP before harvesting, or your automatic reinvestment will disallow the loss.
Buying a call option on the same stock
Options on the same underlying stock are considered "substantially identical" by the IRS. Selling stock at a loss and buying call options within 30 days disallows the loss just like buying the shares would.
Buying an ETF that tracks the same narrow index
This is a gray area, but two ETFs tracking the exact same index (e.g., both tracking the S&P 500) could be considered substantially identical. To be safe, switch to a different but correlated index -- S&P 500 to total market, for example.
Advanced Tax Loss Harvesting Strategies
Tax-Gain Harvesting
The opposite of TLH. If your taxable income puts you in the 0% long-term capital gains bracket (under ~$48K single, ~$97K married in 2025), intentionally sell winners to realize gains tax-free. This resets your cost basis higher, reducing future taxes. Extremely valuable in gap years, early retirement, or any year with unusually low income.
Direct Indexing
Instead of owning an S&P 500 ETF, you own 500 individual stocks that replicate the index. When individual stocks decline, you harvest losses on those specific positions while the overall portfolio still tracks the index. Studies show this can add 1-2% in annual tax alpha. Fidelity, Schwab, and Wealthfront all offer direct indexing products now, often with minimums as low as $1.
Year-Round vs. Year-End Harvesting
Most people only think about TLH in December. That is a mistake. Markets are volatile all year -- a stock might be down 25% in June and flat by December. Check quarterly at minimum. The best approach is daily automated scanning (what robo-advisors do), but even a quarterly manual review captures most of the value. Set calendar reminders for March 31, June 30, September 30, and December 15.
Pairing with Roth Conversions
Roth conversions create taxable income. Tax loss harvesting creates deductions. Combine them in the same year for maximum impact: convert $50K from a traditional IRA to a Roth (taxable event), then harvest $50K in losses to offset the conversion income. You get the Roth conversion done at a much lower effective tax rate. This is an advanced move but incredibly powerful for early retirees.
Glen's Real Experience With Tax Loss Harvesting
Let me be real with you: my worst trades page is basically a tax loss harvesting goldmine. When your options record is 1-8, you learn a thing or two about realized losses. Every single one of those losing options trades? Harvested. Every penny of loss deducted against my winning trades.
My approach is simple: I trade actively in my taxable account (sometimes too actively -- see my trading lessons for the painfully honest breakdown). When positions go against me, I do not just sit there hoping they come back. I sell, book the loss, and immediately buy something similar to maintain market exposure. The tax savings from those harvested losses partially offset the sting of the bad trade.
Here is a concrete example from my own portfolio: I bought options on a stock that I was convinced was going to move. It did not. I lost about $4,000 on the position. Painful? Yes. But that $4,000 loss offset $4,000 of gains I had from other trades, saving me roughly $600 in capital gains taxes at my bracket. Did it make the loss feel good? No. But $600 back in my pocket is better than $600 going to the IRS on top of an already bad trade.
Every loss I have taken has saved me money on the winning trades. Silver linings. The key insight is that losses are not just failures -- they are assets on your tax return. The difference between a good investor and a great one is often just tax awareness. I have carried forward losses from bad years that saved me thousands in good years. It all evens out -- as long as you are disciplined about harvesting.
Living in Miami Beach (Florida has no state income tax) means my federal savings from TLH go even further -- I am not leaving money on the table at the state level either. If you are in a high-tax state like California or New York, tax loss harvesting is even MORE valuable for you because your all-in rate is higher.
How Capital Losses Offset Capital Gains: The Full Mechanics
The IRS has specific ordering rules for how losses offset gains. Understanding these rules is important because short-term and long-term gains are taxed at very different rates, and the order of offset determines your final tax bill.
Short-term losses offset short-term gains first
Short-term gains are taxed at your ordinary income rate (up to 37%). Offsetting them with short-term losses saves you the most money per dollar of loss. This is the highest-value offset.
Long-term losses offset long-term gains first
Long-term gains are taxed at preferential rates (0%, 15%, or 20%). Long-term losses offset these first. Still valuable, but each dollar of long-term loss saves less than a dollar of short-term loss offset.
Excess losses cross over to offset the other type
If you have more short-term losses than short-term gains, the excess offsets long-term gains (and vice versa). This cross-over is automatic on your Schedule D.
Then the $3,000 ordinary income deduction
After all gains are offset, up to $3,000 of remaining net loss reduces your ordinary income. At a 24% marginal rate, that is $720 in savings. At 37%, it is $1,110. Small but consistent year after year.
Everything left carries forward forever
There is no time limit on capital loss carryforwards. If you realize $100,000 in losses in a terrible year, you can use them to offset gains and deduct $3,000/year for decades. They even survive through multiple tax years until fully used. You report the carryforward on each year's Schedule D.
When NOT to Tax Loss Harvest
Tax loss harvesting is powerful, but it is not always the right move. Here are situations where you should think twice before selling at a loss.
You are in the 0% capital gains bracket
If your taxable income is below ~$48,350 (single) or ~$96,700 (married filing jointly) in 2025, your long-term capital gains rate is already 0%. There is nothing to offset. In fact, you should do the opposite: tax-gain harvest by selling winners tax-free to reset your cost basis higher.
Transaction costs exceed the tax savings
If harvesting a $200 loss at a 15% rate saves you $30 but costs $10 in commissions and causes bid-ask spread slippage, the net benefit shrinks fast. Focus on your largest losses first. Most brokerages now have $0 commissions on stocks and ETFs, which makes small harvests more viable than they used to be.
You have a high-conviction position you do not want to exit
If you truly believe a stock is temporarily down and will recover strongly, selling it to harvest a loss and waiting 31 days to repurchase means you risk missing a rebound. The tax savings might not justify the opportunity cost. You can mitigate this by buying a similar (not identical) security as a placeholder, but it is not perfect.
You expect to be in a much higher bracket later
Harvesting losses today saves you taxes at your current rate. If you are early in your career and expect to earn significantly more later, the same loss might be more valuable in a future year when you are in the 37% bracket instead of the 22% bracket. That said, tax savings today are worth more than tax savings tomorrow due to the time value of money, so this consideration is more nuanced than it seems.
Recommended Resources
Tools & books I actually use and recommend
SeekingAlpha Premium
Quant ratings, earnings transcripts, and the stock analysis community where I published 300+ articles.
Try SeekingAlphaA Random Walk Down Wall Street
Burton Malkiel's classic case for index investing. The book that convinced millions to stop stock-picking.
View on AmazonThe Little Book of Common Sense Investing
John Bogle's manifesto on why low-cost index funds beat everything else. Straight from the founder of Vanguard.
View on AmazonSome links above are affiliate links. I only recommend products I personally use. See my full disclosures.
Frequently Asked Questions
What is tax loss harvesting?
Tax loss harvesting is the strategy of selling investments at a loss to offset capital gains taxes. By realizing losses, you reduce your taxable investment income, potentially saving hundreds or thousands of dollars each year. Any losses exceeding your gains can offset up to $3,000 of ordinary income, with the rest carried forward indefinitely.
What is the wash sale rule and how does it work?
The wash sale rule prevents you from claiming a tax loss if you buy a "substantially identical" security within 30 days before or after the sale. This creates a 61-day window (30 days before + sale day + 30 days after) during which you cannot repurchase the same security. The rule applies across all your accounts, including IRAs and your spouse's accounts.
Can I tax loss harvest cryptocurrency?
Yes. Crypto is treated as property by the IRS, so you can sell crypto at a loss to harvest tax deductions just like stocks. Historically, the wash sale rule did NOT apply to crypto (since it's property, not a security), but the IRS has been signaling that crypto wash sale rules may be coming. As of 2025, you can technically sell Bitcoin at a loss and immediately rebuy it, but check current regulations as this is an evolving area.
How much can I deduct from tax loss harvesting?
There is no limit to using capital losses to offset capital gains. If you have $50,000 in losses and $50,000 in gains, they fully cancel out. Beyond offsetting gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income like your salary. Any remaining losses carry forward to future years with no expiration.
Should I tax loss harvest at year-end or throughout the year?
Both work, but year-round harvesting generally captures more value. Markets are volatile -- a stock might be down 20% in March but up 10% by December. If you only check in December, you missed the bigger loss. Many robo-advisors like Betterment and Wealthfront do daily tax loss harvesting scans for this reason.
Do robo-advisors do tax loss harvesting automatically?
Yes, several robo-advisors offer automated tax loss harvesting as a core feature. Betterment, Wealthfront, and others scan your portfolio daily for harvesting opportunities and automatically swap into similar funds to maintain your target allocation. This is one of the biggest advantages of using a robo-advisor over manual investing.
What is direct indexing and how does it relate to tax loss harvesting?
Direct indexing means owning individual stocks that replicate an index (like the S&P 500) instead of buying the index fund. The advantage: when individual stocks decline, you can harvest losses on those specific positions while the overall portfolio tracks the index. Studies suggest direct indexing can add 1-2% in annual tax alpha. Services like Fidelity, Schwab, and Wealthfront now offer direct indexing at low costs.
What is tax-gain harvesting and when should I use it?
Tax-gain harvesting is the opposite of tax loss harvesting: you intentionally sell winners in years when you fall in the 0% capital gains bracket (under ~$48K taxable income for singles, ~$97K for married couples in 2025). By realizing gains tax-free, you reset your cost basis higher, reducing future taxes. This is especially valuable for retirees, gap-year workers, or anyone with a temporarily low-income year.
Every Red Position Is a Tax Deduction
Scroll back up to the calculator and plug in your real numbers. You might be surprised how much you can save this year -- especially if you have been avoiding looking at your losers.
Keep Optimizing Your Tax Strategy
Capital Gains Tax Calculator
Calculate your exact federal and state capital gains tax on stock sales, real estate, crypto, and RSUs.
Read moreCalculatorTax Bracket Calculator
See exactly how federal income tax brackets apply to your income with a visual bracket-by-bracket breakdown.
Read moreTransparencyMy Worst Trades
The trades that cost me the most money. Complete with pain meters and lessons learned (and harvested losses).
Read moreLessonsTrading Lessons
8 hard-won lessons from 2,068 real trades. Including why tax awareness is one of the biggest edges you can have.
Read moreCalculatorInvestment Fee Calculator
High fees are the other silent killer of returns. See how much your fund expenses actually cost you over 30 years.
Read moreToolCompare Your Returns
Benchmark your investment performance against Buffett, the S&P 500, and my actual track record.
Read moreGet Glen's Musings
Occasional thoughts on AI, Claude, investing, and building things. Free. No spam.
Unsubscribe anytime. I respect your inbox more than Congress respects property rights.