Tax-Loss Harvesting Calculator

Calculate how much you can save by selling investments at a loss to offset capital gains. See your tax savings, ordinary income offset, and loss carryforward — all calculated privately in your browser.

Your marginal federal income tax rate on ordinary income
Gains from assets held 1 year or less
Gains from assets held more than 1 year
Losses from selling assets held 1 year or less
Losses from selling assets held more than 1 year
Ad Space

How Tax-Loss Harvesting Works

Tax-loss harvesting is a strategy where you sell investments at a loss to offset capital gains and reduce your tax bill. Under IRS rules, capital losses first offset gains of the same type — short-term losses offset short-term gains, and long-term losses offset long-term gains. Any remaining losses then cross over to offset the other type. If net losses exceed total gains, up to $3,000 ($1,500 for married filing separately) can be deducted against ordinary income like wages and salary. Excess losses beyond that carry forward to future tax years indefinitely.

This calculator shows exactly how much you can save by harvesting losses across your portfolio. Enter your short-term and long-term gains and losses to see the dollar-for-dollar tax reduction, ordinary income offset, and any carryforward amount for future years.

Tax-Loss Harvesting Rules and Limits

The IRS requires losses to offset gains in a specific order. Short-term losses first reduce short-term gains, which are taxed at your ordinary income rate (10% to 37%). Long-term losses first reduce long-term gains, taxed at the preferential 0%, 15%, or 20% rate. After same-type netting, remaining losses cross over. This ordering matters because short-term losses offsetting short-term gains save more per dollar than long-term losses offsetting long-term gains.

The $3,000 annual deduction limit against ordinary income ($1,500 for married filing separately) applies only to net capital losses that exceed total capital gains. Based on 2026 IRS rules, any unused losses carry forward indefinitely and retain their character as short-term or long-term. There is no expiration on capital loss carryforwards, making tax-loss harvesting valuable even in years when you have no gains to offset.

Wash Sale Rule Explained

The wash sale rule prevents you from claiming a tax loss if you purchase a "substantially identical" security within 30 days before or after the sale. This 61-day window (30 days before, the sale date, and 30 days after) applies across all your accounts, including IRAs. If triggered, the disallowed loss is added to the cost basis of the replacement shares, deferring rather than eliminating the tax benefit.

To harvest losses while staying invested, you can replace the sold security with a similar but not identical investment. For example, selling an S&P 500 index fund and buying a total stock market fund maintains similar market exposure without triggering the wash sale rule. The IRS has not defined "substantially identical" precisely for ETFs tracking different indexes, giving investors some flexibility in choosing replacement securities.

When Tax-Loss Harvesting Saves the Most

Tax-loss harvesting delivers the greatest savings when you have large short-term capital gains and are in a high tax bracket. A taxpayer in the 37% bracket who offsets $50,000 in short-term gains saves $18,500 in federal tax alone. The strategy is also valuable during market downturns when unrealized losses are widespread — a bear market is an opportunity to lock in losses for future tax benefits. Year-end is the most common time to harvest, but monitoring throughout the year captures more opportunities and avoids the December rush that can affect market prices.