Calculate how much you can save on taxes by strategically selling losing investments to offset capital gains.
Auto-updated · Verified daily against IRS, Fed & Treasury sources
Enter your numbers below
Held < 1 year
Held ≥ 1 year
Daniel, 47, financial analyst in Seattle, WA, realized $42,000 in net capital losses in 2022 from selling concentrated tech positions. After using $3k/yr against ordinary income, he enters 2025 with $39,000 in carryover losses. He sells VXUS for a $28,000 long-term gain.
Takeaway: IRC §1212(b) allows unlimited capital loss carryovers — they never expire. Daniel must avoid repurchasing the same (or substantially identical) securities within 30 days before or after the sale that created the loss (§1091 wash-sale rule). Switching from VXUS to SCHF for 31+ days maintains international exposure while preserving the harvested loss.
Selling a fund at a loss and buying a "substantially identical" fund within 30 days before or after triggers §1091. SPY and IVV both track S&P 500 — they are probably substantially identical. Swapping to a "similar but not identical" fund (e.g., SPY to VTI) avoids the rule but changes exposure.
Wash Sale CalculatorThe loss offsets gains or up to $3,000/yr of ordinary income now. The replacement fund has a lower cost basis by the exact loss amount — so that gain is larger when eventually sold. The benefit is the time value of money on the deferred tax: harvesting a $10,000 loss at 20% saves $2,000 today, but you may owe $2,000 more later.
Losses exceeding $3,000/yr carry forward indefinitely — but unused carryforward losses are not inheritable. Stepped-up basis at death eliminates embedded gains — making it preferable to hold appreciated positions for step-up rather than harvesting gains to use accumulated carryforward losses.
Tax rules require netting same-type gains and losses first: short-term losses against short-term gains, long-term losses against long-term gains. Using long-term losses to offset short-term gains at 37% is more valuable than offsetting long-term gains at 20% — but the netting order is mandatory, not elective.
Under AMT, capital losses offset AMTI only up to AMT capital gain net income. If you are in AMT, harvested losses may not offset income at your expected marginal rate. The AMT exemption phases out at $609,350 single / $1,218,700 MFJ (2025).
Based on your inputs
All losses utilized this year
| Tax Without Harvesting | $6,700 |
|---|---|
| Tax With Harvesting | $4,590 |
| Tax Savings | $2,110 |
| Net Short-Term Gain/Loss | $7,000 |
| Net Long-Term Gain/Loss | $10,000 |
| Ordinary Income Deduction | $0 |
| Deduction Tax Savings | $0 |
| Loss Carryover to Next Year | $0 |
Money Score: Analyze 3 calcs across rent, debt, and savings to unlock.
Analyze 3 calcs to unlock
0 of 3 analyzed
Analyze 3+ calcs to unlock your Financial Picture dashboard (cross-analysis of all your numbers).
Tax-loss harvesting is the strategy of selling investments at a loss to offset capital gains taxes, potentially saving you thousands of dollars annually. By strategically realizing losses while maintaining your investment exposure through similar replacement securities, you reduce your current year tax bill without fundamentally changing your portfolio allocation.
The process starts by identifying investments in your taxable brokerage account that are currently worth less than what you paid for them. You sell these losing positions to realize the capital loss, then immediately reinvest the proceeds in a similar but not identical investment to maintain your market exposure. The realized loss offsets capital gains from other investments, and up to $3,000 of excess losses can offset ordinary income.
For example, if you have $15,000 in long-term capital gains from selling appreciated stocks, and you harvest $10,000 in long-term losses from an underperforming position, your taxable gain drops to $5,000. At a 15% long-term capital gains rate plus 5% state tax, this saves you $2,000 in taxes. If your losses exceed your gains, you can deduct up to $3,000 against ordinary income and carry forward the remaining losses indefinitely.
The IRS requires you to match short-term losses against short-term gains first, and long-term losses against long-term gains first. Only after netting within each category do excess losses cross over to offset the other type. This ordering matters because short-term gains are taxed at ordinary income rates (up to 37%) while long-term gains face lower rates (0%, 15%, or 20%).
Short-term loss harvesting is more valuable per dollar of loss because it offsets gains taxed at higher rates. A $10,000 short-term loss saves up to $3,700 in federal taxes (37% bracket) versus $2,000 for the same long-term loss (20% bracket). Prioritize harvesting short-term losses when available, especially late in the year when you can estimate your annual tax situation.
When capital losses exceed capital gains, up to $3,000 of the excess ($1,500 if married filing separately) can be deducted against ordinary income like wages, interest, and IRA distributions. This deduction is particularly valuable for high earners because it reduces income taxed at their top marginal rate. At the 32% bracket plus 5% state tax, $3,000 saves $1,110 annually.
The $3,000 limit has not been adjusted for inflation since it was established in 1978. While it seems small, consistent annual harvesting creates a perpetual tax reduction. Over 20 years at the 32% bracket, the ordinary income deduction alone saves over $22,000 in taxes. Combine this with gain offsetting, and the cumulative savings become substantial.
The best candidates for harvesting are broad market index funds and ETFs because finding similar replacement investments is straightforward. If your S&P 500 index fund is down, sell it and buy a total stock market fund or a large-cap growth fund. Both provide similar market exposure while avoiding the wash sale rule. Our capital gains tax calculator can help you estimate the tax impact of your gains before you start harvesting losses to offset them.
The wash sale rule is the single biggest pitfall in tax-loss harvesting, capable of completely invalidating your tax loss if you purchase a substantially identical security within 30 days before or after the sale. Understanding exactly what triggers a wash sale and how to structure your trades to avoid it is essential for successful tax-loss harvesting.
The wash sale rule applies to purchases made within 30 days before OR 30 days after the loss sale, creating a 61-day window (30 days before, the sale date, and 30 days after). If you sell a stock at a loss on March 15 and buy it back on April 10, the loss is disallowed because the repurchase occurred within 30 days. The rule also applies to substantially identical securities purchased in any of your accounts, including IRAs, spouse's accounts, and accounts you control.
When a wash sale is triggered, the disallowed loss is not permanently lost. It is added to the cost basis of the replacement security, effectively deferring the tax benefit until you eventually sell the replacement without triggering another wash sale. However, this deferral can extend indefinitely if you keep repurchasing within the window.
The IRS has not provided a precise definition of substantially identical, which creates a gray area that investors must navigate carefully. Clear violations include selling and rebuying the exact same stock or fund, selling shares of a fund and buying shares of a different fund that tracks the same index (e.g., Vanguard S&P 500 ETF and iShares S&P 500 ETF), and selling stock and buying call options on the same stock.
Generally safe replacements include selling an S&P 500 fund and buying a total stock market fund, selling a developed international fund and buying an international growth fund, and selling individual stock and buying a sector ETF that includes that stock. Different indexes tracking different benchmarks are typically not considered substantially identical.
A lesser-known aspect of the wash sale rule is that purchases in your IRA or 401(k) can trigger a wash sale on your taxable account. If you sell a stock at a loss in your taxable account and your 401(k) automatically purchases shares of the same company through a regular contribution within 30 days, the loss in your taxable account is disallowed. Worse, since the IRA purchase caused the wash sale, the disallowed loss cannot be added to the IRA's cost basis, meaning the loss is permanently lost.
To avoid this, review your 401(k) and IRA investment selections before harvesting losses in taxable accounts. If your 401(k) holds S&P 500 index funds, do not harvest losses on S&P 500 funds in your taxable account. Instead, harvest losses on investments that are not held in any of your retirement accounts.
The simplest approach is to maintain a predetermined set of swap pairs. For example, always swap between Vanguard Total Stock Market ETF and Schwab U.S. Broad Market ETF, or between iShares Core MSCI EAFE and Vanguard FTSE Developed Markets. These pairs provide very similar returns and market exposure while tracking different underlying indexes. Mark your calendar for 31 days after each swap to remind yourself when you can safely switch back if desired. Use our compound interest calculator to model how reinvesting your tax savings accelerates long-term wealth growth.
Capital loss carryforward is one of the most valuable features of the tax code for investors because it allows unused capital losses to reduce your tax bill indefinitely into the future. After a major market downturn, investors who harvest losses aggressively can build a carryforward balance that provides tax savings for 5, 10, or even 20 years, effectively creating a tax asset that grows more valuable over time.
In any given tax year, capital losses first offset capital gains dollar for dollar. Any remaining losses after offsetting all gains can offset up to $3,000 of ordinary income ($1,500 if married filing separately). Losses beyond that threshold carry forward to the next tax year where the same netting process repeats. There is no time limit on capital loss carryforwards, and they can be used indefinitely until fully consumed.
The carryforward retains its character as short-term or long-term. Short-term losses carried forward remain short-term and are applied first against short-term gains in future years. This is beneficial because short-term gains face higher tax rates, making short-term loss carryforwards more valuable per dollar.
Major market downturns create the best tax-loss harvesting opportunities because many positions show significant unrealized losses. During the 2020 COVID crash, investors who harvested losses in March and reinvested in similar holdings by April locked in substantial losses while participating in the subsequent recovery. Those harvested losses provided tax benefits for years afterward while the replacement investments recovered and appreciated.
Consider a portfolio that drops 30% during a market crash, creating $100,000 in unrealized losses across multiple positions. Harvesting all those losses generates $100,000 in capital loss carryforward. With $15,000 in typical annual capital gains and the $3,000 ordinary income deduction, this carryforward provides approximately $18,000 in annual loss utilization, lasting roughly 5-6 years and saving $3,000-$5,000 annually in taxes.
Capital loss carryforwards are reported on Schedule D of your tax return and carry forward automatically via the Capital Loss Carryover Worksheet. Your tax software or CPA should track the remaining balance and its short-term/long-term composition. If you switch tax preparation methods, ensure the carryforward amounts are correctly transferred to avoid losing this valuable tax asset.
Keep records of all loss harvesting transactions indefinitely. While the IRS typically has a 3-year audit window for returns, the carryforward provisions mean that a loss harvested in 2024 might not be fully utilized until 2035 or later, and the IRS could question the original loss calculation at any point during that period.
Capital loss carryforwards become especially valuable in retirement when you may have significant capital gains from portfolio rebalancing, Required Minimum Distributions from IRAs that you reinvest, and potential Roth conversions. A healthy loss carryforward can offset gains generated during Roth conversions, reducing or eliminating the tax cost of converting Traditional IRA funds to Roth. This strategy pairs well with retirement planning tools like our RMD calculator and capital gains tax calculator to create an integrated tax-efficient retirement income plan.
Selling investments at a loss to offset capital gains and reduce your tax bill. You can immediately reinvest in a similar (but not identical) investment to maintain market exposure.
You can't claim a loss if you buy a 'substantially identical' security within 30 days before or after the sale. Buy a different fund tracking a different index to stay compliant.
Yes. After offsetting gains and deducting $3,000 against ordinary income, excess losses carry forward to future years indefinitely.
You can deduct up to $3,000 per year in net capital losses against ordinary income, or $1,500 if married filing separately. At a 32 percent tax bracket, this saves about $960 annually in federal taxes alone.
Year-end is popular for a final review, but harvesting opportunities exist throughout the year after market dips. Harvesting during sharp declines locks in larger losses while allowing you to reinvest and participate in any recovery.
No. Tax-loss harvesting only works in taxable brokerage accounts. IRAs and 401(k)s are tax-deferred or tax-free, so selling at a loss provides no current tax benefit within those accounts.
Short-term losses first offset short-term gains taxed at ordinary rates up to 37 percent. Long-term losses first offset long-term gains taxed at 0, 15, or 20 percent. Excess losses then cross over to offset the other category.
Choose an investment with similar market exposure but a different underlying index. For example, swap an S&P 500 fund for a total stock market fund, or trade a developed international fund for an international growth fund.
Step 1: Short-term losses offset short-term gains (taxed at ordinary rates up to 37%)
Step 2: Long-term losses offset long-term gains (taxed at 0/15/20%)
Step 3: Excess losses cross-offset remaining gains
Step 4: Up to $3,000 of remaining net losses deduct against ordinary income
Step 5: Unused losses carry forward indefinitely
⚠️ Wash sale rule: Don't buy a"substantially identical" security within 30 days before or after the sale.
Every formula on this page traces to a federal agency, central bank, or peer-reviewed institution. We cite the rule-makers, not secondhand blogs.
Found an error in a formula or source? Report it →
Result: Offset $10K gain from earlier in year + $3K ordinary income = $2,930 tax savings
$15K LT loss: first wipes out $10K in LT gains ($1,500 @15% saved), then $3K offsets ordinary income at 22% ($660 saved), remaining $2K carries forward. Total current-year savings: $2,160 + $660 = $2,820.
Result: Loss allowed, full market exposure preserved
Wash-sale rule (§1091) disallows loss if you repurchase "substantially identical" within 30 days. VTI and ITOT track different indices (CRSP vs S&P Total Market) — generally NOT substantially identical. Safe. Vanguard VOO ↔ VFIAX IS identical.
Result: $5K loss harvested + portfolio rebalanced
Killing two birds with one sale. TLH embedded in normal rebalancing discipline. Best practice: tax-managed rebalancing at year-end.
§1091 covers ALL your accounts including IRA. Selling loss in taxable + buying same in IRA within 30 days disallows loss AND adds to IRA basis. Worst outcome.
Impact: A $10K harvested loss can be entirely disallowed, wasting the planning.
Window is 30 days BEFORE + 30 days AFTER sale (61 days total). Includes automatic reinvestment of dividends.
Impact: Dividend reinvest program auto-creates wash sale you didn't realize — loss disallowed.
Losses are most valuable when offsetting matching-character gains (ST-ST, LT-LT). If no gains, only $3K/yr against ordinary — slow recovery.
Impact: A $30K harvested loss with no gains takes 10 years to fully deduct.
Crypto wash-sale rule doesn't exist YET. Harvest freely. Congressional proposals may change this — watch 2025 legislation.
Impact: Missing the "sell and immediately rebuy" play costs $3K–$30K/yr in foregone harvesting.
Calculations are for educational purposes only. Consult a qualified financial advisor for personalized advice.