Most mutual fund investors have witnessed their portfolios underperform the broader market, and to add insult to injury, many will have to pay for a capital gains distribution. Instead, people should consider switching over to exchange traded funds, which are lauded for their tax efficiency.

As we head toward the end of the year, investors may be thinking about shifting assets around to rebalance or restructure their portfolios. However, if you are planning to put money into a mutual fund in a taxable account before the year-end, you could be stuck with paying unforeseen taxes.

Since most mutual funds distribute income to shareholders each year through interest, dividends and capital gains at year-end, someone who bought the fund before the ex-dividend date will receive the payout and pay the tax attributed to the gains, reports Shelly Schwartz for CNBC.

Consequently, if an investor were planning on switching around an investment portfolio before the end of the year with a mutual fund, you could experience an effective loss since the net asset value of the fund is diminished by the same amount as the dividend on the ex-dividend date, depending on type of distribution and amount invested.

Mutual fund investors will likely find a lump of coal in their stockings at the end of the year as mutual fund companies are busy issuing capital gains distributions. For instance, the Growth Fund of America (AGTHX), one of the largest mutual funds on the market with $145.6 billion in assets under management, is expected to issue a year-end distribution on long-term capital gains of 9% to 12%, reports Matt Lenor for Personal Capital.

The high tax hit will be especially unwelcome in a year where most active funds have underperformed the broader equities market. According to S&P Capital IQ Fund Research, 80% of running large-cap mutual funds have underperformed the S&P 500 in 2014. Year-to-date, AGTHX has increased 10.3%, whereas the S&P 500 index rose 14.0%. [Why Active Funds Are Underperforming Index ETFs]

While index-based ETFs are not perfectly exempt from capital gains issues, the structure has a large advantage. Specifically, ETFs benefit from “in-kind” redemptions – swap securities for securities, whereas mutual funds typically redeem shares by selling securities, which trigger a taxable event. With many active mutual funds underperforming this year, investors would have been pulling out the products, which would have forced many active funds to sell off securities to meet the redemptions as well.

For more information on funds, visit our mutual funds category.

Max Chen contributed to this article.