It's tough enough to make money in the stock market, and tougher still to do so with large, well-known giants such as Coca-Cola (NYSE:KO) or Microsoft (NASDAQ:MSFT). The larger the company, the more difficult it is to grow revenue and free cash flow at substantial percentages, and the smaller the odds you can buy at a discount.

That's why, when investors sell off a megacap like Toyota (NYSE:TM) for its safety and recall woes, we must take notice. It may present a rare opportunity to actually make money on a big company's stock. You want to buy Johnson & Johnson (NYSE:JNJ) during a crisis like the Tylenol recall -- not now, when it just snared a juicy $1.7 billion patent settlement with a competitor. And for Toyota, a large, industrial company in a cutthroat industry far from pharmaceuticals and medical devices, you really need a discount.

Let's apply three tests
First, identify the source of selling. You want it to be emotional, with Graham's Mr./Ms. Market pressing the "sell" button in a tizzy. The more desperate the seller, the better price for you. Here, we see Toyota facing a serious issue -- perhaps on the level of the Tylenol scare -- and so far addressing it. We can expect the cost to be great, perhaps $2 billion or more. But we know that the market has sold off more than $20 billion in the company's value. Is that rational? Emotional selling, check!

Second, is there anything underneath the selling we need to worry about? The cockroach theory holds that there is never just one problem, just as there's never just one cockroach. Toyota must contend with the unintended acceleration problem, and a recall and production shutdown estimated to cost 100,000 vehicles in future North American sales. Most recently, the company has revealed Prius brake problems that have led to a review of all Toyota hybrids and a global recall. (Remember the South Park episode where all hybrid drivers suffer from the condition known as "Smug?" Not today!) Has Toyota come completely clean, or are there any more roaches?

Third, is the stock cheap enough? That's the hard part. I spend about zero time on automakers, because the complexity of their finances and the desperate nature of the industry turn me off. But if there's any company an opportunistic investor should take seriously in this industry, it's Toyota. The company has enjoyed decades of quality and sales across every category and geography. With that in mind, is today's $76-a-share price sufficiently low?

What to do, what to do?
Toyota's years of quality operation and industry-leading repair and dependability records still couldn't repeal the law of averages. Someday, Toyota would have a problem or three. Even if there are more roaches lurking here, the scale of Toyota shareholders' sell-offs could more than cover that cost. Keep in mind that Toyota posted a record quarterly profit and raised its sales forecast, despite a challenging auto environment.

You never have to buy any stock. You can always simply pass, waiting for a fatter pitch. But here, the market may have given us a very rare opportunity to own a respected, high-quality leader in a tough industry, all at a value price. As a margin of safety, we have the likelihood -- though not the certainty -- that the sell-off is far, far greater than the cost will ever be. And whenever we have a discount and margin of safety on a megacap -- as we appear to have here -- it's tough to lose money.

Is this Toyota's Tylenol moment, or has the company damaged its brand by not revealing these defects sooner? Would you buy a Toyota now? Tell us what you think in the comments section below.

Motley Fool advisor Tom Jacobs will be unveiling a new opportunistic investing service in March. Check back soon for more details!

Tom "I don't drive a Prius" Jacobs owns no shares of the companies mentioned in this article. Coca-Cola and Microsoft are Motley Fool Inside Value recommendations. Johnson & Johnson and Coca-Cola are Motley Fool Income Investor selections. Motley Fool Options has recommended buying calls on Johnson & Johnson, and a diagonal call position on Microsoft. Try any of our Foolish newsletter services free for 30 days. The Motley Fool has a disclosure policy.