Figuring your tax bill on mutual fund sales is about as fun as going over a waterfall in a canoe. But, if you plan ahead and maintain good records, you can save yourself a bundle come April 15. The most important thing to remember is that you must decide which tax calculation method you will use before you sell your shares. Otherwise, you will be stuck using the FIFO (first-in, first-out) or average basis method, and those may not be the best for you. So, read on.

Figuring the Tax Basis of Shares You Are Selling
The tax gain or loss from mutual fund sales is calculated by comparing your tax basis in the shares sold to the sales proceeds net of any transaction costs. In general, the tax-planning objective is to maximize the basis in the shares being sold to minimize the gain, or maximize the loss.

You may also be selling losing fund investments with the objective of offsetting gains from earlier transactions. In fact, you can sell enough losers to completely offset those gains and generate a $3,000 net capital loss for the year ($1,500 for married taxpayers filing separately). You can then deduct that loss against your other income from all sources (wages, interest, etc.).

Now, if you sell your entire holding in a particular fund, it's easy to determine your tax basis. It is the sum total of the cost of all your share acquisitions, including any that you bought via the fund's automatic dividend reinvestment program.

However, things get tricky when you sell only a portion of your shares after having purchased them at different times and different prices. In this case, think of your investment as consisting of several blocks of shares purchased on various dates.

Usually, each block has a different per-share cost. Some blocks may have been held over 12 months and some less. So, when you sell some shares, you need a method to determine which block those shares came from. You can then calculate your gain or loss and determine whether it's classified as long term or short term.

The Tax Code allows four methods:

· first-in, first-out (FIFO) method;
· specific identification (specific ID) method;
· single-category or "regular" average basis method; and
· double-category average basis method

FIFO Method
This method assumes that shares you sell come out of the earliest-acquired blocks you own.

Example 1: Say you bought your first 100 shares in a particular fund for $20 per share (Block #1). Later, you bought 100 more for $25 (Block #2). Still later you bought another 100 for $24 (Block #3). You then sold 150 shares for $26 ($3,900). Under FIFO, you are assumed to have sold all of the shares in Block #1 (tax basis of $2,000) plus 50 shares from Block #2 (tax basis of $1,250). Your gain is $650 ($3,900 proceeds less basis of $3,250).

To use FIFO, you must have a record of the per-share price and acquisition date for each block. In a rising market, FIFO tends to generate the biggest tax bill, because the oldest, cheapest shares are considered sold first. However, FIFO also increases the odds that your gains will be long term and therefore qualify for the 20% maximum rate. As far as the IRS is concerned, FIFO is the "default" method. In other words, you must use FIFO to calculate mutual fund gains and losses, unless you take the action required to use one of the alternative methods explained below.

Specific ID Method
Under this method, you specify exactly which block (or blocks) of mutual fund shares you intend to sell, so you can minimize gains or maximize losses by selling your highest-cost shares first.

Example 2: Same facts as in Example 1 above. Using specific ID, you can sell 100 shares from Block #2 (basis of $2,500) and 50 from Block #3 (basis of $1,200). So your gain is only $200 ($3,900 proceeds less basis of $3,700), vs. $650 if you used FIFO.

To use specific ID, you must instruct your broker or the fund to sell specific shares by reference to their acquisition date and per-share cost. In other words, you must take action at the time you make the transaction (otherwise, there's nothing you can do to make the specific ID method available next year, when you are slaving over this year's tax return). Also, the broker or fund must send you a written confirmation of your instructions. Keep this in your tax file to prove you followed the rules. Unfortunately, some brokerage houses and fund companies don't issue conformations because of the paperwork involved. In this case, keep a written record of your oral instructions regarding which shares you've sold.

One more thing: Remember that selling the most expensive shares could mean your gains will be short term and therefore taxed at your regular income tax rate rather than the long-term capital gains rate of 15%. However, if you are selling losers, it's generally better to sell short-term shares. Your short-term losses will then offset short-term gains that would otherwise be taxed at your income tax rate.

Single-Category Average Basis Method
This method is available when you leave your mutual fund shares on deposit in an account with an agent or custodian, but not when you actually have possession of your share certificates.

Each time you make a sale, you simply figure your average presale basis for shares of that fund. For holding period purposes, you are considered to sell the oldest shares first.

Example 3: Same facts as in Example 1. Immediately before the sale of 150 shares, your average basis was $23 per share (total cost of $6,900 divided by 300 shares). So your tax gain this time is $450 ($3,900 proceeds less basis of $3,450).

Almost all funds now report single-category average basis numbers on transaction statements. They may also automatically calculate your gains and losses under this method. This is very convenient, but as Example 2 illustrates, it doesn't necessarily minimize your taxes.

If you want to use the single-category average basis method, you must indicate so by making a notation on the line of Schedule D, where the gain or loss from the transaction shows up. Just write "single-category average basis method." Beware. Once you use this method for a particular fund, you must continue to do so for all future sales of shares in that fund. (Other funds are unaffected.)

Double-Category Average Basis Method
Here you separate shares into two pools — one consisting of all long-term shares (held over 12 months), and the other consisting of all short-term shares. Then each time you sell, you calculate the average per-share basis for each pool. You can then sell strictly out of one pool or the other, or mix and match as you see fit. The advantage is you have more flexibility to control the basis of the shares being sold and whether the resulting gains will be taxed at 15% or your regular rate.

Example 4: Same facts as in Example 1. Assume the 100 shares you bought at $20 are in the long-term pool and the remaining 200 shares are in the short-term pool (average basis of $24.50). As before, you sell 150 shares for $3,900. Using the double-category average basis method, you choose to sell all 150 shares out of the short-term pool. This results in a short-term capital gain of $225 ($3,900 of proceeds less basis of $3,675). Alternatively, you could decide to sell all 100 shares in the long-term pool and 50 shares out of the short-term pool. This would result in a long-term gain of $600 ($2,600 proceeds less basis of $2,000) and a short-term gain of $75 ($1,300 proceeds less basis of $1,225).

For my money, it makes more sense to use the specific ID method rather than the double-category method. With specific ID, you can tailor the tax results with greater exactitude for the same amount of trouble. Also, once you use the double-category method for a particular fund, you are locked into it for all future sales of shares from that fund. In contrast, using specific ID has no impact on future transactions.

But if you want to use the double-category method, you must specify to your broker or fund how many shares you want to sell out of each pool, and your instructions must be confirmed in writing (just like for specific ID). If your fund won't give you a confirmation, you are considered to sell shares from the long-term pool first. Finally, you must write "double-category average basis method" on the line of Schedule D.

Watch Out for 'Wash Sales'
If you intend to sell some mutual fund losers for the tax savings, watch out for the dreaded "wash sale" rule. Your tax loss gets disallowed if you buy back the same fund shares within 30 days. This is not a total disaster, because the disallowed loss gets added to the tax basis of the shares you buy back. So you'll eventually make up the difference with a smaller gain or bigger loss when you sell those shares. Still, your expected tax loss gets shelved.

You can avoid the problem by repurchasing shares in a different fund with the same investment characteristics. For instance, sell one small-cap fund, then buy a different small-cap fund run by a different manager. You might get in trouble, however, if you sell one S&P 500 index fund, then buy another one within 30 days.

Also, be sure to "turn off" your automatic dividend reinvestment program if it would cause a buyback within 30 days after your loss sale. The buyback would rule out some or all of your tax savings under the wash sale rule.