Long-term capital gains are taxed at 0 % up to a certain level of taxable income. This level is high enough that many retirees and families can realize gains at no federal tax. Gain harvesting means selling an appreciated asset that you have held more than a year while you are in the 0 % bracket, and then, if you wish, buying it back at once. The cost basis goes up to the new price, so you will owe less tax when you sell for good. This calculator shows the room, the gains you can realize at 0 %, and the tax avoided.
How the calculation works
- Room in the 0 % bracket = top of the bracket − your taxable income
- Gains realized at 0 % = the smaller of your planned gains and the room
- Tax avoided = gains realized at 0 % × the rate you would pay later
- Gains above the bracket = planned gains − gains realized at 0 %, taxed at the higher rate
- Gains are added on top of your ordinary taxable income, which is why income decides the room
Example
Your taxable income is $60,000 and the 0 % bracket ends at $96,700, so you have $36,700 of room. You want to realize $30,000 of gains: all of it fits, so $30,000 is taxed at 0 %. If you waited and paid 15 % later, you would pay $4,500. Had you wanted to realize more than the room, the $0 above it would be taxed at 15 %, or $0.
Why it matters
This is a legal way to reset your basis for free. It is especially useful in years of low income, such as early retirement before Social Security and required distributions, or a year with a career break. Unlike a loss harvest, there is no wash sale rule for gains, so you can rebuy the same shares the same day.
Good to know
The extra income can reduce tax credits and deductions and increase the taxable part of Social Security benefits, ACA subsidies or Medicare premiums, so the true cost can be above 0 %. State taxes may still apply. Part of your gain can fall into the 15 % bracket if you cross the limit. The bracket amounts are indexed each year and depend on your filing status. Mutual funds may distribute gains you do not control.
In practice
Run your tax software with the gains added and check for effects on credits and premiums before selling. This tool is educational and is not tax advice.