Everyone's talking about how investors can profit from Obama's stimulus plan. $787 billion is a heck of a lot of money, and, frankly, I want my share.

But this stimulus bill is far more difficult to take advantage of than people might realize. When you drill into the package, the opportunity isn't as clear-cut as it initially appears.

The real number
To start with, the headline number isn't really a useful number when it comes to looking for targeted investment opportunities.

The $43 billion for unemployment and welfare benefits and $20 billion for food stamps will stimulate the economy as a whole, but not any particular company. Similarly, unless your kid's teacher is willing to sell you a portion of their salary, the $87.3 billion going toward education doesn't lead to natural investment opportunities.

The same goes for most of the $253 billion in tax cuts and credits. The tax cuts will help the economy, but other than the $6.6 billion in homebuyer credits, the $1.7 billion in auto credits, and the $26 billion in renewable energy credits and loans, the tax cuts aren't targeting particular sectors. The homebuyer and auto credits are completely trivial compared to the size of the markets, and therefore do not offer investment opportunities.

The renewable energy stimulus is more interesting. But, oil is down from over $140 to $45. Does anyone really believe that a $26 billion government handout will come close to having the stimulating effect that $140-a-barrel oil did on the renewable energy industry? An investment in renewable energy companies needs to be based on oil prices, the worldwide regulation of carbon emissions, or our long-term energy needs -- not a one-time stimulus package.

Profiting from the sick
Health-care spending seems to have some potential, with $86.6 billion going toward Medicaid and $24.7 billion toward discounted health insurance for laid-off employees.

But we already pour over $2.1 trillion into health-care annually, so it's hard to see how an extra $111.3 billion across the entire industry will have much of an impact on any individual company. In fact, large health insurers like UnitedHealth (NYSE:UNH) and Aetna (NYSE:AET) may be hurt. The people most likely to pay for health insurance after losing their jobs are those who are most likely to need health insurance. So, while UnitedHealth and Aetna may pick up customers, they may be unprofitable customers.

Infrastructure is out
Those categories alone account for almost two-thirds of the stimulus package. The $175.9 billion in infrastructure spending is a large chunk of what remains. In normal times, you could profit by buying pick-and-shovel companies like Caterpillar (NYSE:CAT).

But that's hard to do in this case, because we're coming off a real estate bubble. In December, residential construction was down $94 billion year over year, while the architecture billing index -- which tends to lead commercial construction spending by nine to 12 months -- has plunged to record lows. All the equipment that was used to build office buildings will be redeployed into building roads and bridges. The stimulus bill won't come close to replacing lost business for Caterpillar, which is why it's been laying off workers.

That's the story with a lot of the infrastructure spending. The $11 billion for the smart electricity grid should help companies from General Electric (NYSE:GE) to Siemens (NYSE:SI). Even Google (NASDAQ:GOOG) is writing software for monitoring electricity use. But many of the companies in the space are huge conglomerates, and the $11 billion is unlikely to put a dent in the business these companies have lost as a result of the economic slowdown.

The best opportunity
To make for a good investment opportunity, the stimulus money must be targeted and significant relative to the size of the company. What's more, the stimulus bill shouldn't simply replace a fraction of the revenue that the company will lose as a result of the slowing economy, as is the case with a lot of the infrastructure spending.

The best opportunity may lie in the $19 billion that the government is allocating to health-care information technology (IT) systems. Cerner (NASDAQ:CERN), a leader in electronic medical records, could be one of the best opportunities. Cerner's annual revenues are about $1.7 billion, so even a fraction of the $19 billion can potentially make a huge difference to Cerner's bottom line.

Even better, the investment in health-care IT should provide advantages to Cerner long after the stimulus plan is gone. The more doctors who use electronic medical records, the more value there is in integrating hospitals and medical devices into the system. Thus, there is a natural networking effect in health-care IT that should benefit Cerner.

The Foolish bottom line
While Cerner looks like a great opportunity because the short-term stimulus should lead to long-term competitive advantages, picking stocks based on government stimulus is a challenging game. From the start, it's difficult to predict which companies will benefit from government spending, and after the stimulus is spent, its positive effects recede. Generally, a better strategy is to focus on cheap companies with long-term competitive advantages.

In this market, there are many opportunities to buy great companies at cheap prices -- businesses that don't need a stimulus package to be successful. In fact, our Inside Value team thinks that right now marks the best time to buy excellent businesses since we started the newsletter. If you want to see why, you can read about our top picks with a free trial.

Fool contributor Richard Gibbons still isn't feeling stimulated, and requests that the government give him money. He owns shares of UnitedHealth and Google. UnitedHealth is both a Motley Fool Inside Value and Stock Advisor pick, as well as a Fool holding. Google is a Rule Breakers recommendation. The Fool's disclosure policy gets its stimulation by administering small electric shocks to writers who accidentally violate the policy.