Beware of the year-end mutual fund tax blowup

Mutual fund investors, proceed with caution.

If you're planning to purchase a fund in your taxable account between now and the end of the year, you could get stuck paying taxes on gains you didn't earn.

How's that? Mutual funds are required to distribute their income to shareholders each year in the form of interest, dividends and capital gains. Most do so at year-end, by Dec. 31.

Those distributions are subject to taxes even if you reinvest them in more fund shares.

Mutual Funds stock certificates
Kord.com | age fotostock | Getty Images

Each mutual fund selects a specific so-called "record" date on which all current shareholders will be eligible for their annual distribution.

The stock exchange then uses that record date to set the ex-dividend date on which the security trades without its dividend, normally two business days before the record date.

Anyone who owns shares before the ex-dividend date is entitled to the payout and must pay the tax associated with that gain.

Distributions are normally viewed as a positive, especially for income-seeking investors.

Read More6 ways to lower your tax bite

But those who buy in just before the fund pays out experience an effective loss, since the net asset value of the fund gets reduced by the same amount as the dividend on the ex-dividend date.

"The price of the stock is reduced by the price of the dividend," said Allan Katz, a certified financial planner with Comprehensive Wealth Management Group.

Thus, from an investment standpoint it's a wash, he said, but Uncle Sam still requires you to pay taxes on the fund's distribution.

Who's taxed on what

How much you'll owe in taxes depends on the type of distribution you receive and the amount you invested.

Ordinary dividends and interest are taxed as ordinary income, the top rate for which now stands at 43.3 percent for those in the highest income-tax bracket (39.6 percent), who also owe the 3.8 percent Medicare surtax on net investment income.

Short-term capital gains from the sale of investments held for one year or less are also taxed at the higher ordinary income rate, while long-term capital gains on gains from the sale of shares held for one year or more are subject to the more favorable long-term capital gains rate.

Read MorePros, cons of tax-loss harvesting

Qualified dividends may be taxed at the lower capital gains rate—15 percent for most middle-income taxpayers and 20 percent for high-income earners—depending on an investor's modified adjusted gross income.

Individual stocks make distributions, too.

"Very often, an investor in an actively managed fund may not know that a year-end capital gain or dividend will be declared." -Erika Safran, certified financial planner with Safran Wealth Advisors

But typically, shareholders know well in advance when that company will pay out, often quarterly, allowing plenty of lead time to avoid the ex-dividend date.

Actively traded mutual funds keep shareholders guessing.

"Very often, an investor in an actively managed fund may not know that a year-end capital gain or dividend will be declared," said Erika Safran, a certified financial planner with Safran Wealth Advisors. "Some years they do, and some years they don't."

Over the past five or six years, she explained, few funds distributed capital gains, because they had so many built-up losses carried forward from prior years during the economic recession.

Read MoreRebalancing mitigates risk

How many will distribute in the final months of 2014 remains to be seen, Safran said.

Lou Stanasolovich, a certified financial planner with Legend Financial Advisors, said he counsels clients to avoid buying ahead of the ex-dividend date if they know when the fund will pay out (start calling your fund in October), or if they're eager to own the fund immediately, to consider purchasing it in their tax-deferred retirement plan instead.

There are no tax implications on transactions made within your individual retirement account or 401(k) plan. (You'll owe taxes on the contributions and earnings only after you liquidate the shares in retirement.)

If you get caught on the wrong side of the ex-dividend line and your investment is sizable, Stanasolovich said it might also be prudent to sell those shares immediately and use the short-term capital loss (since the share price will be temporarily depressed) to offset capital gains in your portfolio.

While tax implications are an important component of long-term planning, Katz cautions investors never to let the tax tail wag the investment dog.

Read MoreWeigh feisty bond alternatives

If a fund makes sense within your portfolio, especially if you intend to buy and hold, the ex-dividend date should not weigh heavily on your investment decision.

"If you're planning to buy the stock, buy the stock," Katz said. "If you bought at $100, it falls to $99 after the ex-dividend date and you eventually sell it for $200, what does it really matter?"