In the last 6 months, the stock markets bounced around – a lot. Interest rates. Trade wars. Congressional investigations. A lot going on! It can make you queasy when the S&P 500 gyrates so much.
As a sensible investor, you know you shouldn’t sell in a panic when things drop, especially if you’re well-diversified in index funds (you are, aren’t you?). (In fact, you might consider buying opportunistically whenever the market drops 10%+ from its recent high.)
But no matter what, it can be nerve-wracking to see your nest egg take a 10-20% beating over mere weeks. Yet when this happens, there’s also great opportunities to lower your taxes by tax loss harvesting and tax gain harvesting.
These are powerful tools, so let’s walk through how to do it.
What is Tax Loss Harvesting? Why do tax loss harvesting?
Tax loss harvesting is a way to postpone taxes and potentially even eliminate them by selling an investment that’s decreased in value and then (usually) buying a similar investment, thereby allowing you to take a “paper loss” but not an actual loss.
It’s not an actual loss because you remain fully invested with no change to your asset allocation.
You sold something that dropped in value and bought something similar that also dropped in value. You are not out of the market for one minute. You’re just lowering your cost basis and deducting the loss against your current income.
When is a good time to do tax loss harvesting?
A good time to tax loss harvest is when stock market whiplash causes your asset allocation to twist out of balance. You can use this opportunity to book paper losses and rebalance back to your target allocation at the same time. (You should rebalance annually anyway.)
You don’t have to buy a similar investment. You can invest in something totally different. You can also choose to hold the cash for 31 days and then re-buy the thing you sold, but of course there’s always a risk the market rebounds quickly locking you into an actual loss. The only thing you can’t do is buy a “substantially identical” investment within 31 days, or else you’ll forfeit the tax benefit.
How much does tax loss harvesting save?
You use the harvested paper loss to first offset capital gains realized in the same year, then ordinary income. You can offset $3k ordinary income per year (not indexed for inflation unfort). This is worth ~$1100 annually if you’re in the top tax bracket, more when factoring state taxes. Anything leftover gets carried to subsequent years (no limit).
Is automatic tax loss harvesting worth using a robo advisor? Do robo advisors’ tax loss harvesting benefits outweigh their fees?
What is Tax Gain Harvesting?
Tax gain harvesting is where you sell assets that have increased in value, then re-buy them again. This increases your basis while keeping you fully invested, so that when you later sell for real, there is less capital gain to tax. With the higher basis, it’s also easier to harvest more tax losses in the future.
In tax years where you fall in the 0% bracket for capital gains tax rates (in 2019, this means taxable income of $78,750 for married filing joint), you simply harvest gains until they “top up” your 0% bracket. At a minimum, you can harvest $102,750 per year, married filing joint: $24k standard deduction + $78,750 = 0% capital gains taxes. More if you itemize. (Note: you technically DO pay taxes, but 0% of anything = $0.)
This applies to long-term capital gains only which enjoy these preferential rates, not short-term capital gains which are taxed at ordinary rates.
There are no wash sale problems with gain harvesting (explained below) because wash sales only apply to losses.
You might find yourself in the 0% bracket if you take a sabbatical, retire early, etc. If you remember nothing else, at least remember this: never let a “0% year” go to waste!
How does tax loss harvesting work?
1. Loss and gain harvesting only works in taxable accounts. It does not work in tax-deferred (401k, 403b) or tax-free (Roth, HSA) accounts. In those, you are either taxed the full amount at ordinary rates upon withdrawal or not at all.
2. Use specific identification of shares. For optimal results, use specific identification of shares to cherry pick which shares to sell. Don’t use average cost basis or FIFO. Specific identification lets you control precisely the loss/gain, whereas average cost basis spreads it out evenly. FIFO is even worse because it minimizes your loss potential since your oldest shares are least likely to be down. With loss harvesting, you want to cherry pick and sell your most expensive shares to capture the biggest loss possible.
3. Tax loss harvest using index funds and ETFs, not individual stocks. With funds and ETFs, it’s easy to find a similar but non-identical replacement. With individual stocks, it’s harder to find comparable replacements. If you swap Google for Facebook stock, Exxon Mobil/Chevron, Walmart/Target, or Coke/Pepsi, each company operates differently and won’t be as correlated as you think. With funds/ETFs, these differences get smoothed out. Note: since this is all for avoiding wash sales, it doesn’t impact gain harvesting as wash sales don’t apply to gains.
4. How much taxes you save depends on whether you held the asset for at least 1 year. You can have tax losses that are both short-term (held <1 year) or long-term (held >=1 year. For long-term capital losses, the loss is applied first against long-term gains, then short-term gains, and finally up to $3k can be offset against ordinary income before you have to carry forward. For short-term capital losses, the loss is applied first to short-term gains, then long-term gains, then $3k ordinary income and carry forward. The $3k is not indexed for inflation. Likewise, long-term gain harvesting can take advantage of the 0% long-term tax rate when taxable income does not exceed $78,750 MFJ. However, short-term gains don’t get this benefit; they’re tax-free (usually) only up to the standard deduction, or $24k MFJ.
5. The $3k ordinary income allowance is great for arbitrage. That’s because it’s applied against your marginal rate, which is significantly higher than your long-term capital gains rate if you’re a high earner: 35-37% vs. 15-20%. Even though the $3k is not indexed for inflation, it’s still >$1k tax relief per year. It’s especially valuable when you have no capital gains for the year, only ordinary income.
6. With loss harvesting, you are technically only deferring taxes…but your tax rate may decline in the future. Since tax loss harvesting requires lowering your basis, you’ll pay more taxes in the future when the asset appreciates. But your future tax rate (i.e. in retirement) could be lower. That means saving on high taxes now to pay low taxes later: (a) the $3k against ordinary income offsets your marginal rate vs. your capital gains rate (arbitrage), and (b) when you’re retired, you might have a 0% cap gains rate and your ordinary income might be less than the standard deduction. You could pay no taxes at all. Sounds like a deal?
7. You may eliminate taxes entirely. First, when you tax gain harvest at a 0% capital gains rate, it’s a free basis step up. Second, if you donate your stock to charity, specifically the shares with the lowest basis / highest gain, you take a charitable deduction on the full amount. Finally, if you die without selling, your heirs get an automatic step up in basis to fair market value, wiping out your tax liability.
A key challenge of tax loss harvesting is avoiding a wash sale. You have a wash sale when the IRS determines the replacement asset is “substantially identical” to the original asset. If you buy a substantially identical asset within 30 days before or after the tax loss harvest (61 days total including day of sale), you can’t claim/deduct the tax loss. Wash sales only apply to tax loss harvesting, not tax gain harvesting.
1. Replacement cannot be substantially identical. The IRS has not officially defined substantially identical, but convention interprets it as “pretty much the same asset.” Examples:
If you sell one class of stock and buy a different class of stock in the same company, it is substantially identical because it’s the same company. Hence you can’t sell Google Class A stock and turn right around and buy Google Class C stock.
If you sell a mutual fund and then buy its ETF equivalent, that is substantially identical because it’s the same asset, just different packaging.
Likewise, if you buy Schwab’s SWTSX total stock market fund right after selling Fidelity’s FSTVX total stock market fund, that is substantially identical because they both track the same Dow Jones Total US Stock Market Index, despite being offered by different brokerages.
By contrast, a fund tracking a different index is, according to convention, different enough. So, if I sell Vanguard’s VFINX 500 Index Investor fund and buy Vanguard’s VTI Total Stock Market ETF, that is NOT substantially identical. One is a mutual fund, the other an ETF. One tracks the S&P 500, the other the CRSP US Total Market Index. One has 515 holdings, the other 3,481 holdings. I have a good argument these are not substantially identical. Yet they are still highly correlated:
The key is to find a replacement highly correlated with the original investment but not substantially identical. This keeps you fully invested with the same asset allocation. Funds tracking different indexes are not generally considered identical even if highly correlated.
For index funds, here are some likely acceptable replacements:
- Total Stock Market vs. S&P 500 vs. Large Cap Index (e.g., VTSAX/VFIAX/VLCAX)
- Total International vs. All-World Ex-US vs. Developed Market (e.g., VTIAX/VFWAX)
- Small Cap Index vs. Mid Cap Index vs. Extended Market (e.g., VSMVX/VRTVX)
All these funds have ETF counterparts, too.
Note: a good replacement is not just not identical, but ideally something you’re comfortable holding for a long while. If you’re just going to dump it after 30 days and then trade back into the original investment, you’ll incur transaction costs, potential market movements, short-term tax consequences, etc.
That said, it can be a good idea to have a list of 2-3 replacements per asset class, especially if the market is dropping rapidly. Since you don’t know if/when a rebound might occur, you might choose to cautiously harvest multiple times on the way down vs. wait for things to bottom out and then do one big harvest. Trying to time things like that can bite you.
2. You can wait 31 days…but it’s risky. You don’t have to buy a replacement asset. You can buy something totally different or just wait 31 days, then re-buy your original investment. The latter is risky because there may be a quick rebound during those 31 days. The former requires changing your asset allocation which you may not intend.
3. Watch for inadvertent wash sales. It’s easy to screw up and inadvertently do a wash sale. A common mistake is to buy the original investment in a tax-deferred or tax-free account while selling in a taxable account. This is very bad because you will lose the tax loss permanently, whereas with other types of wash sales you only temporarily lose it until you resell the asset.
Another common mistake: automatic dividend reinvestments or automatic recurring investments (e.g. paycheck deduction) in the asset. Avoid this by turning off automatic/recurring investments in the asset you’re claiming a tax loss on. Turn it off in ALL accounts, not just the one you’re selling from. Instead, set a quarterly calendar reminder to manually re-invest, and don’t re-invest in any asset recently harvested.
Finally, if your spouse buys a substantially identical asset within 30 days of your tax loss harvest, it triggers a wash sale. Doesn’t matter if your finances are separate or combined; the IRS considers it all combined. Coordinate with hubby/wifey accordingly.
4. If you accidentally have a wash sale, don’t panic. First, if it’s because you re-invested dividends, the amount re-invested is probably smaller than the amount sold. So this would be a partial wash sale, and only the amount re-invested is disallowed as a loss. If you tax loss harvested 100 shares then automatically re-invested dividends in 10 shares, you can still claim a loss on 90 shares.
Second, even if you have a total wash sale (unless you did it in a tax-advantaged account as noted above), you can still claim a loss, just not right away. Instead, what happens is the disallowed amount gets added back to the basis of the repurchased asset, and the loss can be claimed when you eventually sell it. For example, if you buy 1000 shares of LossCo for $10k, and then sell for $4k but within 30 days repurchase the 1000 shares for $5k, you have a wash sale and cannot claim the $6k loss; instead, you must add the disallowed loss amount to the basis of the repurchased shares, so your basis becomes $11k, which is the $5k paid + $6k loss.
5. Other tidbits. First, if you buy an asset first and then later sell within 30 days, do you have a wash sale? If you sell ALL the shares, then no. This is because the shares you bought were not replacement shares, as is required for a wash sale – they were in fact the shares you sold. By contrast, if you bought two different lots and then sold one of them, you’d trigger a wash sale. But if you buy and then sell ALL shares within 30 days, no wash sale: that’s just a short-term capital loss.
Second, some brokerages like Vanguard will block you from buying back a fund within 30 days of selling. They do this to enforce their frequent trading policy. This is good for you, because you don’t want to accidentally trigger a wash sale, and brokerages like Vanguard are sort of protecting you from that with this policy.
What is the best tax loss harvesting / tax gain harvesting strategy?
The best strategy for harvesting efficiently is:
- When is tax loss harvesting worth it? When your overall portfolio is down by more than, say, $1-2k, start harvesting. Think of it like “saving up” losses in a piggy bank. The piggy bank helps you offset $3k ordinary income per year, a nice arbitrage if you’re in a high bracket. Use specific identification of shares. Don’t try to wait for your losses to get too big, because you could miss the opportunity entirely if the market quickly bounces back. You can always harvest again if the stock keeps dropping (though you will need a new/different replacement asset).
- When is tax gain harvesting worth it? For harvesting gains, whenever you have a 0% capital gains tax bracket year (e.g., sabbatical, between jobs, back to school, early retirement), aggressively “top up” your 0% bracket by harvesting gains and methodically stepping your basis up; there will be no actual taxes paid at 0%.
- Leverage charitable giving. Whenever you donate to charity, consider donating investments. Specifically, the ones with the lowest basis/highest gain. You can deduct the entire amount, and neither you nor charity will pay capital gains taxes.
- Leverage estate planning. When doing estate planning, allocate your lowest basis/highest gain investments to pass on to your heirs; you won’t pay capital gains taxes and your heirs get an automatic step up in basis to fair market value.
Now let’s do it step by step
Tax loss harvest:
- Throughout the year, monitor when your investments are trading at a loss; disable recurring/automatic investments from all your accounts, both taxable and tax-advantaged. Do the same for your spouse.
- When you are ready to harvest, log into your taxable brokerage account
- Determine which specific lots of shares are trading at a loss
- Identify a target replacement asset: similar/correlated but not “substantially identical”
- Once the loss exceeds your threshold, say, $1-2k, execute the sale using specific identification of shares
- Invest the proceeds in your chosen replacement asset
- Wait to receive form 1099-B from your brokerage with an accounting of your harvested losses for the year
- When you file your tax return, claim those losses against corresponding capital gains first, then up to $3k ordinary income
- Carry surplus losses to future years, rinse and repeat
Tax gain harvesting:
- In late December each year, forecast whether you will be in the 0% LT capital gains bracket for that year
- Estimate how many dollars you can continue to earn through 12/31 before you are bumped out of the 0% LTCG bracket; that is how much long-term gain you can harvest
- Before 1/1, log into your taxable brokerage account
- Using specific identification of shares, find investments to harvest whose capital gains “top up” your 0% bracket
- Execute the sale, then immediately buy back the original investment
- No wash sale because wash sales don’t apply to gain harvesting
- Your brokerage firm will note your new (higher) basis
- Wait for your 1099-B to arrive
- When you file your tax return, calculate your tax burden on the sale; if you executed correctly it will be $0
Discussion: Do you tax loss harvest regularly? What tips and techniques have you found helpful that are not covered here? Leave a comment below!