Many mutual fund investors were baffled this year to get a tax bill for mutual funds they owned that may not have even earned any money last year, and that has a lot to do with the disconnect between the way mutual funds operate and the actual returns that shareholders reap.

Mutual fund managers are constantly buying and selling securities within the fund. They must pass along to shareholders any realized capital gains that are not offset by losses by the end of the accounting year.

That's one reason an investor should never buy into a mutual fund just before a capital gains distribution, which typically occurs in December.

Although the nation's stock markets saw low or even negative returns last year, mutual funds had already carried forward the losses sustained coming out of the financial crisis and used those to offset the substantial gains they were earning in 2013 and 2014. By 2015, fund managers had few if any losses to offset gains, which resulted in shareholders receiving larger taxable gain distributions even though they may not have made money.

Taxes are a key reason why exchange traded funds (or ETFs) are gaining popularity. ETFs can be more tax efficient compared to mutual funds. Investors decide when to sell an ETF and pay taxes, not a mutual fund manager.

Exchange traded funds try to replicate the performance of a stock market index, such as the S&P 500, or a market sector, such as energy. Similar to mutual funds, ETFs offer investors partial ownership of an undivided pool of stocks and other assets.

The main difference comes down to how they operate.

When an investor sells shares in a mutual fund for cash, the fund manager must sell some of the fund's holdings to raise the cash to pay the redeeming shareholder. Those transactions have tax consequences and if they result in a gain, the gain must be distributed to all shareholders.

ETF shares are sold on an exchange, essentially from investor A to investor B.

While ETFs have advantages, a mutual fund will give investors a chance to outperform the market because mutual funds are actively managed, said Nicholas Besh, of PNC Wealth Management in Pittsburgh.

"Mutual funds can use hedging techniques or diversify to reduce volatility, he said. With an ETF, there are no changes.

"It's hard to say one is better than the other and many investors use both in a portfolio. I personally recommend using both."

Tim Grant is Pittsburgh Post-Gazette reporter.