Tax-Loss Harvesting Calculator: How to Turn Market Losses Into Tax Savings
Use a tax-loss harvesting calculator to see how much you can save on taxes by strategically selling losing investments. Learn the wash-sale rule and key strategies.
Disclaimer: This article provides educational financial information only and does not constitute tax or investment advice. Tax laws are complex and change frequently. Consult a qualified tax professional before implementing any tax strategy. Individual results will vary based on your specific tax situation.
Your investment portfolio drops 15% in a correction. Most investors feel only pain. Experienced investors see an opportunity.
That opportunity is called tax-loss harvesting. It is a legal strategy that lets you sell investments at a loss to offset capital gains elsewhere in your portfolio, reducing your tax bill for the year. Done correctly, tax-loss harvesting can save thousands of dollars annually without changing your long-term investment strategy or portfolio allocation.
Our Tax-Loss Harvesting Calculator shows you exactly how much you can save based on your marginal tax rate, realized gains, and investment losses available to harvest.
What Is Tax-Loss Harvesting?
Tax-loss harvesting is the practice of selling investments that have declined below your purchase price to generate a capital loss. This realized loss can then offset realized capital gains, reducing the taxes you owe.
Here is the basic mechanic:
- You bought 100 shares of Stock A at $50/share = $5,000 cost basis
- Stock A is now trading at $35/share = $3,500 current value
- You have a $1,500 unrealized loss
If you also sold Stock B this year for a $1,500 gain, you would normally owe taxes on that $1,500 gain. But if you sell Stock A and realize that $1,500 loss, it offsets the $1,500 gain and you owe zero capital gains tax.
The tax you would have paid on $1,500 at the long-term capital gains rate of 15% = $225 saved. At 20% it is $300 saved. These numbers scale dramatically with larger portfolios.
The Wash-Sale Rule: The One Rule You Cannot Break
The IRS knows about tax-loss harvesting and has created a rule to prevent abuse: the wash-sale rule.
The wash-sale rule states that if you sell a security at a loss and buy the "substantially identical" security within 30 days before or after the sale, the loss is disallowed. You cannot deduct it.
This 30-day window runs in both directions. If you sold Stock A at a loss on November 15, you cannot:
- Buy Stock A back before November 15 (30 days before)
- Buy Stock A back before December 15 (30 days after)
What you CAN do: Buy a similar but not substantially identical security immediately. For example:
- Sell Vanguard S&P 500 ETF (VOO) at a loss → immediately buy iShares S&P 500 ETF (IVV)
- Sell one large-cap fund at a loss → immediately buy a different large-cap fund
This maintains your market exposure while locking in the tax loss. You never miss a day of market action.
How Much Can Tax-Loss Harvesting Save You?
The savings depend on your tax bracket, the size of your gains, and available losses. Let's walk through real scenarios.
Scenario 1: Long-term capital gains offset:
- Realized long-term gain: $20,000
- Available losses to harvest: $20,000
- Long-term capital gains tax rate: 15%
- Tax saved: $20,000 × 15% = $3,000
Scenario 2: Short-term capital gains offset (higher tax):
- Realized short-term gain: $15,000
- Available losses: $15,000
- Marginal income tax rate: 32%
- Tax saved: $15,000 × 32% = $4,800
Short-term gains are taxed as ordinary income, so harvesting losses against short-term gains is even more valuable.
Scenario 3: Offsetting ordinary income:
If your capital losses exceed your capital gains, you can use up to $3,000 of excess losses to offset ordinary income per year. If you are in the 24% bracket, that is a $720 tax savings. Any losses beyond $3,000 carry forward to future years indefinitely.
Use our Tax-Loss Harvesting Calculator to model your specific scenario with your actual numbers.
The Real Long-Term Benefit: Deferred Tax Compounding
Tax-loss harvesting is often described as a "defer, not eliminate" strategy. When you harvest a loss and buy a replacement security, your cost basis in the new security is lower (you bought it when prices were lower). This means when you eventually sell, you will have a larger gain to pay taxes on.
So why bother? Because of the time value of money.
If you defer $3,000 in taxes today and that money stays invested for 20 years at 8% return, it grows to $13,983. Even after you pay the deferred tax when you eventually sell, you are far ahead because your money was working for you during those 20 years instead of going to the IRS.
This is why tax-loss harvesting at scale, the kind automated investing platforms do with hundreds of small positions, can meaningfully improve after-tax returns by 0.5-1.5% per year in volatile markets.
Step-by-Step: How to Use the Tax-Loss Harvesting Calculator
Our Tax-Loss Harvesting Calculator walks you through the key inputs:
Step 1: Enter your marginal tax rate. This should be your combined federal + state marginal rate for the type of gains you are offsetting (ordinary income rate for short-term gains, long-term capital gains rate for long-term gains).
Step 2: Enter your realized capital gains. How much have you already realized in capital gains this year from investment sales? These are the gains your harvested losses will offset.
Step 3: Enter your available losses. Look at your unrealized losses across your portfolio. Which positions are currently below your purchase price and which you would be comfortable selling to lock in the loss and rebuy a similar position?
Step 4: View your tax savings. The calculator shows your total loss to harvest, estimated tax saved, and any loss carryforward amount if your losses exceed your gains.
When Tax-Loss Harvesting Makes the Most Sense
Year-end tax planning: The last 2-3 months of the year are prime time for tax-loss harvesting. You have a clear picture of your realized gains for the year and can target specific losses to offset them.
After market corrections: Market drops create harvesting opportunities. A 10-20% correction across your portfolio means many positions have losses you can harvest while maintaining your market exposure through replacement securities.
High-income years: Tax-loss harvesting is more valuable in higher tax brackets. If you are having an unusually high-income year (bonus, business sale, stock option exercise), harvesting losses is especially powerful.
Long-term investors with gains: If you have large unrealized gains in appreciated positions you want to keep, harvesting unrelated losses can offset gains from rebalancing without a big tax bill.
Common Tax-Loss Harvesting Mistakes
Mistake 1: Triggering the wash-sale rule. This is the most costly mistake. Accidentally rebuying the same security within 30 days disallows your loss entirely.
Mistake 2: Harvesting losses in tax-advantaged accounts. Tax-loss harvesting only applies to taxable accounts. Losses in your IRA, 401k, or Roth IRA have no tax benefit because these accounts are already tax-advantaged.
Mistake 3: Ignoring transaction costs. If the tax savings from harvesting a small loss are less than the trading commissions and bid/ask spread, the harvest is not worth it. For most modern brokerages with zero-commission trading, this is less of a concern.
Mistake 4: Over-focusing on taxes at the expense of returns. Never sell an investment purely for tax reasons if you believe it will outperform its replacement. The tax tail should not wag the investment dog.
Mistake 5: Not tracking your carryforward losses. Unused capital losses carry forward indefinitely. Make sure your tax software or accountant tracks these across years.
Frequently Asked Questions
Q1: What is tax-loss harvesting in simple terms?
Tax-loss harvesting means selling investments that have declined in value to lock in the loss on paper, which reduces the taxes you owe on gains from other investments you sold this year. You immediately rebuy a similar (but not identical) investment to maintain your portfolio allocation.
Q2: How much can I save with tax-loss harvesting?
It depends on your tax rate and the size of gains being offset. At a 15% long-term capital gains rate, offsetting $10,000 in gains saves $1,500. At a 32% ordinary income rate (for short-term gains), offsetting $10,000 saves $3,200. Large portfolios in high tax brackets can save tens of thousands annually.
Q3: Can I harvest losses and stay invested in the market?
Yes, this is the key to tax-loss harvesting. You sell Security A (at a loss) and immediately buy Security B (a similar but not substantially identical security). You are never out of the market. Your portfolio composition changes slightly but your market exposure stays intact.
Q4: What happens if my losses are larger than my gains?
You can use up to $3,000 of excess capital losses per year to offset ordinary income (like your salary). Any remaining losses carry forward to future tax years with no expiration. These carryforward losses offset future gains automatically.
Q5: Is tax-loss harvesting legal?
Yes, completely legal. The IRS explicitly allows it. The wash-sale rule is the guardrail, not a prohibition. Tax-loss harvesting is a standard strategy used by wealth managers for high-net-worth clients and increasingly automated by robo-advisors for everyone.
Q6: Do I need a lot of money to benefit from tax-loss harvesting?
Tax-loss harvesting becomes more impactful with larger portfolios simply because the potential losses and gains are larger. But even a $50,000 portfolio can benefit meaningfully from harvesting $5,000-$10,000 in losses during a market correction. The IRS $3,000 ordinary income offset is valuable at any portfolio size.
Q7: When is the deadline for tax-loss harvesting each year?
The deadline is December 31 of the tax year. Trades must settle by December 31 for the loss to count in that tax year. Given that US equity trades settle T+1, you need to execute by approximately December 30 to ensure settlement. Plan your harvesting in October-November to avoid last-minute pressure. ---
Ready to calculate your tax savings?