As we approach the end of 2018, it’s a good idea to review the mutual fund holdings in your taxable accounts and take steps to avoid potential tax traps. Here are some tips.

Avoid surprise capital gains

Unlike with stocks, you can’t avoid capital gains on mutual funds simply by holding on to the shares. Near the end of the year, funds typically distribute all or most of their net realized capital gains to investors. If you hold mutual funds in taxable accounts, these gains will be taxable to you regardless of whether you receive them in cash or reinvest them in the fund.

For each fund, find out how large these distributions will be and get a breakdown of long-term vs. short-term gains. If the tax impact will be significant, consider strategies to offset the gain. For example, you could sell other investments at a loss.

Buyer beware

Avoid buying into a mutual fund shortly before it distributes capital gains and dividends for the year. There’s a common misconception that investing in a mutual fund just before the ex-dividend date (the date by which you must own shares to qualify for a distribution) is like getting free money.

In reality, the value of your shares is immediately reduced by the amount of the distribution. So you’ll owe taxes on the gain without actually making a profit.

Seller beware

If you plan to sell mutual fund shares that have appreciated in value, consider waiting until just after year end so you can defer the gain until 2019 — unless you expect to be subject to a higher rate next year. In that scenario, you’d likely be better off recognizing the gain and paying the tax this year.

When you do sell shares, keep in mind that, if you bought them over time, each block will have a different holding period and cost basis. To reduce your tax liability, it’s possible to select shares for sale that have higher cost bases and longer holding periods, thereby minimizing your gain (or maximizing your loss) and avoiding higher-taxed short-term gains.