There's no question that Amazon.com (AMZN -1.64%) is a wildly successful business. In the span of two decades, Amazon.com has gone from a tiny Internet start-up to one of the biggest global retailers, and it's even branching out into other areas like cloud infrastructure).

In fact, Amazon's most recent earnings report shows clearly how Amazon is following in the footsteps of another highly successful Seattle-area retailer: Costco Wholesale (COST 0.17%). Both companies thrive by constantly pushing prices down to gain market share and keep customers happy. However, investors haven't been pleased by this revelation.

AMZN Chart

Amazon YTD Stock Chart, data by YCharts

The problem is that investors have been valuing Amazon in a completely different way from Costco. Whereas Costco shareholders don't expect much long-term margin growth, Amazon's investor base clearly expects massive margin expansion. If Amazon's long-term margin profile mimics Costco's, shareholders are going to be very disappointed.

The Costco model
Costco operates on a very unusual business model, compared with most retailers. Whereas many of its competitors mark up items to achieve a gross margin of 20%-30% (or more), Costco doesn't mark up items more than 15%. Most of its income is from membership fees: Last year, membership fees accounted for 75% of Costco's pre-tax income.

Costco limits markups to 15%, which keeps prices very low.

To make any money at all outside of fee revenue, Costco needs to keep costs down. In its most recent fiscal year, Costco's selling, general, and administrative expenses totaled just 9.6% of revenue. However, Costco doesn't exploit workers to do this: In fact, it offers probably the best pay and benefits in the retail industry.

Amazon is similar to Costco in many respects. First, like Costco, Amazon is committed to low prices, believing that this contributes to long-term customer loyalty. Amazon continues to reduce prices even when price-sensitivity studies show that it could raise prices without losing too much business. It keeps costs down by continuously beefing up its scale.

Amazon has its own popular membership program: Prime.

Second, while you don't need a membership to shop at Amazon, the company has a popular and fast-growing membership program, called Prime. And Prime members spend far more at Amazon than non-members.

Third, while Amazon has been the subject of some major complaints about working conditions in some of its warehouses, it is generally seen as a good employer. In its recent investor letter, Amazon talked about employee-friendly initiatives like paying for career development courses, offering severance payments to employees who want to move on from Amazon, and allowing customer-service representatives to work from home.

It's all about valuation
While Costco and Amazon seem like similar businesses in many respects, investors haven't been valuing them that way. Analysts expect Costco to post revenue of nearly $112 billion in its current fiscal year, but the company's market cap is just $51 billion.

Meanwhile, analysts expect Amazon to generate revenue of $91 billion this year, yet its market cap is nearly $150 billion -- and peaked at almost $200 billion in early 2014! It's understandable that Amazon would be worth more than Costco. After all, the company is growing more quickly, and it's likely to pass Costco in terms of revenue a few years from now.

Still, at Costco's price-to-sales ratio, Amazon would need revenue of more than $300 billion to justify its current valuation. Amazon might reach that sales level eventually, but not for at least a decade.

This suggests that Amazon investors believe the company can do much better than Costco's operating margin of less than 3%. However, it's been quite a while since Amazon had a mid- to high-single-digit operating margin.

AMZN Operating Margin (TTM) Chart

AMZN Operating Margin (TTM), data by YCharts

Amazon bulls -- and the company's management -- have blamed margin compression on heavy investments to support Amazon's growth. Indeed, Amazon has been investing heavily. On the other hand, the company's revenue has exploded from $34 billion in 2010 to perhaps more than $90 billion in 2014.

By now, Amazon.com ought to be seeing some of the benefits of its investments. The payoff in terms of revenue growth has been clear. However, margins have continued falling, and Amazon projected an operating loss for Q2.

Analysts are finally starting to recognize that Amazon isn't likely to get back to its historical margin level for the foreseeable future. In fact, Amazon's business is a lot different today from what it was 10 years ago. There's no reason to believe that Amazon can hit its 2004 margin level with its 2014 business.

I'm still staying away
Amazon has recently been posting a profit margin of less than 1%. This margin is clearly being compressed by growth investments. However, leaving aside the investments for growth, it seems quite likely that Amazon's operating margin would be fairly similar to Costco's -- perhaps 3% to 4%.

At that margin level, Amazon would need to maintain a revenue growth rate of more than 20% for a very long time to justify its high valuation. However, the more Amazon grows, the harder it will be to maintain a 20% growth rate. As a result, while I like the low-margin/high-volume business model, I'm putting my money on Costco rather than on Amazon.com.