"You can, of course, pay too much for even the best of businesses." -- Warren Buffett, 1997 

Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B) CEO and investing legend Warren Buffett is well known for his focus on buying high-quality companies. Indeed, more than 3 decades ago, Buffett stated that he preferred investing in a "good business purchased at a fair price than in a poor business purchased at a bargain price."

Some stocks are just too expensive, according to Warren Buffett (Photo: The Motley Fool)

However, Warren Buffett's willingness to pay up for high-quality companies only goes so far. Some businesses sell at "unfair" prices in the stock market. Today, Amazon.com (NASDAQ:AMZN) may be just such a company.

Amazon.com is certainly a great business. Indeed, Amazon recently became the first 100-bagger for The Motley Fool co-founder David Gardner. However, its price has reached stratospheric levels in recent years. As a result, Amazon shares may underperform the market for the foreseeable future.

A fine line between growth and value

One reason for Warren Buffett's extraordinary success at Berkshire Hathaway has been his ability to walk the fine line between "value investing" and "growth investing." Both investing strategies have advantages and pitfalls.

Value investors look for stocks that are cheap, and this part of the investing process is easy. But stocks are often cheap for a reason. Perhaps the company is in a terrible business, or is about to face the entry of a disruptive competitor. Warren Buffett learned in his early years at Berkshire Hathaway that earnings can evaporate rapidly for a bad business.

That's why it's usually better to pay a premium for a strong company's stock than to buy shares of weak businesses just because they seem cheap. However, every company has a finite value. If you massively overpay, even a great business will generate lousy stock returns. This has proven true for numerous tech stocks in the last 15 years.

Buffett has navigated this dilemma by being picky. There are plenty of great businesses that you can invest in. There's no reason to invest in one that's incredibly expensive relative to its likely future earnings prospects.

Amazon is priced for perfection -- and beyond

Amazon.com stock has struggled recently, as investors have finally started to pay attention to its price. Amazon has certainly posted strong revenue growth, but it has not been reliably profitable recently. Investing in Amazon.com requires a leap of faith -- you must believe that Amazon will eventually become a highly profitable business, even though it has had low margins for many years.

AMZN Profit Margin (TTM) Chart

AMZN Profit Margin (TTM), data by YCharts

Amazon's most recent earnings report reinforced the recent pattern. Revenue grew by 23% to $19.34 billion. However, the company's loss widened year-over-year. Amazon lost money in the first half of 2014, and it expects to lose hundreds of millions of dollars in Q3 2014 -- perhaps due to launch costs for its new "Fire Phone".

Even as Amazon's earnings have deteriorated in the last few years, its stock price has soared. Today, Amazon has a market cap of about $150 billion -- and its market cap  peaked at more than $180 billion in early 2014. This makes it one of the most valuable companies in the U.S., even though it is on pace to lose money this year.

AMZN PS Ratio (TTM) Chart

AMZN PS Ratio (TTM), data by YCharts.

To some extent, Amazon's astronomical valuation can be explained by its high revenue growth rate. Sales are growing by about 20% annually, whereas Costco (NASDAQ:COST) -- arguably Amazon's closest competitor -- is posting high single-digit annual sales growth. Still, this cannot quite explain why Amazon trades at a price-to-sales ratio that is 4 times that of Costco.

Indeed, just 5 years ago, Amazon was growing faster and had a dramatically higher profit margin than it does today. In the last few years, Amazon's operating margin has dropped from around 5% to less than 1%. Meanwhile, annual revenue growth has fallen from a 30%-40% range to just more than 20%.

AMZN Revenue (Annual YoY Growth) Chart

Amazon P/S multiple vs. revenue growth and operating margin, data by YCharts

Even as Amazon's revenue growth and operating margin have dropped, its price-to-sales multiple has stayed roughly constant. This suggests that Amazon investors have not incorporated Amazon's slowing growth or lower margins into their expectations.

Amazon may be able to maintain a double digit revenue growth rate for the next decade while gradually rebuilding its profit margin to a respectable level. That would be an impressive business achievement -- but would still produce disappointing results for investors. Investors are simply paying too much for Amazon shares today.

Foolish bottom line

In the current slow growth economy, it's not too surprising that investors are willing to pay top dollar for companies that are generating rapid revenue growth. However, Warren Buffett would caution investors that you can pay too much even for a great business.

The investors bidding up shares of Amazon.com in recent years have probably been paying too much. Amazon is likely to experience strong revenue and margin growth in the next 10 years. However, barring an extraordinary revenue growth rate or a return to 2004-era margins, Amazon stock is likely to underperform the market during that time frame.