One of the challenges of investing is figuring out the tax consequences of your investment activity. For example, if you're not careful in accounting for "distributions," you could end up paying more in federal and state income taxes than you otherwise would.

Here is what we mean. Every so often, mutual funds make payments to shareholders representing their share of the interest, dividend, and capital gain income earned by the fund. These payments are called "distributions." (Note: This article applies only to those investing through a taxable account. If your funds are held in an IRA or other retirement account, fund distributions won't affect your tax situation.)

A capital gain is the profit that results when you sell an investment for more than you paid for it. Many fund investors assume that the way to calculate the amount of their capital gain is to always subtract the amount they paid for their shares (their cost "basis") from the proceeds they received when selling them. This is true only in the simplest instance — where you bought all your shares at the same time, received no distributions while you owned them, and sold them all at the same time.

But real-life investing situations are usually more complicated than that. If you (1) receive any distributions on your investments, (2) acquire your shares over time (for example, through dollar-cost-averaging or reinvesting your dividends), or (3) sell only part of your holdings, the taxation picture grows more complex. Let's look at the most common situations.

When you receive a distribution. Keep in mind: you aren't really gaining anything when you receive a distribution because the amount of the distribution is deducted from the value of your shares. For example, assume you buy 100 fund shares at $8.00 each. Your total cost is $800. The value grows to $12.00 per share, and your investment becomes worth $1,200 (100 shares multiplied by $12.00 each). If a $1.00-per-share dividend distribution is declared, you will receive a check for $100 (100 shares multiplied by $1.00).

However, on the ex-dividend date, the value of your shares immediately drops to $11.00 because $1.00 per share has been taken out of the fund's assets to be mailed to shareholders. You haven't gained; you still have $1,200 in value — $1,100 in fund shares (100 shares multiplied by $11.00) and $100 cash. The fund has merely "robbed Peter to pay Paul."

The tax consequences work like this. If you had sold your shares before the fund distribution, you would have a $400 capital gain ($1,200 proceeds minus $800 cost). If you sell your shares after the distribution, you would have a $300 capital gain ($1,100 proceeds minus $800 cost) plus $100 in dividend income; thus, you still have total taxable income of $400. Selling after the distribution didn't change the amount of your profit; it only changed the tax nature of your profit.

When you reinvest your distributions. If you have your fund distributions reinvested in more shares, you must be careful to avoid double taxation. When calculating your tax liability, you should add the cost of the additional shares purchased with your distribution proceeds to the amount originally invested in the fund. This will raise your tax "basis" in the fund shares you've acquired. In this way, you'll avoid being taxed twice — initially on the distribution and again later as a capital gain when the fund shares are sold.

For example, let's take our previous example and make a change: Instead of receiving the $100 distribution in cash, you instruct your fund to reinvest it in more shares. On the ex-dividend date, the value of the fund dropped to $11.00 per share as before. At that price, the $100 would purchase an additional 9.09 shares, bringing your total shares to 109.09. The $100 distribution must still be reported on that year's federal 1040, and taxes must be paid. Later, you sell all of your shares for $11.00 each, which brings in proceeds of $1,200 (109.09 shares multiplied by $11.00 per share).