Update: Since this article was originally published, new legislation requires that mutual fund providers calculate -- and report to the IRS -- the cost basis for all mutual fund shares purchased after Jan. 1, 2012. Investors can choose from a minimum of three cost basis accounting methods. For mutual fund shares purchased prior to 2012, the article below still serves as a guide to selecting the appropriate, historic cost basis method. To stay abreast of the latest developments in mutual fund cost basis methods, we recommend bookmarking this Wikipedia page.NEW YORK ( TheStreet) -- Taking your money out is supposed to be the easy part. But for many mutual fund investors, that's when the headache begins. Selling mutual fund shares requires a fair amount of organization and planning -- especially if you want to optimize the resulting tax situation. Whenever you sell shares in a mutual fund, you'll generate a capital gain or loss that must be reported to the Internal Revenue Service. Even if you move money from one fund into another in what seems like a single, seamless transaction, a taxable event still has occurred. You'll owe tax (or can claim a loss) on the sale, and the amount you transfer to another fund will serve as the initial cost basis for that fund. Determining the cost basis of your shares can be a tricky business, though. But no matter how frustrating the process seems, it's a crucial step.