What Is Tax Loss Harvesting?

Tax Loss Harvesting (TLH) is when you sell shares at a loss in a taxable (non retirement) account to get a tax deduction. The government allows you to deduct up to $3000 of your losses each year against your income (for single, Married Filing Jointly (MFJ), or Head of Household (HOH)), and $1500 for Married Filing Separately (MFS)[1]. Any losses in excess of $3000 are carried forward indefinitely until either you use up all your losses [2] or you die. I didn't feel like confirming this but I believe in the case of your death, your losses can be used on your file tax return (but still limited to $3000), but they can't be used by your estate.

What's the Benefit of TLH?

The best case scenario for TLH is tax rate arbitrage and an interest free loan.

The Interest Free Loan

Suppose Bob sells 1000 shares of VTSAX at $45/share in July of this year. He had bought these shares just a month prior at $48/share, so he has a loss of $3000. After 30 days, lets assume for simplicity that the price had stayed the same, so he buys 1000 shares of VTSAX at $45/share. Bob is in the 22% tax bracket. He has no other capital gains or losses this year, so his $3000 loss gets deducted from his income, saving him $660 in taxes this year. He takes this $660 and invests it again in VTSAX. For simplicity, assume that it's still at $45/share, so he buys another 14.667 shares.

But ten months later (so it's the next calendar year), Bob decides he wants to buy a real estate property. Assume now that VTSAX has risen to $50/share. He sells his 1014.667 shares of VTSAX for $50733.35. He now has a gain of $5/share, or $5073.34. He is still in the 22% tax bracket, and pays $1116.13 in taxes. This leaves him with $49617.22 after taxes.

Suppose Bob hadn't sold his shares at a loss last year. What would he owe in taxes? Well he would have sold 1000 shares (remember, the extra 14.667 shares only came from the TLH) of VTSAX for $50000. He bought the shares at $48/share, so he'd have a gain of $2/share, or $2000. He's in the 22% tax bracket, so he pays $440 in taxes, leaving him with $49560.

Notice how Bob has slightly more money - $57.22 - in the first scenario where he TLH'd. Where did this come from? The growth of those 14.667 shares. They grew $5*14.677 = $73.34. After 22% in taxes, that's $57.20 (there's some rounding error).

This is what I meant by an interest free loan. By TLHing you do lower the cost basis, so you end up reporting a larger gain later. However, you get money today with which you can invest.

Tax Rate Arbitrage

I'm sure a gain of a mere $57.20 wasn't that impressive. One reason it was low is we were only talking about a 6.25% drop. Some people do TLH over small drops like this, but the results are a lot more impressive if a) you TLH a much larger drop, like in 2008-2009, or b) your future sale is at a lower tax rate.

Imagine the same scenario as before, except that Bob sells his shares 10 years in the future, when he's retired. Now that he's retired, his tax rate isn't 22% anymore. Firstly, he's in the 12% tax bracket. Secondly, his sale of shares is now a long term capital gain, meaning they're taxed at lower rates - in this case, at 0%. By doing so, he not only pockets the growth on the extra 14.667 shares, but doesn't end up paying back the $660 used to buy those shares.

Wash Sale

From IRS Publication 550

You cannot deduct losses from sales or trades of stock or securities in a wash sale unless the loss was incurred in the ordinary course of your business as a dealer in stock or securities.
A wash sale occurs when you sell or trade stock or securities at a loss and within 30 days before or after the sale you:

  1. Buy substantially identical stock or securities,
  2. Acquire substantially identical stock or securities in a fully taxable trade,
  3. Acquire a contract or option to buy substantially identical stock or securities, or
  4. Acquire substantially identical stock for your individual retirement account (IRA) or Roth IRA.

[Emphasis added]

This 30 day rule is in place so you can't just sell the shares, buy them back in the same/next day, and get a tax deduction.

Purchases in a Retirement Account Also Cause Wash Sales

This was already partially covered in (4) of the previously quoted text, but it technically didn't address workplace retirement plans like 401(k)s, 403(b)s, 457(b)s, and 401(a)s. Unfortunately, experts generally agree that if you read IRS Revenue Ruling 2008-5, the same reasoning that caused purchases of securities in IRAs to wash sales of securities in a taxable account could be applied to workplace retirement accounts as well.

Substantially Identical is Not Defined Anywhere

Neither the US tax code, tax courts, nor IRS rulings have ever defined substantially identical. Many people, myself included, would say that funds that track the same indices are substantially identical, but funds that track different indices are not. So selling VTSAX, which tracks the CRSP US stock market index, and buying VFINX, which tracks the S&P 500 index, would be valid under that interpretation of substantially identical.

Spouses Can Also Cause Wash Sales

From IRS publication 550:

If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale.

Wash Sales can be From Any Account

Nowhere in the tax code does it say that only purchases within the same brokerage account can cause wash sales. Any purchase of substantially identical securities in any account you own can cause a wash sale.

Wash Sales Are Not Actually All That Bad, Usually

If you have a wash sale, it actually just delays the TLH benefit, unless the shares you bought that caused the washed sale were in a retirement account. Per IRS Publication 550

If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities (except in (4) above). The result is your basis in the new stock or securities. This adjustment postpones the loss deduction until the disposition of the new stock or securities. Your holding period for the new stock or securities includes the holding period of the stock or securities sold.

Suppose in 2018 you sold, at $30/share, 10 shares of VTSAX that you had bought at $50/share, for a loss of $2000. Then three days later, you buy 10 shares of VTSAX at $30/share (yeah, VTSAX is super volatile in this example). Your total cost basis would normally be 10*$30=$3000. However, because of your disallowed loss of $2000, you add the $2000 to your basis, making your basis $5000 or $50/share.
Then in 2022 you sell your VTSAX at $60/share. If you didn't have the wash sale, you'd have a capital gain of $3000. However, because of your wash sale, you now only have a capital gain of $1000.

Therefore, instead of being able to take the tax deduction in 2018, when you originally sold your shares of VTSAX, you pay less in taxes in 2022 because you have a lower capital gain.

Hence, a wash sale isn't all that bad. It delays your benefit, though you've paid an opportunity cost (i.e. money today is more valuable than money tomorrow).

The exception is that "except in (4)" clause. That (4) is the same (4) in the first quote of this post: that purchases in an IRA cause a wash sale. If in the example you'd sold shares of VTSAX at a loss from your taxable account, and then bought shares of VTSAX in your retirement account, you can't add the disallowed loss to the basis of the IRA. IRAs don't even have a basis.[3]

Automatic Dividend Reinvestment can Cause Wash Sales, But Its Effects Can Be Avoided

Because you must avoid purchasing substantially identical shares both 30 days after and 30 days before selling shares for a loss, you can run into a situation where the automatic dividend reinvestment will cause a wash sale.

Suppose on September 15th you received a dividend. Because of automatic reinvestment, you end up purchasing shares of VTSAX. But VTSAX drops substantially by September 30th, at which point you wish to sell your shares to TLH. However, the automatic dividend reinvestment that occurred on September 15th will cause a wash sale if you choose to sell your VTSAX anytime between August 31st and October 30th.

Fortunately, so long as you sell the reinvested dividends, in reality the effects of the wash sale are moot. Why? Because per the last section, when you wash a sale, you add the disallowed loss to the purchased shares that caused the wash. So if you sell your shares within 30 days of reinvesting dividends, you'll wash the sale, and then add the disallowed basis to the reinvested dividends...which you're already selling. Your recorded losses will look different in terms of the loss per lot, but the total losses recorded will remain the same.

Personally I still do not enable automatic dividend reinvestment because washing the sale results in extra tax forms that have to be filed[4], and I can redirect dividends to other funds if my portfolio is out of balance. I have the dividends transferred to the money market fund, and every month when I make new contributions, I sweep that cash into the appropriate fund.

Beware If You Use Betterment or a Similar Service

As I stated earlier, purchases of securities in a retirement account can wash the sales of shares in a taxable account. If you use Betterment, a service that does automated tax loss harvesting for you, but don't pay attention to which funds you're buying in your workplace 401k or other retirement accounts, you can end up buying funds that are substantially identical to the funds that Betterment is using for TLH. To avoid this, you can buy funds in the retirement account that track different indices from the funds that Betterment uses.[5]

  1. IRS Publication 550 ↩︎

  2. IRS Publication 550 ↩︎

  3. Actually, non deductible contributions to a traditional IRA do give that IRA a basis, but even if you had purchased shares in a tIRA with nondeductible contributions in it, they're still not allowing you to add the disallowed to that basis, so it's moot. ↩︎

  4. If you have no washed sales and only sell covered shares, you only have to file schedule D. If you have a wash sale you must also file Form 8949 ↩︎

  5. Assuming that "substantially identical" does not mean funds that track similar but different indices. ↩︎