With US stock indexes hitting record highs this year, investors in many mutual funds will be facing big tax bills. That’s because the tax liabilities that funds incur when they sell winning investments are passed along to shareholders in the form of distributions, typically each December. Funds that have had the biggest gains often make the biggest capital distributions—turning fund-shareholder joy into dismay when taxes on those distributions must be paid.

On the bright side, investors whose fund shares are held in retirement accounts do not face immediate tax on fund distributions. And the taxes you pay now will reduce any taxes you might owe when you eventually sell your shares.

Still, the sooner you have to pay taxes on your fund’s gains, the sooner you are deprived of any other use of that money, whether it would be for investing or spending.

What to do: If you want to start investing in a fund or add to an existing position, call the mutual fund company. By November, most funds can provide an estimate of the date and size of an upcoming distribution, if any. If the distribution is substantial, wait to make any new share purchases until after that date. Also, try to reduce the overall amount of taxes you owe on distributions this year by tax-loss harvesting. Decide whether there are any losing investments that you might want to sell, and use those capital losses to offset capital gains on your tax return.

Five funds among many that are likely to hit investors with big distributions in 2016: Baron Growth (BGRFX)…Columbia Acorn USA (AUSAX)…Gabelli Asset AAA (GABAX)…Royce Premier (RYPRX)…Selected American Shares (SLADX).