Jeff Reeves, Special for USA TODAY
It's never easy for investors to make money in the stock market. And when they do, the last thing most people think about is how to report those gains to the IRS.
Unfortunately, the tax man is eager to get his share after you cash out an investment win. And unless you want to irritate the Internal Revenue Service, it's important to accurately report profits each year to the penny.
Calculating your gains sounds deceptively simple: Figure out the price at which you sold your stock or mutual fund (including commissions), subtract "cost basis" on your initial investment and - voila!
The organized investors out there have their own foolproof system for this, such as a color-coded spreadsheet or a three-ring binder with a printout of every order ever placed with their broker.
But for those of us who are a little less fastidious, the good news is that rebuilding your cost basis isn't too hard.
Begin by getting a record of past transactions from your broker. Frequently this will include your cost basis right there - but if not, it will at the very least give you the date of your transactions.
Next, always double-check your broker's statement to ensure accuracy or to fill in missing info if you only have the date but no price to go on. This is a simple task thanks to the Internet; just visit finance.yahoo.com and enter the ticker of your stock and click on "historical prices" to search. Yahoo Finance provides an automatically adjusted price for dividends and stock splits in its data, saving you a step if any of these events apply to the holdings you sold last year.
So what happens if your investments don't have a clear buy date, either because you performed multiple purchases or because the shares were a gift or inheritance? Well, special cost basis rules then apply:
• Multiple purchase prices for a single stock or fund. If you invested piecemeal over the years, the default method used by the IRS is called "first in, first out." Like the phrase implies, the first shares you bought and the accompanying price get reported first. If that lot isn't big enough to fulfill the entire sale, move to the next oldest transaction and average them together. In other words, no cherry-picking the when and what you paid to suit your interests in 2012. That's a big no-no with the IRS.
• Inheritance investments. If rich Uncle Vinny left you 100 shares of McDonald's, you aren't just lucky because of the generous gift. You're lucky because your tax basis is determined based on the date of death - so no detective work is necessary. Simply take the average of the high and low on that day (or the previous trading session if it's a weekend). Also a plus: You default to long-term capital gains status, so even if you sold the investments immediately you fall into the lowest tax bracket.
• A gift of stock. If someone bought you stock in 2012, you logically have to peg your price to the date of that transaction. But if for some reason they gifted you existing shares long held in their portfolio, you are beholden to their original cost basis unless shares are lower on the date of the gift. This can involve some homework, then, to find out which is better for you. Or worse, this can involve a lot of sleuthing if the generous person in question hasn't kept good records.
You can find other helpful hints at IRS.gov in publication 550, which focuses on investment income and has tips on how to calculate cost basis.
Jeff Reeves is the editor of InvestorPlace.com and the author of The Frugal Investor's Guide to Finding Great Stocks.