Most of us, in our investing lives, have more than a few "should have" stocks we missed an opportunity to buy at an advantageous price. Even the man who's arguably the most celebrated and successful money man out there -- Berkshire Hathaway founder, CEO, and chairman Warren Buffett -- has a few regrets.

Not long ago, Buffett confessed to Berkshire shareholders that he "missed the boat" on two stocks that have grown to become monsters on the market. They're also outperformers in many an investor portfolio these days.

Warren Buffett up close.

Image source: The Motley Fool.

Lost opportunities

The two "coulda, shoulda" stocks for Buffett and Berkshire are Alphabet (NASDAQ:GOOG)(NASDAQ:GOOGL) and Amazon.com (NASDAQ:AMZN).

Alphabet (specifically its anchor asset Google) came to his attention some years ago when Berkshire's Geico insurance unit was a customer of its search engine advertising. "And any time you're paying somebody $10 or $11 bucks every time somebody just punches a little thing where you've got no cost at all," said Buffett, "that's a good business unless somebody's going to take it away from you."

As for Amazon, the Berkshire leader praised CEO Jeff Bezos' success in dominating two world-beating businesses -- retail sales and cloud services -- "[f]rom a standing start at zero with competitors with lots of capital and everything else."

At first blush, neither Alphabet nor Amazon is a classic Berkshire play. After all, they're tech-driven enterprises, and for most of its existence Berkshire was famously tech-adverse.

But let's dig a bit deeper. Fundamentally, Buffett and his gang have tended to prefer solid, consistently profitable companies that have more or less straightforward business models.

Banks, for example, make the bulk of their money pretty much as they always have, by taking in deposits and issuing loans -- Berkshire's portfolio has been heavily weighed in banking and finance for many years. Railroads, also well represented in the asset list, are critical businesses in intercontinental trade with a traditional way of making a buck (transporting goods for money).

Beneath all the wonky tech that powers their activities, Alphabet's and Amazon's foundation businesses are not particularly hard to understand. Alphabet's Google sells advertising connected to its search engine. Amazon, meanwhile, sells almost everything known to humankind. On top of that, its Amazon Web Services (AWS) is the clear No. 1 infrastructure-as-a-service provider on the market.

Buffett also likes a company with a moat, the wider the better. A railroad has an intrinsic moat -- even an immensely wealthy would-be rival would have difficulty building a rail network and populating it with engines and cars. 

Both Alphabet and Amazon have impressive moats. It's safe to say that the great majority of businesses and individuals paying for clicks on Google search haven't even considered opting for any of the site's much lesser rivals. As for Amazon, good luck to anyone trying to match the company's sprawl and reach in e-commerce. 

Not too late for most of us

Buffett didn't directly say that it was too late for Berkshire to plow money into Alphabet and Amazon, but his ship-has-sailed language made this clear. Both companies have seen notable price appreciation of late, with the twin classes of Alphabet stock more than doubling over the past three years. In that stretch of time, Amazon's shares have risen by almost 280%.

Those stocks aren't as cheap as they once were, but they still represent shares of dominant companies that have an excellent chance of staying on top of their respective sectors for many years to come. Warren's not about to buy a stake in either Amazon or Alphabet, but that shouldn't dissuade the rest of us from considering an investment in those world-beating companies.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Eric Volkman has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), Amazon, and Berkshire Hathaway (B shares). The Motley Fool has a disclosure policy.