Quick Answer
Tax-loss harvesting means selling investments at a loss to offset capital gains, reducing your tax bill. If you have $10,000 in gains and harvest $10,000 in losses, your capital gains tax is $0. Excess losses offset up to $3,000 of ordinary income per year. The wash sale rule prohibits rebuying the same security within 30 days.
Key Takeaways
- Tax-loss harvesting offsets capital gains with realized losses — reducing or eliminating capital gains tax.
- Up to $3,000 in net losses can offset ordinary income per year; excess carries forward indefinitely.
- The wash sale rule prevents buying the same or "substantially identical" security within 30 days.
- Robo-advisors automate tax-loss harvesting and can add 0.5–1.5% annual return in taxable accounts.
Tahir Özcan
Founder & Lead AuthorPersonal-finance researcher & software engineer · WealthCalc · Est. 2025
Tahir built WealthCalc after a decade of modeling household budgets, retirement plans, and mortgage amortization schedules for family and friends. He translates dense regulatory language — IRS Revenue Procedures, SSA COLA announcements, FHFA conforming loan limits — into accurate, usable calculator logic. Every formula is hand-audited against the primary government release and cross-validated with CFA Institute curriculum standards. Read our editorial standards →
- Every figure cites a primary government source
- All calculations run locally in your browser
- Open-source — reviewable on GitHub
- Reviewed quarterly against statutory changes
Tax-loss harvesting is one of the most effective tax strategies for investors — yet most people never use it. The concept is straightforward: sell investments that have declined in value to generate a loss that offsets your gains, then reinvest in a similar (but not identical) asset to maintain your portfolio allocation.
How Tax-Loss Harvesting Works
Step-by-step example:
- Step 1: You sold Stock A for a $15,000 long-term gain
- Step 2: You hold Fund B which is down $12,000 from your purchase price
- Step 3: Sell Fund B, realizing the $12,000 loss
- Step 4: Your net taxable gain is now $15,000 − $12,000 = $3,000
- Step 5: Immediately buy a similar (not identical) fund to maintain market exposure
- Tax saved (15% LTCG rate): $12,000 × 15% = $1,800
The Wash Sale Rule
The IRS wash sale rule disallows the loss deduction if you buy "substantially identical" securities within 30 days before or after the sale:
- Prohibited: Selling Vanguard S&P 500 ETF (VOO) at a loss, then buying it back within 30 days
- Prohibited: Selling VOO and buying Vanguard S&P 500 Index Fund (VFIAX) — substantially identical
- Allowed: Selling VOO and buying iShares Core S&P 500 (IVV) — similar but not identical (different fund company)
- Allowed: Selling a total market fund and buying a large-cap growth fund — different index/strategy
- Crypto exception: The wash sale rule does NOT apply to cryptocurrency in 2026 — you can sell and rebuy immediately
When to Harvest Losses
Optimal timing for tax-loss harvesting:
- Market dips: After corrections or sector drops, scan your portfolio for harvestable losses
- Year-end (October–December): Review annual gains and offset them before year-end
- Continuous monitoring: Robo-advisors scan daily — they harvest losses whenever available, not just in December
- Do NOT wait for "recovery": Once you swap into a similar fund, you capture the same recovery with the tax benefit
How Much Can Tax-Loss Harvesting Save?
Estimated annual value by portfolio size:
- $100,000 portfolio: $200–$600/year in tax savings
- $500,000 portfolio: $1,000–$3,000/year
- $1,000,000 portfolio: $2,000–$7,000/year
- Robo-advisors like Wealthfront and Betterment: Report 0.5–1.5% annual tax alpha from automated harvesting
- Over 20 years: These savings compound — $2,000/year at 7% growth = $82,000 additional wealth
Try the Capital Gains Tax Calculator
Put this knowledge into action with our free calculator. Get instant, personalized results.
Frequently Asked Questions
Should I tax-loss harvest in my IRA or 401(k)?
No — tax-loss harvesting only works in taxable brokerage accounts. Retirement accounts (IRA, 401(k), Roth) are already tax-advantaged, and you cannot claim capital losses on transactions within them. Focus harvesting efforts exclusively on your taxable investment accounts.
Does tax-loss harvesting just defer taxes?
Partially yes — your new cost basis is lower, meaning a larger gain when you eventually sell. However, deferral has real value: a dollar of tax saved today and invested for 20 years at 7% is worth $3.87. Additionally, if you hold the replacement asset until death, the step-up in basis eliminates the deferred gain entirely.
Can I do tax-loss harvesting myself or do I need a service?
You can absolutely DIY — just sell losing positions and buy similar (not identical) replacements while respecting the 30-day wash sale rule. However, robo-advisors automate the process, monitor daily, and handle the compliance. For portfolios over $50,000 in taxable accounts, the tax savings from automated harvesting usually exceed the robo-advisor fee.
Can I buy back the same investment after tax-loss harvesting?
Not within 30 days — the IRS wash-sale rule disallows the loss if you buy a substantially identical security within 30 days before or after the sale. However, you can immediately buy a similar but not identical investment (e.g., sell an S&P 500 ETF and buy a total market ETF) to maintain market exposure while harvesting the tax loss.
Primary Sources
Last reviewed:
All 2026 figures in this article are pulled from the official statutory releases linked below. We update them within 48 hours of a new IRS Revenue Procedure, SSA COLA announcement, or CMS/FHFA/HUD fact sheet.
- IRS Rev. Proc. 2025-32 — 2026 Inflation Adjustments(published )
- IRS Newsroom — 2026 Tax Inflation Adjustments (incl. OBBBA amendments)(published )
Figures are updated whenever the IRS, SSA, CMS, FHFA, HHS, or BLS publishes a new inflation adjustment or statutory change. This tool is for educational purposes only and does not constitute tax, legal, or investment advice. Consult a qualified professional for decisions affecting your personal finances.