A college dropout and his electronics engineering friend first started building computers in their parents' garage in 1976. By 1995, their little company had become a force in the tech industry logging its best year ever, selling 4.5 million PCs and eclipsing $11 billion in annual revenues. That same year, a Seattle-based company shipped its first hardback book ordered on its online website boldly claiming to be the Earth's Biggest Book Store.

These two start-ups with humble beginnings and big dreams are now two of the largest companies on the planet and have made many of their shareholders rich. Investors may have missed getting in on the early rise of Apple (AAPL -1.19%) and Amazon (AMZN -1.51%) stocks, but it's not too late for those who want a piece of the action. Despite their massive size, these two continue to post impressive top-line growth, making their stocks worthy of a closer look.

Let's find out which of these mega-cap stocks would be a better buy for your portfolio today.

Woman thinking while looking at laptop and notepad.

Image source: Getty Images.

Giant-sized numbers when compared side by side 

Taking a look at the key metrics for these quality operators side by side enables investors to understand how these two business models differ.

Metric

Apple

Amazon

TTM revenue

$274 billion

$322 billion

TTM gross margin

38%

25%

TTM net income as a percentage of revenue

21%

4%

MRQ revenue growth

10.9%

40.2%

Three-year CAGR

6.5%

27.3%

Cash and marketable securities

$194 billion

$71 billion

Debt

$113 billion

$33 billion

TTM operating cash flow

$80 billion

$51 billion

Note: A number in bold indicates the "better" result between the two companies. TTM=trailing 12-months as of the end of June 2020. MRQ=most recent quarter. CAGR=compound annual growth rate (Apple's CAGR is calculated based on its 2016 through 2019 fiscal years, ending Sept. 30, 2019. Amazon's CAGR is calculated based on its 2016 through 2019 fiscal years, ending Dec. 31, 2019). Data from company earnings releases and Yahoo! Finance. Table by author. 

Amazon boasts higher revenue, its growth rates are considerably higher and it has less debt. Apple sports higher gross margins, net income, and cash. Both have tremendous operating cash flows, but Apple's is higher when measured in absolute dollars and by the percentage of revenue.

Apple's services business is thriving

When looking at companies with hundreds of billions in annual revenues, it's helpful to break down the business into its component parts to better understand what's going on. Apple's largest moneymaker by far is the iPhone. Revenue growth from this flagship product has slowed over time, but the other hardware categories posted strong double-digit growth in the most recent quarter despite recession headwinds and supply constraints. Its services business, making up 22% of the top line and its 67% gross margin, is becoming a huge revenue and profit contributor.

Bar graph of Apple's Q3-2020 revenue by segment compared with Q2-2019. iPhone is largest at $26.4 billion, followed by services at $13.2 billion, Mac at $7.1 billion, iPad at $6.6 billion, and Wearables, home and accessories at $6.5 billion.

Note: Apple's Q3-2020 ended on June 27, 2020. Data from Apple's earnings release. Chart by author.

Apple's services segment capitalizes on the more than 1.5 billion iPhones in use today and the popularity of its ecosystem. The services business is a broad set of revenue-generating software (App store, Apple Arcade), content (Apple TV+, Apple News+), and services (extended warranties, leasing, credit cards) that have become incredibly popular. As of its most recent quarter, it had over 550 million subscriptions across its service offerings, but it's not stopping there. Just announced was an on-demand fitness service, Apple Fitness+, and a new Apple One subscription which provides a bundle of entertainment and cloud storage services at a discount.

Its focus on delivering world-class service offerings will enable it to continue to grow its customer wallet-share, top-line revenue, and profitability for years to come.

Amazon is getting a coronavirus boost

Amazon isn't just an e-commerce powerhouse. It's built an incredible cloud technology business called Amazon Web Services (AWS). Today, that segment makes up only 12% of the most recent quarter's revenue, but it makes up most (69%) of its operating income. This profit center helps offset losses in its fulfillment segments and lets the company continue to invest in its distribution infrastructure to maintain its e-commerce leadership position.

Bar graph of Amazon's Q2-2020 segment revenues. North America with $55.4 billion, international with $22.7 billion and Amazon Web Services with $10.8 billion.

Note: Amazon's Q2 2020 ended on June 30, 2020. Data from Amazon's Q2 2020 earnings release. Chart by author. 

Its North American fulfillment business is still the largest revenue contributor (62%), and last quarter, it was the fastest-growing at a coronavirus-fueled 43% year-over-year growth. Its international segment grew revenue 39% year over year last quarter, and AWS grew by 29%.

With the coronavirus keeping consumers at home for work and school, Amazon's e-commerce platform has become a popular go-to site to replenish everyday household goods. This increased demand is driving the company's employee base to record levels as it looks to fill its 133,000 job openings on its career website. E-commerce and cloud services are tremendous long-term growth drivers for Amazon, and it is well-positioned to win for customers, shareholders, and its employees as it embarks on the second quarter-century of this amazing growth story.

So which is a better buy?

When looking at companies with these massive market capitalization numbers, it's important not to ignore valuation when making a stock buy decision. 

AAPL Price to CFO Per Share (TTM) Chart

AAPL Price to CFO Per Share (TTM) data by YCharts

Over the last three years, Apple's valuations have grown considerably. This may be because its shift into high margin services has investors thinking its business should be valued more like a software company. But it's important to remember that its hardware business still makes up 78% of the top line. With nine years of increasing dividends, Apple may be more attractive to dividend lovers. But with its small 0.7% dividend yield, the cashback from these quarterly payments isn't a reason to add this slower-growing company priced at a premium to its historical averages to your portfolio.

Of the three valuation metrics in the graph above, only Amazon's price-to-sales valuation has grown by more than double digits. But with its accelerating growth rates, it makes this higher valuation less worrisome. As a comparison, top-line growth this past quarter was double the rate of its Q2 2019 year-over-year growth of 20%. Between more attractive valuations to historical averages, higher growth rates, and a likely permanent acceleration of e-commerce adoption due to the coronavirus, Amazon is the better buy today.