Capital Loss Harvesting Helper
Simple realized gain/loss scenarios
Model simple capital loss harvesting scenarios to see how selling losing positions might affect your capital gains tax.
⚠️ This is an educational calculator with simplified calculations. Not tax, legal, or investment advice. Does not fully model wash-sale rules. Always consult a tax professional for your specific situation.
Last updated: January 11, 2026
Understanding Tax-Loss Harvesting
Tax-loss harvesting is a powerful tax strategy used by investors to reduce their capital gains tax liability. The concept is straightforward: sell investments that have lost value to realize capital losses, then use those losses to offset gains from profitable investments.
When you sell an investment for more than you paid, you have a capital gain and owe taxes on that profit. But when you sell for less than you paid, you have a capital loss. The IRS allows you to use capital losses to reduce your taxable capital gains, dollar for dollar.
The strategy doesn't eliminate taxes—you still owe tax on net gains—but it lets you defer taxes or convert them into more favorable treatment. Smart tax-loss harvesting can save thousands of dollars over time, especially for investors with significant portfolios.
Key benefits of tax-loss harvesting include:
- Offset capital gains: Reduce taxes on profitable sales
- Offset ordinary income: Up to $3,000 per year can offset wages, interest, etc.
- Carry forward losses: Unused losses carry forward indefinitely
- Maintain market exposure: Reinvest in similar (but not identical) assets
How to Use This Tax-Loss Harvesting Calculator
This calculator helps you model different harvesting scenarios to see the potential tax impact:
Simple YTD Mode
- Enter your year-to-date realized gains (short-term and long-term)
- Enter your short-term and long-term capital gains tax rates
- Add loss positions you're considering harvesting
- See the before/after tax comparison
Position-Level Mode
- Add individual positions with their unrealized gains/losses
- Toggle which positions to include in the harvest
- See detailed impact of each position
Scenario Comparison Mode
- Create multiple harvest scenarios (e.g., "Harvest All", "Harvest Only ST")
- Compare tax outcomes side-by-side
- Identify the most tax-efficient strategy
Capital Gains and Losses Netting Rules
The IRS has specific rules for how capital gains and losses are netted against each other. Understanding these rules helps you harvest losses strategically:
Step 1: Net Within Categories
First, net all short-term gains against short-term losses. Separately, net all long-term gains against long-term losses. This gives you a net short-term result and a net long-term result.
Step 2: Net Across Categories
If one category has a net gain and the other has a net loss, they offset each other. This is important because:
- Short-term losses offsetting long-term gains: Saves tax at the short-term rate (your ordinary income rate)
- Long-term losses offsetting short-term gains: Also saves tax at the short-term rate—potentially wasteful if you have long-term gains to offset
Step 3: Apply Net Loss to Ordinary Income
If you end up with a net capital loss (total losses exceed total gains), you can deduct up to $3,000 per year ($1,500 if married filing separately) from ordinary income. Any excess carries forward to future years.
Tax Rate Implications
- Short-term gains: Taxed at your ordinary income rate (up to 37%)
- Long-term gains: Taxed at preferential rates (0%, 15%, or 20%)
- NIIT: Additional 3.8% on investment income for high earners
The Wash-Sale Rule: What You Need to Know
The wash-sale rule is a critical IRS regulation that prevents taxpayers from claiming artificial losses. Understanding and avoiding wash sales is essential for successful tax-loss harvesting.
What Triggers a Wash Sale?
A wash sale occurs when you sell a security at a loss and, within 30 days before or after the sale, you:
- Buy substantially identical securities
- Acquire substantially identical securities in a taxable trade
- Acquire a contract or option to buy substantially identical securities
- Acquire substantially identical securities for your IRA
What is "Substantially Identical"?
The IRS doesn't provide a precise definition, but generally:
- Identical: Same stock or bond (AAPL for AAPL)
- Substantially identical: Different share classes of the same company
- NOT substantially identical: Different companies in the same industry, different ETFs tracking similar indexes
Consequences of a Wash Sale
If you trigger a wash sale, the loss is disallowed for tax purposes. However:
- The disallowed loss is added to the cost basis of the replacement shares
- You'll eventually recognize the loss when you sell the replacement shares
- The holding period of the original shares transfers to the new shares
Warning: This calculator does NOT check for wash-sale violations. You must verify actual trade dates with your broker or tax professional to ensure compliance.
The $3,000 Ordinary Income Deduction
One of the most valuable aspects of capital losses is the ability to offset ordinary income—not just capital gains:
How It Works
If your total capital losses exceed your total capital gains, you have a net capital loss. You can use up to $3,000 of this loss ($1,500 if married filing separately) to reduce your ordinary income.
Why It's Valuable
Ordinary income (wages, interest, etc.) is taxed at higher rates than long-term capital gains. Using losses to offset ordinary income saves you tax at your marginal ordinary income rate, which could be as high as 37%.
Example:
You have $5,000 in net capital losses and are in the 32% tax bracket.
You can deduct $3,000 from ordinary income, saving $960 in taxes (32% × $3,000).
The remaining $2,000 carries forward to next year.
Loss Carryforward
Any net capital loss exceeding the $3,000 annual limit carries forward to future tax years indefinitely. This carryforward can offset future capital gains or continue to offset up to $3,000 of ordinary income each year.
Strategic Considerations
- Harvest enough losses to offset all gains plus $3,000
- Don't over-harvest—you may want losses for future high-gain years
- Consider your expected income in future years
Common Tax-Loss Harvesting Mistakes
Avoid these common pitfalls when implementing tax-loss harvesting:
❌ Triggering Wash Sales
The most common mistake is buying back the same security (or substantially identical) within the 61-day window. This includes purchases in IRAs and 401(k)s. Always wait 31 days or buy a different (not substantially identical) investment.
❌ Ignoring Transaction Costs
Trading costs, bid-ask spreads, and commissions can eat into tax savings. Make sure the tax benefit exceeds the cost of selling and buying replacement investments.
❌ Harvesting Long-Term Losses to Offset Short-Term Gains
While legal, using long-term losses to offset short-term gains means you're using "cheap" losses to offset "expensive" gains. If you have long-term gains too, consider which losses to use strategically.
❌ Forgetting About State Taxes
State capital gains taxes vary widely. Some states don't allow loss carryforwards or have different netting rules. Factor in your state's rules when planning.
❌ Disrupting Your Portfolio
Don't let tax decisions override investment decisions. Selling a good investment just for a small tax benefit may not be wise. Consider reinvesting in similar assets to maintain your desired allocation.
❌ Waiting Until Year-End
Tax-loss harvesting opportunities exist throughout the year. Waiting until December means you might miss opportunities during market downturns earlier in the year.
Tax-Loss Harvesting Best Practices
Maximize the value of tax-loss harvesting with these strategies:
Harvest Throughout the Year
Don't wait until December. Market volatility creates harvesting opportunities year-round. Regular review (monthly or quarterly) helps capture opportunities.
Use Similar But Not Identical Replacements
To avoid wash sales while maintaining market exposure, replace sold positions with similar investments:
- Swap one S&P 500 ETF for another similar but not identical fund (ticker examples for illustration only)
- Replace individual stocks with sector ETFs
- Use different share classes or similar funds
Prioritize Short-Term Losses
Short-term losses offset short-term gains first, saving taxes at higher ordinary income rates. Prioritize harvesting short-term losses when possible.
Consider Future Gains
If you expect to realize large gains in future years (selling a business, exercising stock options), bank losses now to offset those future gains.
Coordinate with Other Tax Strategies
Tax-loss harvesting works well with other strategies:
- Asset location: Hold tax-inefficient investments in tax-advantaged accounts
- Charitable giving: Donate appreciated assets instead of selling
- Tax-gain harvesting: In low-income years, realize gains at 0% rate
Sources & References
Tax-loss harvesting and capital gains information referenced in this content is based on official IRS publications:
- IRS Tax Topic 409 - Capital gains and losses overview
- IRS Publication 550 - Investment income and expenses including wash sale rules
- IRS Tax Topic 703 - Basis of assets (cost basis calculations)
- IRS Schedule D - Capital gains and losses reporting
Capital gains tax rates and ordinary income deduction limits are subject to change. Always verify current rules at irs.gov before implementing tax-loss harvesting strategies.
For Educational Purposes Only - Not Financial Advice
This calculator provides estimates for informational and educational purposes only. It does not constitute financial, tax, investment, or legal advice. Results are based on the information you provide and current tax laws, which may change. Always consult with a qualified CPA, tax professional, or financial advisor for advice specific to your personal situation. Tax rates and limits shown should be verified with official IRS.gov sources.
Frequently Asked Questions
What is tax-loss harvesting?
Does this tool handle wash-sale rules?
Can this guarantee I'll avoid penalties or match my broker's 1099-B?
How does the $3,000 ordinary income offset work?
What's the difference between short-term and long-term capital gains?
Should I harvest all my losses?
What happens if I have more losses than gains?
Does this tool account for state taxes?
Related Tools
Capital Gains Tax Calculator
Calculate tax on investment sales and capital gains
Tax Refund / Balance Due Estimator
Estimate whether you'll get a refund or owe money
Traditional vs Roth 401(k) / IRA Impact Calculator
Compare the long-term after-tax impact of retirement accounts
HSA vs FSA Tax Savings Calculator
Compare tax savings and net benefit of HSA vs FSA
Self-Employed / 1099 Tax Calculator
Calculate your complete self-employment tax liability
Tax-Equivalent Yield Calculator
Compare municipal bond yields to taxable bonds