When an investment in a taxable account is worth less than you paid, selling it realizes a loss that you can use to cut your tax bill. This is tax-loss harvesting. The loss first cancels your capital gains for the year, then up to a limit of ordinary income, and any remainder is carried forward. This calculator shows the tax saved now and the value of the carryforward.
How the calculation works
- Offset against gains = the smaller of the loss and the gains
- Tax saved on gains = offset × long-term capital gains rate
- Remaining loss = loss − offset against gains
- Used on ordinary income = the smaller of the remaining loss and the yearly limit
- Tax saved on ordinary income = that amount × ordinary rate
- Carryforward = what is left, valued at the capital gains rate for later years
Example
You sell a position for a loss of $10,000 while having $4,000 of realized gains. The loss cancels the gains and saves $600 at 15 %. Of the remaining $6,000, $3,000 can offset ordinary income and saves $720 at 24 %. The tax saved this year is $1,320. The last $3,000 carries forward and might save $450 later, for a total benefit of $1,770.
Why it matters
Selling at a loss feels bad, yet the tax value of the loss is real. It matters most in years with big gains to offset, such as after selling a business or a house, and in volatile markets. Harvesting does not remove the loss in the portfolio: it swaps one investment for a similar one and keeps the tax benefit.
Good to know
The wash-sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after. Each sale lowers your cost basis in the replacement, so the tax is deferred, not erased. Trading costs and bid-ask spreads reduce the benefit. This tool is for education and is not tax advice.
Related tools
The capital gains tax calculator finds the tax on a gain, the stock profit calculator tracks a trade, and the Roth conversion calculator is another way to manage taxes.