Since the mutual fund keeps your shares in a single account when you make a sale, it’s difficult to know which shares you are selling and which ones you are retaining.
You do, if you keep good records. If you direct the fund to sell specific shares—such as the 100 shares purchased July 3, 1997 for $27.85 a share—it's the basis of those shares that determines the tax consequences of the sale.
You should keep records of your sales order, including a copy of the letter to the fund identifying the shares to be sold, by the date you acquired them and the price paid. You should also ask the fund for a letter confirming your specific directive, and keep that letter in your files, too. If you order the sales online, you'll probably get an online confirmation. Keep it with your tax records.
If you simply call or write the fund, or order the sale online, and simply ask that a certain number of shares be redeemed without specifying which ones, it is assumed that the first shares sold are the first ones you bought. This rule is often referred to as FIFO, for "First In, First Out."
The IRS does permit mutual fund investors to use an "average" basis for figuring gain or loss on the sale of fund shares. (This method is not available for stocks.) There are really two average-basis methods—single- and double-category.
This discussion focuses on the single-category method, which is the easiest and most-used. The double-category method, which involves dividing shares based upon how long they have been owned, is rarely used and almost always more trouble than it's worth.
With the single-category method, you add up your total investment in the fund (including all those bits and pieces of reinvested dividends), divide it by the number of shares you own, and voila, you know the average basis. That's the figure you use to calculate gain or loss on sale. If your investments over the years result in a $22.48 average basis and you redeem 100 shares at $25 a share, for example, you'd have a $252 gain ($2,500 minus $2,248). When it comes to determining whether a gain or loss is long- or short-term, you assume the shares sold are those you've owned the longest.
The single-category method is gaining more and more converts because an increasing number of funds are actually doing the work for shareholders. The funds send out an extra statement each year—a copy of which currently does not go to the IRS —showing the single-category average basis of shares redeemed during the year.
You can switch between specific identification and FIFO whenever you wish, but once you use one of the average basis methods for a fund, you're stuck with it for as long as you own shares in that fund. IRS Publication 550: Investment Income and Expenses explains the average basis method in more detail.