Tax-Loss Harvesting Calculator

See exactly how much you save by selling a losing investment to offset gains — and what happens if your losses exceed your gains.

Total tax saved by harvesting

Tax Without Harvesting

Tax With Harvesting

Breakdown

Capital gain
Loss harvested
Net taxable gain
Federal tax rate applied
Federal tax saved
State tax saved

Effective Tax Rate Comparison

WITHOUT HARVESTING
effective rate on gain
WITH HARVESTING
effective rate on gain

How Tax-Loss Harvesting Works

When you sell an investment at a loss, the IRS allows you to use that loss to offset capital gains from other sales. This reduces your taxable income and, with it, your tax bill. You can immediately reinvest the proceeds in a similar (but not substantially identical) investment — maintaining your market exposure while locking in the tax benefit.

Loss offsets gain of the same type first: Short-term losses offset short-term gains; long-term losses offset long-term gains. If one type is exhausted, excess losses can offset the other type. Short-term gains are more valuable to offset because they're taxed at ordinary income rates (up to 37%), while long-term gains are taxed at 0%, 15%, or 20%.

When losses exceed gains: Up to $3,000 of excess losses per year can offset ordinary income (salary, business income). Any remainder carries forward indefinitely to future years.

The wash-sale rule: You cannot buy the same security or a "substantially identical" security within 30 days before or after the sale. To stay invested, switch to a comparable fund — sell VTI (Vanguard Total Market), buy ITOT (iShares Total Market) or SCHB (Schwab Total Market). Different provider, same exposure, no wash-sale issue.

2026 Capital Gains Tax Rates

Filing Status / Income Long-Term Rate Short-Term Rate
Single, up to $47,0250%10%–12%
Single, $47,025–$518,90015%22%–35%
Single, over $518,90020%37%
Married filing jointly, up to $94,0500%10%–12%
Married filing jointly, $94,050–$583,75015%22%–35%
Married filing jointly, over $583,75020%37%

Note: High-income earners may also owe the 3.8% Net Investment Income Tax (NIIT) on investment income above $200,000 single / $250,000 MFJ. State capital gains taxes vary by state. Consult a tax professional for your specific situation.

Frequently Asked Questions

What is tax-loss harvesting?

Tax-loss harvesting is selling an investment at a loss to realize a capital loss that offsets capital gains — reducing your tax bill. You can immediately repurchase a similar (but not identical) investment to maintain market exposure.

What is the wash-sale rule?

The wash-sale rule disallows the loss if you buy the same or "substantially identical" security within 30 days before or after the sale. To harvest a loss while staying invested, switch to a comparable fund from a different provider — e.g., sell VTI, buy ITOT or SCHB.

What happens when losses exceed gains?

Losses beyond your gains can offset up to $3,000 of ordinary income per year. Any remaining loss carries forward indefinitely to future tax years to offset future gains or income.

Does tax-loss harvesting work in an IRA or 401(k)?

No — only in taxable brokerage accounts. In IRAs and 401(k)s, trades don't generate taxable events, so there are no losses to harvest and no immediate tax benefit from selling.

When is the deadline for tax-loss harvesting?

Trades must settle by December 31 of the tax year. With T+1 settlement (standard since May 2024), sell by December 29–30 to be safe. Check with your broker for the exact settlement deadline each December.

Is automated tax-loss harvesting worth it?

Robo-advisors like Betterment and Wealthfront offer automated daily tax-loss harvesting, which can add 0.10%–0.40% in annual after-tax return on larger taxable portfolios. For most self-directed investors, a November–December review is sufficient.

How does gain type affect harvesting value?

Offsetting short-term gains (taxed as ordinary income, up to 37%) is more valuable than offsetting long-term gains (taxed at 0%–20%). Losses first offset the same type of gain, then cross over if one type is exhausted.

Can I harvest losses on mutual funds and individual stocks too?

Yes. Tax-loss harvesting applies to any security in a taxable account sold at a loss — individual stocks, ETFs, and mutual funds. The wash-sale rule applies equally to all.

What is a realistic tax savings from tax-loss harvesting?

On a $20,000 short-term gain for someone in the 22% bracket with $15,000 of losses available, the federal tax savings is approximately $3,300 (22% × $15,000). Add state taxes and the total savings is often $4,000–$5,000.