Amazon (AMZN 1.30%) and Costco Wholesale (COST 1.01%) are different companies but share one thing in common: Each has a large base of loyal customers who depend on these companies for essential items every day. Amazon has over 200 million Prime members, but Costco also continued to grow its member count during the pandemic. In fact, the discount warehouse operator currently has nearly 66 million paid household members. 

Worries over inflation, a possible recession, and supply chain issues have sent both stocks down with the broader market. Year to date, Amazon shares are down 33%, while the S&P 500 index has dropped 24%. Costco Wholesale has fared better, down 16%. 

But if you could buy just one of these two stocks, which one should you buy today? Let's review where both companies stand.

Amazon's non-retail services are keeping it afloat

Amazon seems gigantic with $485 billion in trailing-12-month revenue through the second quarter. Over the last 10 years, Amazon's revenue has increased at an average annual rate of 24%. The stock rewarded investors with an 800% return. 

Amazon has a lot of moving parts that makes it a more complicated business to understand. Revenue from online and physical stores (e.g., Whole Foods Market and Amazon Go stores) totaled 47% of total revenue through the first half of 2022. 

Retail generates razor-thin margins for the company. Most of Amazon's $15 billion in operating profit over the last year came from its non-retail businesses -- advertising services, subscriptions (e.g., Prime fees), third-party seller services, and cloud services with Amazon Web Services (AWS). 

Third-party seller services amounted to 22% of total revenue in the first half of 2022. Advertising services and subscription services were 7% each of total sales, while AWS made up 16%.

Segment Percentage of Total Sales Through First Half of 2022
Online stores 43%
Physical stores 4%
Third-party seller services 22%
Subscription services 7%
Advertising services 7%
AWS 16%
Other 1%
Total 100%

Data source: Amazon.

Through Q2, revenue from online stores was down nearly 4% year over year. Meanwhile, AWS revenue was up 35%, but the slower rate of growth in the retail business has been the anchor on Amazon's business and stock performance year to date.

Amazon's diversified revenue stream gives it an advantage in being able to supplement its low-margin retail business with fast-growing, non-retail services that pad the bottom line. These higher-margin sources of revenue give management billions in cash from operations to invest in the expansion of its fulfillment capacity, its Prime delivery fleet, and the development of new shows and movies for Prime Video.

Still, Amazon will have to reaccelerate revenue growth to regain investor confidence. Total revenue grew just 7% year over year in Q1 and Q2, although sales in the first half of 2022 were nearly double that of 2019.   

However, profits have plummeted as management stepped up reinvestment in the business to support future growth. Through Q2, Amazon's trailing-12-month net profit dropped 56%. 

For 2022, analysts expect Amazon to post revenue growth of 15%, with earnings per share just above breakeven at $0.10. Lower earnings make the stock's price-to-earnings (P/E) ratio useless for valuing the stock right now. However, Amazon stock sells for 33 cash from operations per share. 

Costco experiences record membership renewal rates

Costco offers unbeatable value to customers. Its warehouse stores are spacious, well lit, and offer various services, including pharmacy, photo, and travel services. It even sells high-end merchandise you don't normally associate with a discount store, such as jewelry pieces going for $30,000. 

Compared to Amazon's declining online store revenue this year, Costco is doing much better. For Costco's recent fiscal year ending in August, comparable sales grew 14.4% over the year-ago period, with solid growth from e-commerce and physical stores. 

Over the last 10 years, Costco grew sales at a compound annual growth rate (CAGR) of 8.4%. The stock returned 379% to investors over that time. But the pandemic accelerated Costco's growth, which means many of the customers it gained are addicted to the experience it offers.    

Membership renewal rates hit all-time highs in the last quarter, which is good for Costco's bottom line. After all, most of its profit comes from membership fees. In fiscal 2022, Costco reported $7.8 billion in operating income, with membership fees contributing $4.2 billion.  

Analysts expect Costco's sales growth to slow toward pre-pandemic levels next year. The stock is cheaper than Amazon, selling for 30 times cash from operations. 

Costco is the safer stock

The stocks of Amazon and Costco can deliver adequate returns for investors over the long haul. It's likely Amazon will show accelerating growth in 2023 and deliver good returns for shareholders. But where the rubber meets the road is Costco's superior growth during a challenging year for the economy and its lower valuation.

Amazon's revenue decline in its online stores looks weak compared to Costco's double-digit growth across its warehouse stores and e-commerce channels. Costco is also delivering that growth while reporting strong profits; whereas, Amazon is spending massive amounts of money to build more fulfillment centers, which eats into its bottom line. 

If the economy weakens further, Amazon's cloud services and advertising businesses could begin to show decelerating growth, which could keep its total sales growth down longer than investors expect. 

Overall, Costco is the safer choice right now. Costco sweetens the deal with a dividend yield of 0.70%, and it occasionally pays a little extra through special dividends. Costco's most recent special dividend of $10 per share was paid in December 2020, which would yield 2% to the current stock price.