Wash sale

This page summarizes the issue of wash sales for mutual fund and ETF investors, but IRS Publication 550 remains the definitive reference. Fairmark guide to wash sales is also an excellent source of information. Wash sales are particularly relevant for investors who are tax loss harvesting.

General description
If you sell a mutual fund or stock for less than the purchase price, you have a capital loss, and you can usually report this as a loss and subtract it from your income. However, if you sold the shares and then bought them right back, or bought new shares and then immediately sold the old shares, the IRS will rule that you did not really sell them, and will not allow you to deduct the loss at that time.

IRS definition
Here is the official definition from IRS Publication 550, Investment Income and Expenses :

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:

If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale.
 * 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.

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.

Consequences
If you have a wash sale, you do not deduct the loss immediately, but you add the loss to your basis in the new shares, so that you can deduct the loss when you sell those shares. It is still better to take the loss earlier, as it produces an immediate benefit; in addition, a wash sale negates the value of tax loss harvesting.

For example, you bought 100 shares of a mutual fund at $40. On March 1, you sold 100 shares at $30. On March 10, you bought 100 shares at $35. Your sale on March 1 was a wash sale, so you could not deduct the $1,000 loss at the time, but your basis in the March 10 shares is $4,500, not $3,500, so you will reduce your capital gains or increase your losses when you sell those shares.

If you have a wash sale and the replacement shares are a tax-sheltered account such as an IRA, Roth IRA, or 401(k), you will lose all benefit from the capital loss, because you do not pay tax on capital gains in the the tax-sheltered account.

How to avoid wash sales
You can avoid a wash sale by avoiding either criterion: either make sure that you buy any replacement shares at least 31 days before or after the sale, or buy replacement shares that are not substantially identical.

30-day limit
To avoid the 30-day limit, do not reinvest dividends or capital gains in your taxable funds. Otherwise, the reinvestment will cause a wash sale (for at least the shares bought with the reinvestment) if you sell the fund at a loss within 30 days of the distribution; this will affect a sale for eight months of the year if the fund pays dividends quarterly, and at all times if the fund pays dividends monthly. (If you use Specific identification of shares, you can avoid the effect of a wash sale on a reinvestment in the last 30 days by selling those shares; even if your brokerage says that you have a wash sale, you get back the loss because you sold the replacement shares at the same time.)

If you are tax loss harvesting, you need to wait at least 31 days before buying the fund back. For those 31 days, put the money in a money market or in a similar fund that is not substantially identical.

If you hold the same fund in your IRA or 401(k) as in your taxable account, make sure that there are no recent contributions to that fund if you might want to sell your taxable fund at a loss. Direct distributions in the IRA or 401(k) to a different fund in the same account. In a 401(k) in which contributions are made from every paycheck, direct your new contributions to a different fund as well.

Substantially identical
The IRS does not have a clear definition of substantially identical; it is determined by all the facts and circumstances in a particular case. Two share classes of the same fund, such as a mutual fund and a corresponding ETF, are probably substantially identical. There is no ruling on whether two funds operated by different companies tracking the same index are substantially identical; tax experts have differing opinions. Two funds tracking different indexes, or an index fund and an actively managed fund in the same asset class, should not be substantially identical, though there is no definitive IRS ruling.

Therefore, when tax loss harvesting, if you do not put the proceeds of your sale in a money market fund for the 31-day waiting period, you will need to find a similar fund that does not qualify as substantially identical. It's important to switch into a fund that you are comfortable holding. If the market goes up after you tax loss harvest, you should plan to hold the new fund for a year in order to get the less costly long term capital gains tax treatment on your sale.

You can also reduce the risk of wash sales with your IRA or 401(k) by not holding substantially identical funds there and in your taxable account; if you have an S&P 500 index in your 401(k), you can hold Vanguard Total Stock Market or Vanguard Large Cap Index instead of Vanguard 500 Index Fund in your taxable account.

Fund alternatives
The Vanguard Total Stock Market and Vanguard Large Cap Index track different indexes, but the returns are similar, and as such, they are good alternatives for domestic holdings. Vanguard Total International Stock Market and Vanguard FTSE All World Ex-US also have similar performance while tracking different indexes. If you hold ETFs, iShares Dow Jones U.S. Index (IYY) is a good substitute for Vanguard Total Stock Market ETF (VTI), and SPDR MSCI ACWI ex-US (CWI) is a good substitute for Vanguard FTSE All-World ex-US ETF (VEU). Non-Vanguard ETFs have higher expense ratios and track different indexes than Vanguard ETFs, but their performance should be nearly identical to their Vanguard equivalents. There are bid/ask spreads and commissions associated with buying and selling ETFs, and those costs have to be considered when deciding on your short-term replacement holding.

Tax Exempt Funds
Although not a wash sale, there is a special rule for tax exempt funds that have been held less than 6 months and which have distributed dividends, which acts like a wash sale, but can actually be more punitive: Fine points about tax loss harvesting.