Tax Loss Harvesting Calculator

Calculate potential tax savings from harvesting investment losses

Educational purposes only. This calculator is for informational purposes and should not be considered financial, tax, or legal advice. Consult a qualified professional for personalized guidance.

Try an example:

Capital Gains & Losses

Long-Term (Held > 1 Year)
$
$
Short-Term (Held < 1 Year)
$
$
%
%
$

Calculate Tax Loss Harvesting Savings

Enter your capital gains, losses, and tax rates to see potential tax savings.

About Tax Loss Harvesting

How It Works

Sell investments at a loss to offset capital gains. Excess losses can offset up to $3,000 of ordinary income per year.

Wash Sale Rule

Cannot repurchase substantially identical securities within 30 days before or after the sale. Consider similar but not identical investments.

How This Tool Works

Tax Loss Harvesting Calculator

Turning Investment Losses into Tax Savings

Tax loss harvesting converts investment disappointments into tax benefits by selling losing positions to realize losses that offset gains. The calculator helps identify harvesting opportunities, quantifies tax savings, and ensures compliance with wash sale rules.

Losses are never welcome, but unrealized losses sitting in your portfolio provide no benefit. Harvesting crystallizes those losses into tax deductions while maintaining market exposure through replacement investments. It's making the best of a bad situation.

Harvest losses before they disappear.

How Tax Loss Harvesting Works

When you sell an investment for less than your purchase price, you realize a capital loss. These losses offset capital gains, potentially reducing tax liability.

Sell stock A at $3,000 loss, sell stock B at $5,000 gain: Net capital gain = $5,000 - $3,000 = $2,000 taxable

Without harvesting, you'd owe tax on the full $5,000 gain.

Tax Savings Calculation

Capital gains tax rates depend on holding period and income. Long-term gains (held over one year) face 0%, 15%, or 20% rates. Short-term gains are taxed as ordinary income.

For someone in the 24% ordinary income bracket and 15% long-term capital gains bracket:

Harvested LossGain OffsetTax Savings
$5,000Long-term gain$750
$5,000Short-term gain$1,200
$5,000Ordinary incomeUp to $1,200

Short-term gain offset provides greater tax benefit per dollar of loss.

Offsetting Hierarchy

Losses offset gains in a specific order: short-term losses first offset short-term gains, then long-term gains. Long-term losses first offset long-term gains, then short-term gains.

Strategic timing of loss recognition can maximize tax benefit by matching loss type to highest-taxed gain type.

Excess Losses

When losses exceed gains, up to $3,000 of excess loss ($1,500 married filing separately) can offset ordinary income annually. Remaining losses carry forward indefinitely.

Large loss years may provide tax benefits for years to come through carryforward.

The Wash Sale Rule

You cannot claim a loss if you purchase "substantially identical" securities within 30 days before or after the sale. This 61-day window (30 days before + sale day + 30 days after) is the wash sale period.

Violating wash sale rules doesn't eliminate the loss—it adds the disallowed loss to the replacement security's basis, deferring rather than eliminating the tax benefit.

Substantially Identical Securities

"Substantially identical" includes the same stock or bond, options on the same security, and potentially very similar securities (though this area has gray zones).

Different securities in the same sector are generally not substantially identical. Selling one S&P 500 index fund and buying a different S&P 500 fund may trigger wash sale rules; selling S&P 500 and buying total market or international funds generally doesn't.

Maintaining Market Exposure

Effective harvesting maintains investment exposure while realizing tax losses. Strategies include:

Replace with similar (not identical) ETF or fund Wait 31 days, then repurchase original position Replace with individual stocks in the same sector

The goal is capturing tax benefit without changing portfolio risk profile.

When to Harvest

Consider harvesting when you have realized gains to offset, positions showing significant unrealized losses, replacement investments can maintain similar exposure, or you're approaching year-end and need to manage tax liability.

The calculator identifies positions with harvestable losses and potential replacements.

Transaction Costs

Harvesting involves trading costs—commissions (if any), bid-ask spreads, and potential market impact. Benefits must exceed these costs.

Modern zero-commission brokerages reduce friction, making smaller harvests more viable.

Long-Term Benefits

Harvesting provides immediate tax reduction. If you eventually sell replacement investments at a gain, you'll owe that tax—but you've had use of the deferred tax money in the meantime.

The time value of tax deferral is real, especially over long periods.

Automated Harvesting

Some robo-advisors and portfolio management services offer automated tax loss harvesting, continuously monitoring for opportunities. For large taxable portfolios, automated services may capture more value than annual manual harvesting.

Using the Calculator

Enter investment positions with cost basis and current value, plus realized gains/losses for the year and your tax brackets.

The calculator shows:

  • Positions with harvestable losses
  • Tax savings from harvesting each position
  • Optimal harvesting strategy based on gains to offset
  • Wash sale period guidance

Model scenarios: Which losses provide most tax benefit? What replacement investments maintain exposure? How much should be harvested this year?

Use results to identify and execute tax-smart harvesting strategies.


Tax loss harvesting transforms paper losses into real tax savings. The calculator identifies harvesting opportunities in your portfolio, quantifies benefits, and helps navigate wash sale rules. Every dollar of tax saved is a dollar that continues compounding in your portfolio. Harvest strategically, and your losses contribute to long-term wealth.