Editor's note: The previous version of this article stated that Warren Buffett does not invest in pharmaceutical companies. In fact, Buffett's firm Berkshire Hathaway owns shares of Johnson & Johnson and Sanofi-Aventis. We have amended the article and regret the error.

Valuing pharmaceutical companies in the usual way of discounting future cash flows and coming up with a present value can be a challenge, because it is tough to predict a drug company's earnings. Recent news suggests that investors must be aware of a number of potential pitfalls facing drug companies. So how does an investor accurately estimate the amount of money that a drug company, or perhaps more simply one of its drugs, will produce over its lifetime?

Successful, patented drugs earn billions of dollars during their period of patent protection, but their earnings fall precipitously once they're subjected to generic competition. A medication's value can thus be estimated by calculating its profitability over its patented life, adding a smaller amount of cash going forward after it loses patent protection, and then discounting it back to its net present value. For newly approved drugs, investors can estimate the market size of a drug, along with its accompanying revenues and profits. But one thing is clearly impossible to predict: clinical trial results.

Pfizer (NYSE:PFE) spent more than $800 million developing the cholesterol drug, torcetrapib, which seemed like a terrific investment. The drug was a novel new molecular entity, with annual revenues projected in the billions of dollars. The medical community was excitedly awaiting its clinical release in a year or so, as major clinical trials neared completion.

Two days after Pfizer CEO Jeffrey Kindler announced to analysts that Pfizer was planning to file with the FDA in late 2007, asking for approval to market a torcetrapib-Lipitor combination, the drug was removed from the market. A large clinical trial discovered an excess of deaths among patients taking it. Efficient-market proponents might suggest that investors implicitly valued torcetrapib as a $20 billion drug -- the amount of market cap shaved off Pfizer's stock the day after the announcement of torcetrapib's bad news.

The same thing can happen for established, market-leading drugs. Merck (NYSE:MRK) made billions of dollars of profit from Vioxx, but it may eventually spend more in legal fees and lawsuits than it earned from selling the drug in the first place. Wyeth (NYSE:WYE) spent more than $20 billion in litigation and claims from anti-obesity drugs phen-fen and Redux. The legal exposure of drug companies to the tens of millions of consumers that take a particular drug is far greater than the legal exposure of financial companies, software companies, retailers, or other huge businesses to their hundreds of millions of consumers.

There is an additional, newer problem in predicting future sales of drugs. Recent legislation created Medicare Part D, making Medicare the world's largest purchaser of prescription drugs -- by far. It also explicitly banned Medicare from negotiating prescription drug prices. The newly elected Democratic leadership has made it clear that it plans to pass laws allowing Medicare to negotiate drug prices with pharmaceutical companies soon. Since other countries directly or indirectly negotiate prescription drug prices, Americans pay more for their prescription drugs than citizens of other countries. In fact, many multinational drug companies, including GlaxoSmithKline (NYSE:GSK), Sanofi-Aventis (NYSE:SNY), AstraZeneca (NYSE:AZN) and Novartis (NYSE:NVS), earn between one-third and one-half of their revenues from U.S. sales.

President Bush has said that he would veto any legislation allowing for negotiation of prescription drug prices by Medicare. But with the Dems now in control of both the House and Senate, that may be politically more difficult for the president. Whether a bill is drafted or signed, it is much more difficult to estimate the price that drugs will sell for in the foreseeable future in the U.S. -- and therefore, drug companies' future revenues -- than it was before the November elections.

Pfizer and Berkshire Hathaway are Motley Fool Inside Value picks. Glaxo is a current Motley Fool Income Investor selection, while Merck was a former pick of the Fool's dividend-focused newsletter service. Try any of our Foolish newsletters free for 30 days.

Fool contributor Dr. Michael Cecil is a cardiologist and the author of Drugs for Less: The Complete Guide to Free and Discounted Prescription Drugs.Dr. Cecil owns shares of Berkshire Hathaway.The Fool has a disclosure policy.